/* Shared styles for every page on heyframe.se: light and calm. The homepage adds home.css. */

/* Fonts are self-hosted: the latin subsets of the variable fonts (from @fontsource-variable in site-src). */
@font-face { font-family: 'Gabarito'; src: url('/fonts/gabarito.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Arial tuned to the real fonts' size and line metrics, so text barely moves when they arrive */
@font-face { font-family: 'Gabarito Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Arial'); font-weight: 400 900; size-adjust: 94.98%; ascent-override: 98.97%; descent-override: 27.37%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('ArialMT'); size-adjust: 107.06%; ascent-override: 90.49%; descent-override: 22.56%; line-gap-override: 0%; }

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3f0eb;
  --ink: #211f24;
  --text: #211f24;
  --muted: #67616d;
  --line: rgba(33, 31, 36, 0.1);
  --line-2: rgba(33, 31, 36, 0.16);
  --orange: #ff5a1f; /* brand orange: buttons (with ink text), dots, the play */
  --orange-2: #ff7a45;
  --orange-ink: #c2410c; /* orange for small text on light backgrounds (4.9:1) */
  --orange-text: #f04e14; /* orange for big headline words (3.4:1) */
  --radius: 20px;
  --display: 'Gabarito', 'Gabarito Fallback', system-ui, sans-serif;
  --body: 'Inter', 'Inter Fallback', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(33, 31, 36, 0.04), 0 8px 24px -12px rgba(33, 31, 36, 0.12);
  --shadow-lg: 0 2px 4px rgba(33, 31, 36, 0.04), 0 30px 60px -24px rgba(33, 31, 36, 0.25);
  /* older names, still used by generated demo pages */
  --paper: var(--surface-2);
  --coral: var(--orange);
  --cream: var(--surface);
  --dim: var(--muted);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
main { overflow-x: clip; } /* decorative glows bleed past their column; never let them widen the page */
a { color: inherit; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.4vw, 58px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
p, li { text-wrap: pretty; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.small { font-size: 14px; color: var(--muted); }
.eyebrow, .kicker { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--orange-ink); }
.lead { font-size: clamp(18px, 1.45vw, 20px); color: var(--muted); }

/* jump straight past the header with the keyboard */
.skip { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border: 0; border-radius: 12px;
  background: var(--orange); color: var(--ink); font: 600 16px var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 6px 16px -6px rgba(255, 90, 31, 0.6);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: #ff6a33; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 10px 22px -8px rgba(255, 90, 31, 0.7); }
.btn:active { transform: none; }
.btn:disabled { cursor: progress; opacity: 0.7; transform: none; }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px rgba(33, 31, 36, 0.3), var(--shadow); }
.play-ico { display: inline-block; width: 0; height: 0; margin-right: 2px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #ff5a1f; }
.btn-small { padding: 9px 16px; font-size: 14px; border-radius: 10px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; flex: none; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: clamp(8px, 2vw, 24px); }
.menu-btn { display: none; position: relative; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease), opacity 0.2s; }
.menu-btn span { top: 19px; }
.menu-btn span::before, .menu-btn span::after { content: ''; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); background: var(--ink); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); background: var(--ink); }
@media (max-width: 800px) {
  .brand img { height: 30px; }
  .top-actions { margin-left: auto; }
  .nav { display: none; }
  .js .menu-btn { display: block; }
  .menu-open .nav {
    position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px clamp(16px, 4vw, 48px) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(33, 31, 36, 0.25);
  }
  .menu-open .nav a { padding: 14px 4px; font-size: 18px; color: var(--text); border-top: 1px solid var(--line); }
  .menu-open .nav a:first-child { border-top: 0; }
}
@media (max-width: 359px) { .brand img { height: 26px; } .top .btn-small { padding: 8px 12px; font-size: 13px; } }

/* ---------------------------------------------------------------- footer */
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 56px; font-size: 15px; color: var(--muted); }
.foot p { margin: 12px 0 0; max-width: 26em; }
.foot .slogan { color: var(--text); font: 700 18px var(--display); letter-spacing: -0.01em; }
.foot-nav, .foot-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foot-nav a, .foot-links a { color: var(--text); text-decoration: none; }
.foot-nav a:hover, .foot-links a:hover { color: var(--orange-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- lightbox */
dialog#lightbox { width: min(1100px, 94vw); padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--text); overflow: visible; box-shadow: var(--shadow-lg); }
dialog#lightbox::backdrop { background: rgba(33, 31, 36, 0.55); backdrop-filter: blur(6px); }
dialog#lightbox video { width: 100%; max-height: 80vh; border-radius: 18px 18px 0 0; background: #000; }
.lb-title { margin: 0; padding: 14px 20px; font: 700 18px var(--display); }
.close { position: absolute; top: -16px; right: -16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
@media (max-width: 600px) { .close { top: -50px; right: 0; } }

/* ---------------------------------------------------------------- simple pages (privacy, thanks, 404, demo) */
.page { max-width: 760px; margin: 0 auto; padding: 64px clamp(16px, 4vw, 48px) 96px; }
.page h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 24px; }
.page h2 { font-size: 26px; margin: 36px 0 8px; }
.page p, .page li { color: var(--muted); }
.page a:not(.btn) { color: var(--text); }
.page .eyebrow, .page .kicker { color: var(--orange-ink); }
.page .actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.next-steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.next-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); color: var(--text); }
.next-steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; font: 700 15px var(--display); }
.next-steps strong { display: block; font: 700 18px var(--display); letter-spacing: -0.01em; }
.next-steps span { color: var(--muted); }
