/* Shared styles for the Cadence feature pages (the home page keeps its own inline copy).
   Tokens and components are copied from site/index.html — keep them in step. */

  :root{
    --bg:#08110f; --bg-2:#0b1a18; --surface:#0f201d; --surface-2:#14302a; --border:#1e3a34; --border-strong:#2b544b;
    --ink:#eef6f3; --ink-2:#a4bcb5; --ink-3:#6c857d;
    --teal:#30d1bd; --teal-bright:#9efceb; --teal-deep:#0e8f7d; --amber:#ffb83d; --red:#ff5952;
    --ring-a:#12262b; --ring-b:#05090d; --glow:rgba(48,209,189,.28);
    --shadow:0 30px 70px -40px rgba(0,0,0,.85);
  }
  @media (prefers-color-scheme: light){ :root:not([data-theme="dark"]){
    --bg:#f0f3f1; --bg-2:#e9efec; --surface:#ffffff; --surface-2:#f2f8f5; --border:#dae4e0; --border-strong:#c3d2cd;
    --ink:#0e211d; --ink-2:#42574f; --ink-3:#6f847c; --teal:#008778; --teal-bright:#0aa38d; --teal-deep:#0b7a6a;
    --amber:#b7760f; --red:#c8402f; --glow:rgba(0,135,120,.18); --shadow:0 26px 56px -40px rgba(20,50,45,.4);
  }}
  :root[data-theme="light"]{
    --bg:#f0f3f1; --bg-2:#e9efec; --surface:#ffffff; --surface-2:#f2f8f5; --border:#dae4e0; --border-strong:#c3d2cd;
    --ink:#0e211d; --ink-2:#42574f; --ink-3:#6f847c; --teal:#008778; --teal-bright:#0aa38d; --teal-deep:#0b7a6a;
    --amber:#b7760f; --red:#c8402f; --glow:rgba(0,135,120,.18); --shadow:0 26px 56px -40px rgba(20,50,45,.4);
  }
  :root[data-theme="dark"]{
    --bg:#08110f; --bg-2:#0b1a18; --surface:#0f201d; --surface-2:#14302a; --border:#1e3a34; --border-strong:#2b544b;
    --ink:#eef6f3; --ink-2:#a4bcb5; --ink-3:#6c857d; --teal:#30d1bd; --teal-bright:#9efceb; --teal-deep:#0e8f7d;
    --amber:#ffb83d; --red:#ff5952; --ring-a:#12262b; --ring-b:#05090d; --glow:rgba(48,209,189,.28); --shadow:0 30px 70px -40px rgba(0,0,0,.85);
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{margin:0; background:var(--bg); color:var(--ink);
    font:450 16px/1.6 "IBM Plex Sans",system-ui,sans-serif; -webkit-font-smoothing:antialiased; overflow-x:hidden;}
  .mono{font-family:"IBM Plex Mono",ui-monospace,monospace; font-variant-numeric:tabular-nums;}
  h1,h2,h3{font-family:"Archivo",system-ui,sans-serif; margin:0; text-wrap:balance; letter-spacing:-.02em; line-height:1.05;}
  a{color:inherit; text-decoration:none;}
  .wrap{max-width:1120px; margin:0 auto; padding:0 24px;}
  .eyebrow{font-family:"IBM Plex Mono",monospace; font-size:12px; font-weight:500; letter-spacing:.18em;
    text-transform:uppercase; color:var(--teal);}
  h2.eyebrow{line-height:inherit; text-wrap:wrap;}

  /* nav */
  nav{position:sticky; top:0; z-index:20; backdrop-filter:blur(14px);
    background:color-mix(in srgb, var(--bg) 78%, transparent); border-bottom:1px solid var(--border);}
  nav .wrap{display:flex; align-items:center; gap:14px; height:64px;}
  nav .logo{width:32px; height:32px; filter:drop-shadow(0 0 10px var(--glow));}
  nav .name{font-family:"Archivo"; font-weight:800; font-size:18px; letter-spacing:-.01em;}
  nav .links{margin-left:auto; display:flex; align-items:center; gap:24px; font-size:14px; color:var(--ink-2);}
  nav .links a{white-space:nowrap;}
  nav .links a:hover{color:var(--ink);}
  nav .clock{font-family:"IBM Plex Mono"; font-size:13px; color:var(--ink-3); font-variant-numeric:tabular-nums;
    border:1px solid var(--border); border-radius:999px; padding:4px 11px; white-space:nowrap;}
  .btn{display:inline-flex; align-items:center; gap:8px; font-family:"IBM Plex Sans"; font-weight:600; font-size:14px;
    border-radius:11px; padding:10px 17px; cursor:pointer; border:1px solid transparent; transition:.15s;}
  .btn.primary{background:var(--teal); color:#04140f;}
  .btn.primary:hover{background:var(--teal-bright);}
  .btn.ghost{border-color:var(--border-strong); color:var(--ink);}
  .btn.ghost:hover{border-color:var(--teal); color:var(--teal);}
  .nav-cta{padding:8px 15px;}
  .connect-link{font-size:13.5px; font-weight:600; color:var(--teal); border-bottom:1px solid transparent; white-space:nowrap;}
  .connect-link:hover{border-bottom-color:var(--teal);}
  /* Shed the nav in stages as it runs out of room, least-essential first —
     never let a link's own text wrap mid-phrase. */
  @media (max-width:1080px){ nav .clock{display:none;} }
  @media (max-width:960px){ nav .links{gap:14px;} }
  @media (max-width:840px){ .connect-link{display:none;} }
  @media (max-width:780px){ nav .links a:not(.nav-cta){display:none;} }


  /* sections */
  section{padding:72px 0; border-top:1px solid var(--border);}
  .sec-head{max-width:60ch; margin-bottom:40px;}
  .sec-head h2{font-size:clamp(28px,4vw,42px); font-weight:800; margin:12px 0 0;}
  .sec-head p{color:var(--ink-2); font-size:17px; margin:14px 0 0; max-width:56ch;}


  /* feature grids */
  .grid3{display:grid; grid-template-columns:repeat(3,1fr); gap:16px;}
  .grid2{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}
  @media (max-width:820px){ .grid3{grid-template-columns:1fr 1fr;} .grid2{grid-template-columns:1fr;} }
  @media (max-width:520px){ .grid3{grid-template-columns:1fr;} }
  .card{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:22px; transition:.15s;}
  .card:hover{border-color:var(--border-strong);}
  .card .ic{color:var(--teal); margin-bottom:14px;}
  .card h3{font-size:19px; font-weight:700;}
  .card p{color:var(--ink-2); font-size:14.5px; margin:9px 0 0;}
  .card .tags{margin-top:12px; display:flex; flex-wrap:wrap; gap:6px;}
  .tag{font-family:"IBM Plex Mono"; font-size:11px; color:var(--teal); background:color-mix(in srgb, var(--teal) 12%, transparent);
    border:1px solid color-mix(in srgb, var(--teal) 30%, transparent); border-radius:999px; padding:3px 9px;}

  /* split feature */
  .split{display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center;}
  @media (max-width:820px){ .split{grid-template-columns:1fr; gap:28px;} }
  .split ul{list-style:none; margin:18px 0 0; padding:0; display:grid; gap:12px;}
  .split li{position:relative; padding-left:26px; color:var(--ink-2); font-size:15px;}
  .split li::before{content:""; position:absolute; left:0; top:7px; width:9px; height:9px; border-radius:50%;
    border:2px solid var(--teal);}
  .split li b{color:var(--ink); font-weight:600;}

  .soon{display:inline-flex; align-items:center; gap:10px; margin:0 auto; padding:11px 22px;
    border:1px solid var(--border-strong); border-radius:999px; background:var(--surface);
    box-shadow:0 0 0 1px transparent, var(--shadow);}
  .soon .d{width:8px; height:8px; border-radius:50%; background:var(--amber); box-shadow:0 0 9px var(--amber);
    animation:blink 1.4s ease-in-out infinite; flex:none;}
  .soon .t{font-family:"IBM Plex Mono"; font-weight:600; font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink);}
  .soon.sm{padding:6px 13px; gap:7px; box-shadow:none; white-space:nowrap;}
  .soon.sm .d{width:6px; height:6px;}
  .soon.sm .t{font-size:11px; letter-spacing:.1em;}


  footer{border-top:1px solid var(--border); padding:34px 0; color:var(--ink-3); font-size:13px;}
  footer .wrap{display:flex; align-items:center; gap:14px; flex-wrap:wrap;}
  footer .name{font-family:"Archivo"; font-weight:700; color:var(--ink-2);}
  footer .r{margin-left:auto; display:flex; gap:20px; font-family:"IBM Plex Mono"; font-size:12px;}
  footer .legal{margin-top:22px; padding-top:18px; border-top:1px solid var(--border); font-size:11.5px;
    line-height:1.6; color:var(--ink-3); max-width:80ch;}
  footer .legal a{border-bottom:1px dotted var(--ink-3);}

  svg.icon{width:26px; height:26px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;}
  svg.ic-sm{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
  @media (prefers-reduced-motion: reduce){
    *{animation:none !important; scroll-behavior:auto;}
    .reveal{opacity:1 !important; transform:none !important; transition:none !important;}
  }

  /* ---------- feature pages ---------- */
  nav .name a{color:inherit;}
  nav .links a.here{color:var(--ink);}
  @media (max-width:1080px){ nav .links a.opt{display:none;} }

  .crumbs{font-family:"IBM Plex Mono"; font-size:12px; color:var(--ink-3); padding-top:28px;}
  .crumbs a{color:var(--ink-2);} .crumbs a:hover{color:var(--teal);}

  .fhero{position:relative; padding:26px 0 56px; overflow:hidden;}
  .fhero::before{content:""; position:absolute; top:-35%; left:60%; transform:translateX(-50%);
    width:900px; height:640px; background:radial-gradient(closest-side, var(--glow), transparent 70%); opacity:.55; pointer-events:none;}
  .fhero .wrap{position:relative; display:grid; grid-template-columns:1.05fr .95fr; gap:44px; align-items:center;}
  .fhero h1{font-size:clamp(36px,5.6vw,60px); font-weight:900; margin-top:14px;}
  .fhero h1 .a{color:var(--teal);}
  .fhero .lede{margin:20px 0 26px; font-size:18.5px; color:var(--ink-2); max-width:40ch;}
  .fhero .cta{display:flex; gap:12px; flex-wrap:wrap; align-items:center;}
  .fhero .facts{margin:22px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:8px;}
  @media (max-width:880px){ .fhero .wrap{grid-template-columns:1fr; gap:30px;} }

  /* illustration panel */
  .panel{background:radial-gradient(120% 120% at 50% 20%, var(--surface-2), var(--surface)); border:1px solid var(--border-strong);
    border-radius:20px; box-shadow:var(--shadow); padding:22px; position:relative;}
  .panel .cap{margin-top:14px; font-family:"IBM Plex Mono"; font-size:11px; color:var(--ink-3); line-height:1.5;}

  /* steps */
  .steps{counter-reset:s; display:grid; grid-template-columns:repeat(3,1fr); gap:16px; list-style:none; margin:0; padding:0;}
  .steps li{counter-increment:s; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:22px 22px 20px;}
  .steps li::before{content:counter(s); display:inline-grid; place-items:center; width:30px; height:30px; border-radius:50%;
    font:600 14px "IBM Plex Mono"; color:#04140f; background:var(--teal); margin-bottom:12px;}
  .steps h3{font-size:18px; font-weight:700;}
  .steps p{color:var(--ink-2); font-size:14.5px; margin:8px 0 0;}
  @media (max-width:820px){ .steps{grid-template-columns:1fr;} }

  /* FAQ */
  .faq{max-width:78ch; display:grid; gap:10px;}
  .faq details{background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:0 20px;}
  .faq details[open]{border-color:var(--border-strong);}
  .faq summary{cursor:pointer; list-style:none; padding:17px 0; font-weight:600; font-size:16px; display:flex; justify-content:space-between; gap:16px;}
  .faq summary::-webkit-details-marker{display:none;}
  .faq summary::after{content:"+"; font-family:"IBM Plex Mono"; color:var(--teal); font-size:18px; line-height:1;}
  .faq details[open] summary::after{content:"–";}
  .faq details p{margin:0 0 18px; color:var(--ink-2); font-size:15px;}

  /* related pages */
  .related{display:grid; grid-template-columns:repeat(4,1fr); gap:12px;}
  .related a{background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px; transition:.15s; display:block;}
  .related a:hover{border-color:var(--teal); transform:translateY(-2px);}
  .related b{display:block; font-family:"Archivo"; font-size:15.5px; font-weight:700;}
  .related span{display:block; color:var(--ink-3); font-size:13px; margin-top:5px; line-height:1.4;}
  @media (max-width:880px){ .related{grid-template-columns:1fr 1fr;} }
  @media (max-width:480px){ .related{grid-template-columns:1fr;} }

  /* closing band */
  .band{text-align:center; padding:80px 0;}
  .band h2{font-size:clamp(28px,4.4vw,46px); font-weight:900;}
  .band p{color:var(--ink-2); font-size:17.5px; margin:14px auto 26px; max-width:48ch;}
  .band .cta{display:flex; gap:12px; justify-content:center; flex-wrap:wrap;}
  .band .req{margin-top:20px; font-size:12.5px; color:var(--ink-3);}
  .note{font-size:13px; color:var(--ink-3); margin-top:18px; max-width:70ch;}
  footer .r{flex-wrap:wrap; row-gap:8px;}
  @media (max-width:640px){ footer .r{margin-left:0; width:100%;} }

  /* real app screenshots */
  .shots{display:flex; flex-wrap:wrap; gap:22px; align-items:flex-start;}
  .shot{margin:0; flex:0 1 auto; max-width:100%;}
  .shot.wide{flex-basis:100%;}
  .shot img{display:block; max-width:100%; height:auto; border-radius:14px; border:1px solid var(--border-strong);
    box-shadow:var(--shadow); background:#1e1e1e;}
  .shot:not(.wide) img{width:360px;}
  .shot figcaption{margin-top:10px; font-size:12.5px; color:var(--ink-3); max-width:360px; line-height:1.5;}
  .shot.wide figcaption{max-width:none;}
  .shot.half{flex:1 1 calc(50% - 11px); max-width:calc(50% - 11px);}
  .shot video{display:block; width:100%; height:auto; border-radius:14px; border:1px solid var(--border-strong); box-shadow:var(--shadow); background:#0b0b10;}
  .shot.half figcaption{max-width:none;}
  @media (max-width:760px){ .shot.half{max-width:100%; flex-basis:100%;} }

  /* top-of-page panel: real media only */
  .panel.real{padding:0; overflow:hidden; background:#0b0b10; margin:0;}
  .panel.real video{display:block; width:100%; height:auto;}
  .panel.real img{display:block; margin:0 auto; max-width:100%; height:auto; background:#1e1e1e;}
  .panel.real .cap{margin:0; padding:12px 16px; border-top:1px solid var(--border); background:var(--surface);}
