/* main.css */

html {
  scroll-behavior: smooth;
}

@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: normal;
  src: url(../assets/fonts/BebasNeue-Regular.ttf) format('woff2');
}

/* ==========================================================================
   1. GLOBAL THEME DESIGN VARIABLES (DEFAULT LIGHT THEME)
   ========================================================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafa;
    --text-primary: rgba(0, 0, 0, .75); 
    --text-colophon: rgba(90, 0, 112, 0.8);
    --text-clay: rgba(15, 123, 194, 1);
    --header-txt: rgba(2, 36, 60, 0.9);
    --prog-bar: rgba(255, 255, 255, .6);
    --text-meta: #0a803b;
    --sparkle: #efbafc;
    --outline-color: rgb(143, 210, 255, .7);

    /* Light Theme Settings mapped to our registered tokens */
    --hero-center-color: rgba(20, 139, 219, 1);
    --hero-outer-color: rgba(0, 50, 84, 1);
    --hero-border-color: #00324e;
    --badge-label-accent-text: #0A8049;
    --bg-dark-color-primary: #00324e;
    --bg-dark-color-secondary: #322424;
    --bg-dark-color-cta: #637E02;
    --highlight-txt: rgba(12, 102, 161, 1);
}

/* ==========================================================================
   2. AUTOMATIC DARK THEME OVERRIDES
   ========================================================================== */
[data-theme="dark"] {
    --bg-primary: #222222;
    --bg-secondary: rgba(0, 0, 0, 0.2);
    --text-primary: rgba(255, 255, 255, .75);
    --text-colophon: rgba(20, 139, 219, .5);
    --text-clay: rgba(176, 235, 1, 1);
    --header-txt: rgba(255, 255, 255, 0.9);
    --prog-bar: rgba(176, 235, 1, .8);
    --text-meta: rgb(22, 157, 247);
    --sparkle: #efbafc;

    /* Alternate Dark Theme Color Targets */
    --hero-center-color: rgba(15, 123, 194, 1); 
    --hero-outer-color: rgba(3, 0, 0, 1);       
    --hero-border-color: #030000;
    --badge-label-accent-text: rgba(176, 235, 1, 1);
    --highlight-txt: rgba(176, 235, 1, 1);
}   

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
#progress{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 9999;
    background-color: var(--prog-bar);
    /* transform-origin: 0 50%; */
    animation: growProgress linear;
    animation-timeline: scroll();
}

