  /* ============================================
     TOKENS
     ============================================ */
  :root{
    --cream: #FAF7F1;
    --ink: #221D17;
    --graphite: #756B5D;
    --teal: #3FB6C9;
    --coral: #E2725B;
    --soft-tint: #D7EFF2;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --max-width: 1180px;
    --gutter: 1.5rem;

    --radius-sm: 6px;
    --radius-md: 14px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ============================================
     RESET / BASE
     ============================================ */
  *, *::before, *::after{ box-sizing: border-box; }

  html{
    scroll-behavior: smooth;
  }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    *, *::before, *::after{
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  body{
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  img{ max-width: 100%; display: block; }

  h1, h2, h3, h4{
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0;
    color: var(--ink);
  }

  p{ margin: 0 0 1rem 0; }
  p:last-child{ margin-bottom: 0; }

  a{ color: inherit; }

  ul{ margin: 0; padding: 0; list-style: none; }

  button{
    font-family: inherit;
    cursor: pointer;
  }

  /* Visible keyboard focus everywhere */
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible{
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .visually-hidden{
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }

  .container{
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  .eyebrow{
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--graphite);
    margin: 0 0 0.9rem 0;
  }

  /* Signature element: a short gradient trace under eyebrows —
     a quiet nod to the photonic concept without literal graphics */
  .trace{
    display: inline-block;
    width: 38px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--teal), var(--coral));
    margin-bottom: 1rem;
  }

  section{
    padding: 4.5rem 0;
  }

  .section-divider{
    border: none;
    border-top: 1px solid rgba(34,29,23,0.08);
    margin: 0;
  }

  /* ============================================
     SCROLL REVEAL
     Progressive enhancement: hidden start-states only
     apply once html.js is present (set synchronously
     in <head>). No-JS visitors see everything, always.
     ============================================ */
  html.js .reveal{
    opacity: 0;
    transition: opacity 1.3s var(--ease), transform 1.3s var(--ease);
  }
  html.js .reveal.is-visible{
    opacity: 1;
    transform: none;
  }

  html.js .reveal-left{ transform: translateX(-48px); }
  html.js .reveal-right{ transform: translateX(48px); }
  html.js .reveal-up{ transform: translateY(36px); }

  /* How We Build cards: the wrapper (.process-card-reveal) is what gets
     observed for scroll position — it never moves, so IntersectionObserver
     always reads its true position correctly. The visible card inside is
     what actually travels a long distance with a slight scale-up, for a
     stronger 'arriving from off-screen' feel without breaking detection. */
  html.js .process-card-reveal .process-card{
    opacity: 0;
    transition: opacity 1.8s var(--ease), transform 1.8s var(--ease);
  }
  html.js .process-card-reveal.reveal-right .process-card{ transform: translateX(60vw) scale(0.92); }
  html.js .process-card-reveal.reveal-left .process-card{ transform: translateX(-60vw) scale(0.92); }
  html.js .process-card-reveal.reveal-up .process-card{ transform: translateY(40vh) scale(0.92); }

  /* This must come AFTER the directional starting-position rules above —
     equal specificity, so source order decides, and this is the one that
     needs to win once the card is revealed. */
  html.js .process-card-reveal.is-visible .process-card{
    opacity: 1;
    transform: none;
  }

  /* The wrapper itself stays fully opaque/untransformed at all times —
     opacity and movement both live on the inner card above */
  html.js .process-card-reveal.reveal{
    opacity: 1;
    transition: none;
  }

  .process-card-reveal{ height: 100%; }
  .process-card-reveal .process-card{ height: 100%; }

  /* Stagger the three How We Build cards as a set */
  .process-card-reveal:nth-child(2) .process-card{ transition-delay: 0.2s; }
  .process-card-reveal:nth-child(3) .process-card{ transition-delay: 0.4s; }

  /* ============================================
     BUTTONS
     ============================================ */
  .btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.6rem;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
  }
  .btn:hover{ transform: translateY(-1px); }
  .btn:active{ transform: translateY(0); }

  .btn-primary{
    background: var(--coral);
    color: var(--ink);
  }
  .btn-primary:hover{ box-shadow: 0 6px 18px rgba(226,114,91,0.35); }

  .btn-secondary{
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink);
  }
  .btn-secondary:hover{ background: var(--ink); color: var(--cream); }

  /* ============================================
     HEADER / NAV
     ============================================ */
  .site-header{
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(34,29,23,0.08);
  }

  /* Frosted-glass background lives on a pseudo-element, not on
     .site-header directly. backdrop-filter (like transform) creates a
     new containing block for position:fixed descendants — and the
     mobile nav menu is a fixed descendant of this header. Putting the
     filter here instead keeps the header a neutral ancestor, so the
     menu correctly sizes against the real viewport. */
  .site-header::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(250,247,241,0.92);
    backdrop-filter: blur(8px);
  }

  .nav-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--gutter);
    max-width: var(--max-width);
    margin: 0 auto;
  }

  .logo{
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

  .nav-toggle{
    background: none;
    border: none;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
  }
  .nav-toggle span{
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  .nav-menu{
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    z-index: 105;
  }
  .nav-menu.is-open{
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu a{
    font-family: var(--font-display);
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--ink);
  }

  .nav-menu .btn{ margin-top: 0.5rem; }

  /* ============================================
     HERO
     ============================================ */
  .hero{
    padding: 5rem 0 4rem 0;
    text-align: center;
  }

  .hero-inner{
    max-width: 760px;
    margin: 0 auto;
  }

  /* Trace draws itself in first — a quick pulse of light before any
     text appears, echoing the photonic concept without literal imagery */
  @keyframes heroTraceDraw{
    from{ width: 0; opacity: 0; }
    to{ width: 38px; opacity: 1; }
  }
  .hero-trace{
    display: inline-block;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--teal), var(--coral));
    margin-bottom: 1.1rem;
    opacity: 0;
    animation: heroTraceDraw 0.5s var(--ease) 0.1s both;
  }

  /* Staggered relay: each piece rises on the same vertical axis,
     a beat after the last — one coherent arrival, not competing motion */
  @keyframes heroRise{
    from{ opacity: 0; transform: translateY(28px); }
    to{ opacity: 1; transform: translateY(0); }
  }
  .hero-rise{
    opacity: 0;
    animation: heroRise 0.9s var(--ease) both;
  }
  .hero-rise--1{ animation-delay: 0.5s; }
  .hero-rise--2{ animation-delay: 0.75s; }
  .hero-rise--3{ animation-delay: 1.05s; }
  .hero-rise--4{ animation-delay: 1.35s; }

  /* Once the load-in animation finishes, hand control back to normal CSS
     so :hover transitions (e.g. the CTA's lift) work correctly afterward —
     a finished 'forwards' animation can otherwise keep overriding transform */
  .hero-rise-done{
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero h1{
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    letter-spacing: -0.01em;
  }

  .hero h1 em{
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(90deg, var(--teal), var(--coral));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .hero .subhead{
    font-size: 1.1rem;
    color: var(--graphite);
    max-width: 540px;
    margin: 1.5rem auto 2.25rem auto;
  }

  /* ============================================
     ABOUT
     ============================================ */
  .about-inner{
    max-width: 720px;
  }

  .about h2{
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin-bottom: 1.5rem;
  }

  .about .body-copy p{
    color: var(--ink);
    font-size: 1.02rem;
  }

  /* ============================================
     PROCESS
     ============================================ */
  .process h2{
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    max-width: 640px;
    margin-bottom: 2.5rem;
  }

  .process-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 2.5rem;
  }

  .process-card{
    padding: 1.75rem;
    background: #fff;
    border: 1px solid rgba(34,29,23,0.08);
    border-radius: var(--radius-md);
  }

  .process-card .num{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--soft-tint);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .process-card h3{
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
  }

  .process-card p{
    color: var(--graphite);
    font-size: 0.97rem;
    margin: 0;
  }

  /* Expandable full process — native <details> for free a11y/no-JS support */
  .process-detail{
    border-top: 1px solid rgba(34,29,23,0.1);
    padding-top: 1.5rem;
  }

  .process-detail summary{
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ink);
    padding: 0.4rem 0;
  }
  .process-detail summary::-webkit-details-marker{ display: none; }

  .process-detail summary .chevron{
    width: 18px; height: 18px;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease);
  }
  .process-detail[open] summary .chevron{
    transform: rotate(180deg);
  }

  .process-detail-body{
    padding-top: 1.75rem;
  }

  .process-detail-body > .intro{
    color: var(--graphite);
    margin-bottom: 2rem;
    max-width: 680px;
  }

  .steps-list{
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  .step{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
  }

  .step .step-num{
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--teal);
    line-height: 1;
    min-width: 2.2rem;
  }

  .step h4{
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }

  .step p{
    color: var(--graphite);
    font-size: 0.96rem;
    margin: 0;
  }

  /* ============================================
     WORK
     ============================================ */
  .work-intro{
    margin-bottom: 3rem;
  }

  .work-intro h2{
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin-bottom: 0.75rem;
  }

  .work-intro p{
    color: var(--graphite);
    max-width: 560px;
  }

  .portfolio-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portfolio-card{
    background: #fff;
    border: 1px solid rgba(34,29,23,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  }

  .portfolio-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(34,29,23,0.1);
  }

  .portfolio-thumb{
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #221D17;
  }

  .portfolio-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.4s var(--ease);
  }

  .portfolio-card:hover .portfolio-thumb img{
    transform: scale(1.03);
  }

  .portfolio-thumb-overlay{
    position: absolute;
    inset: 0;
    background: rgba(34,29,23,0);
    transition: background 0.2s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .portfolio-card:hover .portfolio-thumb-overlay{
    background: rgba(34,29,23,0.35);
  }

  .portfolio-thumb-cta{
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    background: var(--coral);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
    text-decoration: none;
  }

  .portfolio-card:hover .portfolio-thumb-cta{
    opacity: 1;
    transform: translateY(0);
  }

  .portfolio-info{
    padding: 1.5rem;
  }

  .portfolio-tag{
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--graphite);
    background: var(--soft-tint);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .portfolio-name{
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--ink);
  }

  .portfolio-desc{
    font-size: 0.93rem;
    color: var(--graphite);
    margin: 0 0 1.1rem 0;
    line-height: 1.55;
  }

  .portfolio-link{
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.15s var(--ease);
  }

  .portfolio-link:hover{ gap: 0.55rem; }

  /* Placeholder card for more coming soon */
  .portfolio-placeholder{
    background: #fff;
    border: 1px dashed rgba(34,29,23,0.15);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
  }

  .portfolio-placeholder p{
    color: var(--graphite);
    font-size: 0.93rem;
    max-width: 280px;
    margin: 0;
  }

  @media (min-width: 640px){
    .portfolio-grid{ grid-template-columns: repeat(2, 1fr); }
  }

  @media (min-width: 960px){
    .portfolio-grid{ grid-template-columns: repeat(3, 1fr); }
  }

  /* ============================================
     CONTACT
     ============================================ */
  .contact-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-intro h2{
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
  }

  .contact-intro .subhead{
    color: var(--graphite);
    font-size: 1.02rem;
    max-width: 440px;
  }

  .form-field{
    margin-bottom: 1.25rem;
  }

  .form-field label{
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  .form-field .hint{
    display: inline;
    font-weight: 400;
    color: var(--graphite);
    font-size: 0.82rem;
    margin-left: 0.25rem;
  }

  .form-field input,
  .form-field textarea,
  .form-field select{
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid rgba(34,29,23,0.18);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s var(--ease);
  }

  .form-field input:focus,
  .form-field textarea:focus,
  .form-field select:focus{
    border-color: var(--teal);
  }

  .form-field textarea{
    resize: vertical;
    min-height: 110px;
  }

  .form-row{
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .required-mark{ color: var(--coral); }

  .privacy-note{
    font-size: 0.85rem;
    color: var(--graphite);
    margin: 1.25rem 0 0.75rem 0;
  }

  .trust-badges{
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
  }

  .trust-badge{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--graphite);
    background: var(--soft-tint);
    border-radius: 999px;
    padding: 0.3rem 0.75rem 0.3rem 0.5rem;
    line-height: 1;
  }

  .trust-badge svg{
    width: 13px;
    height: 13px;
    color: var(--teal);
    flex-shrink: 0;
  }

  #contact-form .btn-primary{
    width: 100%;
    margin-top: 1rem;
  }

  .form-status{
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--soft-tint);
    font-size: 0.92rem;
    display: none;
  }
  .form-status.is-visible{ display: block; }

  .confirmation{
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34,29,23,0.08);
    display: none;
  }
  .confirmation.is-visible{ display: block; }
  .confirmation h3{
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
  }
  .confirmation p{ color: var(--graphite); }

  /* ============================================
     FOOTER
     ============================================ */
  .site-footer{
    padding: 2.5rem 0;
    border-top: 1px solid rgba(34,29,23,0.08);
  }

  .footer-inner{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .footer-inner .logo{ font-size: 1.05rem; }

  .footer-meta{
    font-size: 0.85rem;
    color: var(--graphite);
  }

  /* ============================================
     TABLET / DESKTOP (min-width 640px)
     ============================================ */
  @media (min-width: 640px){
    section{ padding: 6rem 0; }

    .form-row-2{
      grid-template-columns: 1fr 1fr;
      gap: 0 1.25rem;
    }
    .form-row-2 .form-field{ margin-bottom: 1.25rem; }
  }

  /* ============================================
     DESKTOP (min-width 960px)
     ============================================ */
  @media (min-width: 960px){

    .nav-toggle{ display: none; }

    .nav-menu{
      position: static;
      flex-direction: row;
      background: none;
      transform: none;
      opacity: 1;
      gap: 2.25rem;
      width: auto;
    }

    .nav-menu a{
      font-family: var(--font-body);
      font-size: 0.95rem;
      font-weight: 600;
    }

    .nav-menu .btn{ margin-top: 0; }

    .hero{ padding: 7rem 0 6rem 0; }

    .process-grid{
      grid-template-columns: repeat(3, 1fr);
    }

    .step{
      grid-template-columns: 3rem 1fr;
    }

    .contact-grid{
      grid-template-columns: 0.85fr 1.15fr;
      gap: 4rem;
    }

    .contact-intro{ position: sticky; top: 7rem; }

    .footer-inner{
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }
  }

  @media (min-width: 1100px){
    .hero-inner{ max-width: 820px; }
  }

/* ============================================
   CHALLENGES / PROBLEMS SECTION
   ============================================ */
.challenges{
  padding: 5rem 0;
  background: var(--cream-dark);
}

.challenges-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 3rem;
}

.challenge-card{
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid rgba(34,29,23,0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.challenge-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34,29,23,0.08);
  border-color: var(--teal);
}

.challenge-icon{
  width: 44px;
  height: 44px;
  background: var(--soft-tint);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.challenge-content{ flex: 1; }

.challenge-title{
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.challenge-desc{
  font-size: 0.88rem;
  color: var(--graphite);
  line-height: 1.55;
  margin: 0;
}

.challenge-arrow{
  color: var(--teal);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: transform 0.2s var(--ease);
}

.challenge-card:hover .challenge-arrow{
  transform: translateX(3px);
}

@media (min-width: 640px){
  .challenges-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px){
  .challenges-grid{ grid-template-columns: repeat(2, 1fr); }
}
