:root {
    --paper: #FDF9F2;
    --ink: #221B13;
    --slate: #6E6254;
    --accent: #2C4870;
    --accent-deep: #1B2F4D;
    --duo: #46566E;
    --mist: #F6EBDA;
    --line: #E9DDC9;
    --serif: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", sans-serif;
    --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
    --mono: "Figtree", "Helvetica Neue", Arial, sans-serif;
    --pad: clamp(1.25rem, 4vw, 4rem);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  section[id] { scroll-margin-top: 5rem; }
  ::selection { background: var(--accent); color: var(--paper); }
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

  .eyebrow {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-deep);
    display: inline-block;
    margin-bottom: 1rem;
  }
  .eyebrow::before { content: "✳ "; color: var(--accent); }
  /* ---------- nav ---------- */
  header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem var(--pad);
    background: rgba(253, 249, 242, 0.86);
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s;
  }
  header.scrolled { box-shadow: 0 10px 30px -22px rgba(70, 48, 22, 0.5); }
  .wordmark {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    letter-spacing: -0.01em;
  }
  .wordmark span { color: var(--accent); }
  nav { display: flex; gap: clamp(0.75rem, 2.5vw, 2rem); }
  nav a {
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate);
    transition: color 0.15s;
  }
  nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
  }
  nav a:hover { color: var(--ink); }
  nav a:hover::after { transform: scaleX(1); }
  .btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.7rem 1.35rem;
    border-radius: 10px;
    border: 2px solid var(--ink);
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  }
  .btn:active { transform: translateY(1px); }
  .btn-solid { background: var(--accent); border-color: var(--accent); color: var(--paper); }
  .btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .btn-ghost:hover { background: var(--ink); color: var(--paper); }

  /* ---------- hero ---------- */
  .hero {
    position: relative;
    min-height: min(88vh, 780px);
    display: flex; align-items: center;
    overflow: hidden;
  }
  .hero .duo { position: absolute; inset: 0; z-index: 0; }
  .hero .duo img {
    width: 100%; height: 100%; object-fit: cover; object-position: 70% center;
    animation: kenburns 26s ease-in-out infinite alternate;
  }
  @keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(100deg, #FDF9F2 0%, rgba(253, 249, 242, 0.82) 46%, rgba(253, 249, 242, 0.2) 78%, transparent 100%);
    background: linear-gradient(100deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 82%, transparent) 46%, color-mix(in srgb, var(--paper) 20%, transparent) 78%, transparent 100%);
  }
  .hero-inner { position: relative; z-index: 2; padding: 4rem var(--pad); max-width: 900px; }
  .hero h1 {
    font-family: var(--serif);
    font-weight: 750;
    font-size: clamp(2.5rem, 6vw, 4.9rem);
    line-height: 1.03;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
  }
  h1 em, h2 em { font-style: normal; }
  .hero h1 em { position: relative; }
  .hero h1 em::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.16em;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 20" preserveAspectRatio="none"><path d="M5 13 C 70 5, 180 17, 295 7" stroke="%232C4870" stroke-width="6" fill="none" stroke-linecap="round"/></svg>') no-repeat center / 100% 100%;
    transform-origin: left center;
  }
  /* underline draws itself in after the headline lands */
  .js .hero h1.reveal em::after { transform: scaleX(0); transition: transform 0.7s cubic-bezier(0.6, 0, 0.2, 1) 0.55s; }
  .js .hero h1.reveal.in em::after { transform: scaleX(1); }
  .hero p { max-width: 34rem; color: var(--slate); margin-bottom: 2.25rem; }
  .hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

  /* duotone treatment — signature look */
  .duo { position: relative; background: var(--duo); }
  .duo img { filter: grayscale(1) contrast(1.06) brightness(1.06); }
  .duo::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: var(--duo);
    mix-blend-mode: lighten;
    opacity: 0.9;
  }

  /* ---------- trust ---------- */
  .trust { padding: 3rem var(--pad); border-bottom: 1px solid var(--line); text-align: center; }
  .trust p { font-size: 0.95rem; color: var(--slate); margin-bottom: 1.5rem; }
  .logos {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
  .logos-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    padding-right: 4rem;
    animation: marquee 40s linear infinite;
  }
  .logos-track img { height: 32px; width: auto; max-width: none; }
  @keyframes marquee { to { transform: translateX(-50%); } }

  /* ---------- marquee band ---------- */
  .marquee {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
    background: var(--paper);
  }
  .marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
  }
  .marquee-track span {
    white-space: nowrap;
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    letter-spacing: -0.02em;
    color: #EDD9BC;
  }
  @supports ((-webkit-text-stroke: 1px #000)) {
    .marquee-track span { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
  }

  /* ---------- stats ---------- */
  .stats { padding: clamp(4rem, 9vw, 7rem) var(--pad); }
  .section-head { max-width: 640px; margin-bottom: 3.5rem; }
  h2 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 0.9rem;
  }
  .section-head p { color: var(--slate); }
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-top: 1px solid var(--line);
  }
  .stat {
    padding: 2rem 1.5rem 2rem 0;
    border-bottom: 1px solid var(--line);
  }
  .stat b {
    display: block;
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(2.7rem, 5vw, 4.1rem);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.75rem;
  }
  .stat b sup { font-size: 0.45em; color: var(--accent); }
  .stat > span {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
  }

  /* ---------- products ---------- */
  .products { padding: clamp(4rem, 9vw, 7rem) var(--pad); }
  .products-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    flex-wrap: wrap;
    max-width: none;
    margin-bottom: 3rem;
  }
  .products-head h2 { margin-bottom: 0; max-width: 15em; }
  .product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
  }
  .product-media {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--mist), #F1E8D4);
    padding: clamp(1.4rem, 3vw, 2.4rem);
    margin-bottom: 1.4rem;
  }
  .product-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 40px -18px rgba(70, 48, 22, 0.4);
    transform: rotate(-1.4deg);
    transition: transform 0.4s ease;
  }
  .product:nth-child(2) .product-media img { transform: rotate(1.4deg); }
  .product-media:hover img { transform: rotate(0deg) scale(1.02); }
  .chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px -10px rgba(70, 48, 22, 0.4);
    animation: floaty 4.5s ease-in-out infinite alternate;
  }
  .chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
  }
  .chip-a { left: 8%; bottom: 12%; }
  .chip-b { right: 7%; bottom: 18%; animation-delay: 1.2s; }
  .chip b { color: var(--accent-deep); }
  @keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-9px); } }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
  .product-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 4px 14px -6px rgba(70, 48, 22, 0.35);
    transition: background 0.2s, color 0.2s, transform 0.25s ease;
  }
  .product-media:hover .product-arrow {
    background: var(--accent);
    color: var(--paper);
    transform: translate(3px, -3px);
  }
  .product-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin-bottom: 0.5rem;
  }
  .product h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
  }
  .product > p { color: var(--slate); margin-bottom: 1rem; }
  .product-features { list-style: none; display: grid; gap: 0.5rem; }
  .product-features li { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; }
  .product-features li::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #DCE3EE url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M14.77 6.63a.8.8 0 0 0-1.13 0L8.6 11.68 6.35 9.44a.8.8 0 0 0-1.12 1.12l2.8 2.8a.8.8 0 0 0 1.13 0l5.6-5.6a.8.8 0 0 0 0-1.13z" fill="%231B2F4D"/></svg>') center / 20px 20px no-repeat;
  }
  .product-grid .product:nth-child(2).reveal { transition-delay: 0.12s; }
  @media (max-width: 760px) {
    .product-grid { grid-template-columns: 1fr; }
  }

  /* ---------- services ---------- */
  .services { padding: clamp(4rem, 9vw, 7rem) var(--pad); background: var(--mist); }
  .service-list { border-bottom: 1px solid #E2CBA8; }
  .service {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 3rem);
    padding: clamp(1.5rem, 3vw, 2.2rem) clamp(0.75rem, 2vw, 1.5rem);
    border-top: 1px solid #E2CBA8;
    overflow: hidden;
  }
  .service::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
  }
  .service:hover::before { transform: scaleX(1); }
  .service > * { position: relative; z-index: 1; }
  .service-num {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1;
    color: #C7D2E0;
    transition: color 0.3s;
  }
  @supports ((-webkit-text-stroke: 1px #000)) {
    .service-num { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
    .service:hover .service-num { color: var(--accent); }
  }
  .service-body { transition: transform 0.3s ease; }
  .service:hover .service-body { transform: translateX(8px); }
  .service h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    line-height: 1.15;
    margin-bottom: 0.35rem;
  }
  .service p { color: var(--slate); max-width: 44rem; }
  .service-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--ink);
    color: var(--ink);
    background: transparent;
    transition: background 0.25s, transform 0.25s ease;
  }
  .service:hover .service-arrow { background: var(--accent); border-color: var(--accent); color: var(--paper); transform: translate(3px, -3px); }
  @media (max-width: 560px) {
    .service { grid-template-columns: auto 1fr; }
    .service-arrow { display: none; }
  }

  /* ---------- team ---------- */
  .team { padding: clamp(4rem, 9vw, 7rem) var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
  .team .duo { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; }
  .team .duo img { width: 100%; height: 100%; object-fit: cover; }
  .team p { color: var(--slate); margin-bottom: 1.75rem; }

  /* ---------- contact ---------- */
  .contact {
    background: #F4E3CB;
    padding: clamp(4rem, 9vw, 7rem) var(--pad);
  }
  .contact-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) 3fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .contact-info > div { padding: 1.4rem 0; border-bottom: 1px solid #E2CBA8; }
  .contact-info > div:first-child { padding-top: 0; }
  .contact-info h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }
  .contact-info h3::before { content: "✳ "; color: var(--accent); }
  .contact-info a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
  .contact-info a:hover { text-decoration: underline; }
  .contact-info small { display: block; color: var(--slate); margin-top: 0.15rem; }
  .contact-form {
    background: var(--paper);
    border: 1px solid #E2CBA8;
    border-radius: 14px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
  }
  .contact-form .field-full { grid-column: 1 / -1; }
  .contact-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  .contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    transition: border-color 0.15s;
  }
  .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-deep);
  }
  .contact-form textarea { resize: vertical; min-height: 7rem; }
  .contact-form .btn { justify-self: start; cursor: pointer; }
  .contact-form small { color: var(--slate); align-self: center; }
  @media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .contact-form { grid-template-columns: 1fr; }
  }

  /* ---------- back to top ---------- */
  .scroll-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--paper);
    border: 2px solid var(--paper);
    box-shadow: 0 8px 22px -8px rgba(70, 48, 22, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s linear, visibility 0.3s linear, transform 0.2s ease;
  }
  .scroll-top.show { opacity: 1; visibility: visible; }
  .scroll-top:hover { transform: translateY(-2px); }
  .scroll-top .arrow { width: 15px; height: 15px; fill: currentColor; }
  .scroll-top .ring {
    position: absolute;
    inset: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
  }
  .scroll-top .ring path {
    fill: none;
    stroke: var(--accent-deep);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 307.919;
    stroke-dashoffset: 307.919;
    transition: stroke-dashoffset 10ms linear;
  }
  @media (max-width: 560px) {
    .scroll-top { width: 38px; height: 38px; right: 14px; bottom: 14px; }
    .scroll-top .arrow { width: 13px; height: 13px; }
  }

  /* ---------- legal pages ---------- */
  .legal { max-width: 46rem; margin: 0 auto; padding: 3rem var(--pad) 5rem; }
  .legal h1 {
    font-family: var(--serif);
    font-weight: 750;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 0.5rem;
  }
  .legal .updated { color: var(--slate); font-size: 0.9rem; margin-bottom: 2.5rem; }
  .legal h2 { font-size: 1.3rem; margin: 2.25rem 0 0.5rem; }
  .legal p { color: var(--slate); margin-bottom: 0.75rem; }
  .legal a { color: var(--accent-deep); }

  /* ---------- footer ---------- */
  footer {
    padding: 2.5rem var(--pad);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--slate);
  }
  footer nav a { font-size: 0.9rem; }
  footer .wordmark { font-size: 1.2rem; }
  .footer-legal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    text-align: right;
    font-size: 0.9rem;
  }
  @media (max-width: 560px) {
    .footer-legal { align-items: flex-start; text-align: left; }
  }

  /* ---------- motion ---------- */
  /* hidden state only when JS is running, so content stays visible without it */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  .hero .reveal:nth-child(2) { transition-delay: 0.1s; }
  .hero .reveal:nth-child(3) { transition-delay: 0.2s; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .js .hero h1.reveal em::after { transform: none; transition: none; }
    .card, .card:hover { transform: none; transition: none; }
    .hero .duo img { animation: none; }
    .logos-track, .marquee-track { animation: none; }
    .logos-track { flex-wrap: wrap; justify-content: center; width: 100%; }
    .marquee-track span + span { display: none; }
    .scroll-top .ring path { transition: none; }
    .chip, .chip .dot { animation: none; }
    .service::before, .service-body, .service-arrow { transition: none; }
    .product-media img, .product:nth-child(2) .product-media img { transform: none; transition: none; }
  }

  @media (max-width: 900px) {
    nav.main-nav { display: none; }
  }
  @media (max-width: 760px) {
    .team { grid-template-columns: 1fr; }
    .hero::after {
      background: linear-gradient(180deg, #FDF9F2 0%, rgba(253, 249, 242, 0.78) 60%, rgba(253, 249, 242, 0.3) 100%);
      background: linear-gradient(180deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 78%, transparent) 60%, color-mix(in srgb, var(--paper) 30%, transparent) 100%);
    }
  }
