/* Clay & Glass: the website's own layer over opie.css (see the "Opie Web Redesign" canvas, Design language board).
   One tactile character (Opie, in clay) on a calm surface: warm paper, Liquid-Glass-like panels, the black island
   for everything Opie says or leads with, and the pen blue only for marks Opie draws.
   The app's tokens (opie-tokens.css) are used as they are; the few colours that exist only on the web are named here
   and never reuse a token's name. Linked on every page after opie.css and the page's own stylesheet. */

:root {
  --ground: #F4F1EC;          /* Porcelain: the page (warmer than the app's paper, to sit with the coral clay). */
  --ground-2: #ECE6DE;        /* Clay paper: bands, pedestals. */
  --ink-2: #3A3D45;           /* Secondary headings and link lists (11:1 on ground). */
  --muted-warm: #5D616B;      /* Body copy on the warm ground (5.6:1). */
  --line-warm: #E1DBD2;       /* Hairlines on the warm ground. */
  --coral: #F2553D;           /* Opie: the character, the mark, one big moment per page. Black text on it. */
  --coral-ink: #C2391F;       /* Small coral text: kickers (5.1:1 on ground). */
  --coral-wash: #FFE7DC;      /* Behind coral icons and tags. */
  --on-coral-muted: #2A0F0A;  /* Secondary text on coral (5:1). */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(40, 28, 16, 0.08);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px var(--glass-edge), 0 14px 40px -18px rgba(40, 25, 10, 0.28);
  --ease-squish: cubic-bezier(0.34, 1.56, 0.64, 1); /* Presses and character swaps: a small overshoot, like pressing clay. */
  --ease-glide: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius-card: 32px;
  --radius-band: 44px;
}

html { background: var(--ground); scroll-padding-top: 96px; }
::selection { background: var(--coral-wash); }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

/* ---------- Kicker: the small coral line above a title ---------- */
.kicker { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral-ink); }

/* ---------- Nav: a floating island ---------- */
.nav { padding: 14px var(--space-3) 0; }
.nav__island {
  width: min(100%, 980px);
  grid-template-columns: auto 1fr auto;
  min-height: 56px;
  padding: 6px 6px 6px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.nav__brand { gap: 8px; font-size: 1.1875rem; letter-spacing: -0.03em; }
.nav__brand svg { width: 26px; height: 26px; }
.nav__link { font-size: 0.9375rem; }
.nav__actions .lang { display: none; } /* The language switch lives in the footer on wide screens. */
.nav__signin { color: var(--on-island-muted); font-weight: 560; font-size: 0.9375rem; text-decoration: none; padding: 0 var(--space-3); min-height: var(--target); display: inline-flex; align-items: center; border-radius: var(--radius-pill); }
.nav__signin:hover { color: var(--on-island); background: var(--island-raised); text-decoration: none; }
.nav__signin[aria-current="page"] { color: var(--on-island); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 18px; margin-left: var(--space-2);
  border-radius: var(--radius-pill); background: var(--on-island); color: var(--island); font-weight: 650; font-size: 0.9375rem;
  text-decoration: none; white-space: nowrap; transition: background var(--dur-snap), transform 350ms var(--ease-squish);
}
.nav__cta:hover { background: var(--island-primary-hover); text-decoration: none; }
.nav__cta:active { transform: scale(0.96); }
.nav__cta svg { width: 17px; height: 17px; margin-top: -2px; } /* The Apple logo sits optically low; lift it to the text. */

@media (max-width: 860px) {
  /* The header keeps the closed island's height, so the open menu floats over the page instead of pushing it down. */
  .nav { height: 70px; align-items: flex-start; }
  .nav__island { grid-template-columns: 1fr auto auto; padding-left: 16px; border-radius: 28px; transition: border-radius var(--dur-settle) var(--ease-settle); }
  .nav__island[data-open] { border-radius: 30px; }
  .nav__cta { order: 2; margin-left: 0; }
  .nav__toggle { order: 3; width: var(--target); padding: 0; background: var(--island-raised); }
  .nav__toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav__menu { order: 4; }
  .nav__link { min-height: 56px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--on-island); }
  .nav__actions .lang { display: inline-flex; }
  .nav__actions { flex-wrap: wrap; gap: var(--space-3); }
}
@media (max-width: 420px) { .nav__cta span { display: none; } .nav__cta { padding: 0 14px; } }

/* ---------- Buttons: squish on press, glass for the quiet one ---------- */
.btn { transition: transform 350ms var(--ease-squish), background-color var(--dur-snap); }
.btn--secondary {
  background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.btn--secondary:hover { background: var(--sheet); }
.btn--lg { min-height: 56px; }

/* ---------- Cards and plans: concentric, roomier ---------- */
.card, .plan, .rows, .table-wrap { border-radius: 28px; }
.card, .plan:not(.plan--featured) { box-shadow: inset 0 0 0 1px var(--line-warm); }
.card--island { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.plan--quiet { background: var(--glass); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); box-shadow: var(--glass-shadow); }
.plan--featured { box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.65); }
.plan__amount { letter-spacing: -0.03em; }
.notice { border-radius: 20px; }

/* ---------- Page heads with Opie standing beside them ---------- */
.page-head--opie { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--space-10); }
.page-head--opie > :not(.page-head__opie) { grid-column: 1; }
.page-head__opie { grid-column: 2; grid-row: 1 / span 3; position: relative; width: clamp(150px, 20vw, 240px); align-self: end; }
.page-head__opie img { position: relative; width: 100%; }
.page-head__opie::before { content: ""; position: absolute; left: 20%; right: 20%; bottom: 6px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 30, 10, 0.32), transparent); }
@media (max-width: 640px) { .page-head--opie { grid-template-columns: minmax(0, 1fr); } .page-head__opie { grid-column: 1; grid-row: auto; width: 140px; order: -1; } }

/* ---------- Footer ---------- */
.footer { margin-top: 120px; border-top-color: var(--line-warm); color: var(--muted-warm); }
.footer__inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); }
.footer__brand .wordmark { gap: 8px; font-size: 1.25rem; letter-spacing: -0.03em; }
.footer__brand .wordmark svg { width: 28px; height: 28px; }
.footer__heading { color: var(--muted-warm); font-weight: 600; }
.footer__list a { color: var(--ink-2); }
.footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer__base { border-top-color: var(--line-warm); }
.lang { box-shadow: var(--glass-shadow); background: var(--glass); }
.lang__option[aria-current="true"] { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-warm); }
.island .lang { background: transparent; box-shadow: inset 0 0 0 1px var(--on-island-line); }
@media (max-width: 860px) { .footer__inner { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .btn, .nav__cta { transition: none; }
}