@keyframes growProgress {
    from{
        transform: scaleX(0);
    }
    to{
        transform: scaleX(1);
    }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh; /* Dynamic viewport height prevents issues on mobile browsers */
    font-family: system-ui, sans-serif;
    overflow-x: hidden;
    font-size: 18px;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

p{
    color: var(--text-primary);
    text-wrap: pretty;
}
a{
    color: #005485;
    transition: all 0.2s ease-in-out;
    outline: 2px dashed rgba(15, 123, 194, 0);
    outline-offset: 2px;
}
a:hover{
    color: #065530;
}
a:visited{
    color: #8516b1;
    &:hover{color: #b11697;}
}

a:focus-visible:not(.btn, .top-nav a, .logo a) {
    outline: 2px dashed rgba(15, 123, 194, 1);
    outline-offset: 2px;
    border-radius: 4px;
}

[data-theme="dark"] a { 
    color: #0d94e2; 
}

[data-theme="dark"] a:hover { 
    color: rgba(176, 235, 1, 1);
}

[data-theme="dark"] a:visited { 
    color: #d274f7;
    &:hover{color: #ffc2f5;}
}

h1, h2, h3, h4, h5, h6{font-family: "Bebas Neue", sans-serif; color: var(--header-txt); font-style: normal; letter-spacing: 0.03rem; text-wrap: balance;}


h1 {
  /* min-size: 32px, preferred-size: 5vw, max-size: 64px */
  font-size: clamp(3rem, 5vw, 5rem); 
}

h2 {
  /* min-size: 24px, preferred-size: 4vw, max-size: 48px */
  font-size: clamp(2rem, 4vw, 4rem);
}


.btn[data-btn-type="whimsical"] {

    --main-color: var(--sparkle);
    --deco-size: 2px;
    --deco-timing: 1.4s;

    --deco-1-end-translate: 0 30px;
    --deco-1-end-offset: 30%;

    --deco-2-scale: 0.65;
    --deco-2-end-translate: 0 -30px;
    --deco-2-end-offset: 40%;

    --deco-3-speed-variation: 0.85;
    --deco-3-scale: .85;
    --deco-3-end-translate: 0 -10px;
    --deco-3-end-offset: 50%;

    --deco-4-speed-variation: 1.2;
    --deco-4-scale: 0.5;
    --deco-4-end-translate: -20px 50px;
    --deco-4-end-offset: 60%;

}

.btn[data-btn-type="whimsical"] .deco {
  position: absolute;
  offset-path: border-box;
  offset-rotate: 0deg;
  width: calc(var(--deco-size) * var(--deco-scale, 1));
  aspect-ratio: 1 / 3;
  border-radius: 50%;
  background: var(--deco-color, var(--main-color));
  filter: blur(0px);
  opacity: 0;

  &::before,
  &::after {
    content: "";
    position: absolute;
    width: inherit;
    border-radius: inherit;
    aspect-ratio: inherit;
    background-color: inherit;
    translate: -50%;
  }

  &::before {
    rotate: 55deg;
  }
  &::after {
    rotate: -55deg;
  }
}

.btn[data-btn-type="whimsical"]:is(:hover, :focus-visible) .deco {
  offset-distance: var(--deco-end-offset, 70%);
  translate: var(--deco-end-translate);

  transition:
    translate calc(var(--deco-timing) * var(--deco-speed-variation, 1)),
    offset-distance calc(var(--deco-timing) * var(--deco-speed-variation, 1));
  animation: --decoration-life
    calc(var(--deco-timing) * var(--deco-speed-variation, 1) * 0.85) both;

  &:nth-child(1) {
    --deco-scale: var(--deco-1-scale);
    --deco-start-offset: var(--deco-1-start-offset);
    --deco-end-offset: var(--deco-1-end-offset);
    --deco-end-translate: var(--deco-1-end-translate);
    --deco-speed-variation: var(--deco-1-speed-variation);
  }
  &:nth-child(2) {
    --deco-scale: var(--deco-2-scale);
    --deco-start-offset: var(--deco-2-start-offset);
    --deco-end-offset: var(--deco-2-end-offset);
    --deco-end-translate: var(--deco-2-end-translate);
    --deco-speed-variation: var(--deco-2-speed-variation);
  }
  &:nth-child(3) {
    --deco-scale: var(--deco-3-scale);
    --deco-start-offset: var(--deco-3-start-offset);
    --deco-end-offset: var(--deco-3-end-offset);
    --deco-end-translate: var(--deco-3-end-translate);
    --deco-speed-variation: var(--deco-3-speed-variation);
  }
  &:nth-child(4) {
    --deco-scale: var(--deco-4-scale);
    --deco-start-offset: var(--deco-4-start-offset);
    --deco-end-offset: var(--deco-4-end-offset);
    --deco-end-translate: var(--deco-4-end-translate);
    --deco-speed-variation: var(--deco-4-speed-variation);
  }
  &:nth-child(5) {
    --deco-scale: var(--deco-5-scale);
    --deco-start-offset: var(--deco-5-start-offset);
    --deco-end-offset: var(--deco-5-end-offset);
    --deco-end-translate: var(--deco-5-end-translate);
    --deco-speed-variation: var(--deco-5-speed-variation);
  }
}

@keyframes --decoration-life {
  0% {
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


.btn{
    position: relative;
    font-size: 1.25rem;
    color: #fff;
    padding: 20px 30px;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, .8);
    font-weight: 500;
    display: inline-block;
    outline: 2px dashed rgba(15, 123, 194, 0);
    outline-offset: 2px;
}

.btn:hover {
    filter: brightness(140%);
    transform: translateY(-2px);
    box-shadow: 3px 2px 5px -1px rgba(0,0,0,0.4);
}

.btn:focus-visible{
    outline: 2px dashed rgba(15, 123, 194, 1);
    outline-offset: 2px;
}

.btn:active {
    filter: brightness(100%);
    transform: translateY(1px);
    box-shadow: 1px .5px 2.5px .5px rgba(0,0,0,0.2);
}

.primary {
    background-color: #00324e;
}

.secondary {
    background-color: #322424;
}

.cta{
    background-color: #0A8049;
}

[data-theme="dark"] .badge-label {
    color: var(--badge-label-accent-text); /* Now adapts dynamically to dark mode */
}
.badge-label {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--badge-label-accent-text); /* Now adapts dynamically to dark mode */
    font-weight: 700;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .ech a, 
.ech a:visited, 
.ech a:hover, 
.btn:active { 
    color: #ffffff !important; 
}

[data-theme="dark"] .top-nav a, 
.top-nav a:visited, 
.top-nav a:hover, 
.top-nav a:active { 
    color: #ffffff !important;
}

[data-theme="dark"] .btn, 
.btn:visited, 
.btn:hover, 
.btn:active { 
    color: #ffffff !important; 
}

[data-theme="dark"] .nav-drawer ul li a, 
.nav-drawer ul li a:hover, 
.nav-drawer ul li a:visited, 
.nav-drawer ul li a:active { 
    color: #ffffff; 
}


/* ==========================================================================
   ICON-EMBEDDED SLIDING THEME TOGGLE SWITCH
   ========================================================================== */
.nav-theme-switch-container {
    display: inline-flex;
    align-items: center;
    padding: 0px;
}

.switch-label {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.switch-label .theme-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 34px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    box-sizing: border-box;
}

.switch-icon {
    width: 14px;
    height: 14px;
    z-index: 1;
    pointer-events: none;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.switch-label .theme-switch-input:checked + .switch-slider .switch-icon.moon {
    opacity: 0.4;
}

.switch-label .theme-switch-input:not(:checked) + .switch-slider .switch-icon.sun {
    opacity: 0.4;
}

.switch-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.switch-label .theme-switch-input:checked + .switch-slider {
    background-color: #0F7BC2;
}

.switch-label .theme-switch-input:checked + .switch-slider::before {
    transform: translateX(24px);
}

.switch-label .theme-switch-input:focus-visible + .switch-slider {
    outline: 2px dashed var(--outline-color);
    outline-offset: 6px;
}

/* ==========================================================================
   5. THEME SWITCH RESPONSIVE DISPLAY RULES
   ========================================================================== */
.mobile-only-switch {
    display: none !important;
}

@media (max-width: 1024px) {
    .desktop-only-switch {
        display: none !important;
    }
    .mobile-only-switch {
        display: inline-flex !important;
        margin-bottom: 20px;
        padding-left: 40px;
        box-sizing: border-box;
    }
}


.max-width-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(1rem, 5vw, 3rem);
}

/* ==========================================================================
   MODULAR DIRECTIONAL ENTRANCE SYSTEM (OBSERVER DRIVEN)
   ========================================================================== */

/* 1. Master Base State (Hidden) */
.scroll-fade {
  opacity: 0;
  will-change: opacity, transform;
  /* Smooth 1.4s duration paired with your premium deceleration curve */
  transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 2. Directional Origin Coordinates Offset Defs */
.scroll-fade.from-bottom { transform: translateY(50px); }
.scroll-fade.from-top    { transform: translateY(-50px); }
.scroll-fade.from-left   { transform: translateX(-50px); }
.scroll-fade.from-right  { transform: translateX(50px); }

/* 3. Revealed Trigger State (Fires when JS adds .is-visible) */
.scroll-fade.is-visible {
  opacity: 1;
  transform: translate(0); /* Forces reset to perfect natural baseline row */
}

/* 4. OPTIONAL: Staggered Timing Helper Shortcuts */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }
.delay-900 { transition-delay: 0.9s; }
.delay-1000 { transition-delay: 1s; }

@media (max-width: 1024px) {
  /* Hard blocks any staggered delays so all layout components load together instantly */
  .scroll-fade {
    opacity: 1;
    transition: none;
  }
  .scroll-fade.from-bottom { transform: translateY(0px); }
  .scroll-fade.from-top    { transform: translateY(0px); }
  .scroll-fade.from-left   { transform: translateX(0px); }
  .scroll-fade.from-right  { transform: translateX(0px); }
}

/* Add overflow safety to sections using horizontal animations */
.hero,
.uxmc,
.contact,
.pillars-grid {
  overflow: hidden !important;
}

#uxmc, #contact{
    scroll-margin-top: 75px; 
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 100px;
    background-color:rgba(14, 114, 180, 0);
    transition: all 0.1s ease-in-out;
    border-bottom: 2px solid rgb(255, 255, 255, 0);


    /* Links the animation directly to page scroll */
    animation: shrinkHeader linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 125px; /* Animation starts at 0px and ends at 150px of scroll */
}

/* Keyframes define the final sticky state */
@keyframes shrinkHeader {
    to {
        height: 75px;
        background-color:rgba(14, 114, 180, .8);
        border-bottom: 2px solid rgb(255, 255, 255, .8);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
    }
}

.logo {
    display: flex;
    padding-left: 20px;

    .name {
        position: relative;
        top:-1px;
        margin-left: 15px;
        font-size: clamp(.8rem, 5vw, 2rem);
        font-family: sans-serif;
        color: #fff;
        display: flex;
        align-items: center;
        transition: all 0.5s ease-in-out;

        /* Links the animation directly to page scroll */
        animation: shrinkName linear both;
        animation-timeline: scroll(root);
        animation-range: 0px 125px;
    }
}
.top-nav{
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
}

@media (max-width: 1119px) {
  .top-nav { display: none; }
}

.top-nav ul {
    display: flex;
    gap: 10px;
    list-style-type:none;
    margin: 0;
    padding: 0;
    display: flex;
}

.top-nav a, 
.top-nav a:visited, 
.top-nav a:hover, 
.top-nav a:active { 
    color: white; 
    text-decoration: none; 
    font-size: 21px; 
    transition: all 0.3s ease-in-out; 
    padding: 4px 15px 8px 15px; 
    border-radius: 20px; /* Provides a clean, modern rounded corner */
    corner-shape: squircle;
    outline: 2px dashed rgba(15, 123, 194, 0);
} 

.top-nav a:hover{ 
    color: white; 
    text-decoration: none; 
    background-color: rgba(255, 255, 255, 0.1);
}

.top-nav a:focus-visible {
    color: white; 
    text-decoration: none; 
    outline: 2px dashed var(--outline-color);
}


.top-nav a.is-active{
    background-color: rgba(255, 255, 255, 0.1);
}

.ech a{
    font-size: 20px;
    padding: 9px 8px;
    border-radius: 50%;
    border: 3px solid #fff;
    background-color: #0F7BC2;    
    /* Center the text perfectly inside */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Optional text styling */
    
    font-family: sans-serif;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s  ease-in-out;

    /* Links the animation directly to page scroll */
    animation: shrinkLogo linear both;
    animation-timeline: scroll(root);
    animation-range: 0px 125px;
}

/* Keyframes define the final sticky state */
@keyframes shrinkLogo {
    to {
        font-size: 15px;
        padding: 8px 8px;
        border: 3px solid #fff;
    }
}



.ech a:hover {
    background-color: rgba(0, 50, 78, .5);
}

.ech a:focus-visible {
    color: white; 
    text-decoration: none; 
    outline: 2px dashed var(--outline-color);
}


@media (max-width: 420px) {
  .name { font-size: 24px; }
}

/* Keyframes define the final sticky state */
@keyframes shrinkName {
    to {
        font-size: 20px;
    }
}




/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

.footer-logo {
    display: block;
    max-width: 380px;
    text-align: center;
}

.footer-ech{
    display: block;
    font-size: 20px;
    border-radius: 50%;
    height: 70px;
    width: 70px;
    color: #ffffff !important;
    border: 3px solid #fff;
    background-color: #0F7BC2;
    font-family: sans-serif;
    text-decoration: none;
    transition: all 0.3s  ease-in-out;
    margin: 20px auto;
    padding-top: 10px;
}

.global-footer {
    background-color: #f8fafa;
    border-top: 1px solid rgba(0, 50, 78, 0.08);
    width: 100%;
    margin-top: auto; /* Pushes layout to bottom if content is short */
    color: #444444;
    position: relative !important;
    overflow: hidden !important;
}

/* Master grid spacing distribution rules */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr; /* Balanced multi-column allocation */
  gap: 4rem;
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

.footer-brand .logo-text {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  color: rgba(0, 50, 78, 1);
  letter-spacing: 0.04rem;
}

.footer-brand .clay{
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.2rem;
    letter-spacing: 0.04rem;
    color: var(--text-clay) !important;
}

.footer-tagline {
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 380px;
  color: #555555;
}

.footer-colophon {
  font-size: .9rem;
  line-height: 1.2;
  margin-top: .8rem;
  max-width: 380px;
  font-family: monospace;
  color: var(--text-colophon);
}

.footer-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  color: rgba(0, 50, 78, 1);
  letter-spacing: 0.04rem;
  margin-bottom: 1rem;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.03rem;
}

/* Expands list item links text to comfortable mobile bounding sizes */
.footer-nav-list a {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: #005485;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.footer-nav-list a:hover {
  color: rgba(15, 123, 194, 1);
  transform: translateX(3px); /* Interactive movement layout shift marker */
}

/* Absolute System Lower Information Bar */
.footer-bottom-bar {
  width: 100%;
}

.footer-content{
    padding-top: 0px;
    padding-bottom: 0px;
}

.bottom-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.bottom-bar-flex p {
  font-size: 0.85rem;
  color: #666666;
  margin: 0;
}

/* ==========================================================================
   GLOBAL FOOTER VARIABLE INTERLEAVING (DARK THEME MODE)
   ========================================================================== */
[data-theme="dark"] .global-footer {
  background-color: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .footer-brand .logo-text,
[data-theme="dark"] .footer-title {
  color: #ffffff;
}

[data-theme="dark"] .footer-tagline {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .footer-nav-list a {
  color: #0d94e2;
}

[data-theme="dark"] .footer-nav-list a:hover {
  color: rgba(176, 235, 1, 1);;
}

[data-theme="dark"] .footer-bottom-bar {
  border-top-color: rgba(255, 255, 255, 0);
  background-color: rgba(0, 0, 0, 0);
}

[data-theme="dark"] .bottom-bar-flex p {
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive Structural Layout Overrides */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr; /* Stacks all column data elements on tablets and mobile screens */
    gap: 3rem;
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  .footer-tagline, .footer-colophon {
    max-width: 100%;
  }

  .bottom-bar-flex {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}



/* ==========================================================================
   FOOTER GRID DOTS
   ========================================================================== */

/* Force layout child layers to stack cleanly over the background grid graphic */
.global-footer .max-width-container,
.global-footer .footer-bottom-bar {
  position: relative;
  z-index: 5;
}

/* Pure CSS Technical Grid Layer */
.footer-static-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* Keeps background layers completely click-through safe */
  
  /* Creates a subtle, high-performance 32px blueprint dot pattern grid */
  background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center top;
}

/* ==========================================================================
   GLOBAL FOOTER VARIABLE INTERLEAVING (DARK THEME ADJUSTMENTS)
   ========================================================================= */
[data-theme="dark"] .footer-static-grid {
  /* Shifts dot matrix smoothly to an elegant, low-opacity white layout grid */
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}
[data-theme="dark"] .cta {
    background-color: var(--bg-dark-color-cta);
}

