:root {
    --ground: #f5f7fa;
    --tint: #e9effa;
    --tint-2: #dce7f8;
    --border: #c9d6ec;
    --navy: #1e2a3a;
    --navy-soft: #5d6e83;
    --display: #131820;
    --royal: #2563eb;
    --royal-deep: #1d4ed8;
    --white: #f8fafd;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --squig-royal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    --squig-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%23f8fafd' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    --wave-fill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q 45 0 90 30 T 180 30 T 270 30 T 360 30 V60 H0 Z' fill='%23f8fafd'/%3E%3C/svg%3E");
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: "Hanken Grotesk", sans-serif;
    background: var(--ground);
    color: var(--navy);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  ::selection { background: var(--royal); color: var(--white); }
  .serif { font-family: "Young Serif", serif; font-weight: 400; }
  .mono { font-family: "Space Mono", monospace; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; }
  .wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

  /* The consistent motif: a drifting wave line */
  .squig { display: inline-block; width: 74px; height: 10px; background-image: var(--squig-royal); background-repeat: repeat-x; background-size: 60px 10px; animation: squigdrift 5s linear infinite; }
  @keyframes squigdrift { to { background-position-x: 60px; } }

  nav { position: sticky; top: 0; z-index: 60; background: rgba(245, 247, 250, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
  .logo { font-family: "Young Serif", serif; font-size: 1.2rem; text-decoration: none; color: var(--display); display: inline-flex; align-items: center; white-space: nowrap; }
  .logo .lgdot { color: var(--royal); }
  .logo .lgc { display: block; overflow: hidden; white-space: nowrap; max-width: 9ch; opacity: 1; transition: max-width 0.55s var(--ease), opacity 0.35s var(--ease); }
  nav.shrunk .logo .lgc { max-width: 0; opacity: 0; }
  .nav-links { display: flex; gap: 30px; list-style: none; }
  .nav-links a { text-decoration: none; color: var(--navy); font-size: 0.9rem; font-weight: 600; transition: color 0.3s var(--ease); }
  .nav-links a:hover { color: var(--royal); }

  .btn {
    display: inline-block; position: relative; overflow: hidden; text-decoration: none;
    font-weight: 700; font-size: 0.95rem; padding: 16px 34px; border-radius: 999px;
    background: var(--display); color: var(--white); isolation: isolate;
  }
  .btn i {
    position: absolute; inset: -45%; z-index: -1; background: var(--royal); border-radius: 30%;
    transform: translateY(170%) rotate(15deg) scale(1.8);
    transition: transform 0.85s var(--ease);
  }
  .btn:hover i { transform: translateY(0) rotate(15deg) scale(1.8); }
  .btn:active { transform: scale(0.98); }

  /* Drifting waves at the bottom of the field */
  .waves { position: absolute; left: 0; right: 0; bottom: -2px; height: 90px; z-index: 4; pointer-events: none; }
  .wave { position: absolute; left: 0; bottom: 0; width: calc(100% + 720px); height: 100%; background-image: var(--wave-fill); background-repeat: repeat-x; background-size: 360px 100%; }
  .wave-1 { opacity: 0.2; animation: wavedrift 13s linear infinite; }
  .wave-2 { opacity: 0.34; height: 62%; animation: wavedrift 19s linear infinite reverse; }
  @keyframes wavedrift { to { transform: translateX(-360px); } }

  footer { border-top: 1px solid var(--border); padding: 24px 0; }
  .foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--navy-soft); }
  footer a { color: var(--navy-soft); }

  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .squig, .wave { animation: none !important; }
    .logo .lgc { transition: none; }
  }
  @media (max-width: 900px) {
    .nav-links { display: none; }
  }
