/* NameDay marketing site — single stylesheet.
   Palette: the teal store-screenshot backgrounds (light #8CCAC8→#B2DEDC, dark #063C3D→#0A6A6C). */

/* ---------- tokens ---------- */
:root {
  --accent: #0B6E6E;
  --accent-strong: #06504F;
  --on-accent: #FFFFFF;
  --on-accent-dim: #CFE9E7;
  --bg: #E9F4F3;
  --bg-elevated: #DBEDEB;
  --card: #FFFFFF;
  --text: #0C1B1B;
  --text-dim: #566E6D;
  --border: rgba(12, 27, 27, .12);
  --gold: #8A6400;
  --hero-grad: radial-gradient(1200px 600px at 15% 0%, #0E7C7B 0%, transparent 60%),
               linear-gradient(160deg, #0A6A6C 0%, #063C3D 60%, #052E2F 100%);
  --shadow: 0 1px 2px rgba(6, 40, 39, .06), 0 12px 32px -12px rgba(6, 40, 39, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #45BFBC;
    --accent-strong: #63CECB;
    --on-accent: #04201F;
    --on-accent-dim: #BFE3E1;
    --bg: #0A1413;
    --bg-elevated: #12201F;
    --card: #162322;
    --text: #E9F3F2;
    --text-dim: #9BB3B1;
    --border: rgba(233, 243, 242, .14);
    --gold: #FFCC01;
    --hero-grad: radial-gradient(1200px 600px at 15% 0%, #0C5E5E 0%, transparent 60%),
                 linear-gradient(160deg, #0A5253 0%, #063233 60%, #041F20 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-lead { max-width: 60ch; color: var(--text-dim); font-size: 1.05rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--accent); margin: 0 0 .75rem;
}

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation-duration: .18s; }
  ::view-transition-new(root) { animation-duration: .18s; }
}
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

/* ---------- scroll-driven reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dim); font-size: .95rem; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.lang-menu { position: relative; }
.lang-menu__btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  font: inherit; font-size: .82rem; font-weight: 700; text-transform: uppercase;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.lang-menu__btn:hover { color: var(--text); }
.lang-menu__btn svg { width: 14px; height: 14px; }
.lang-menu__btn .chev { transition: transform .15s ease; }
.lang-menu:hover .lang-menu__btn .chev,
.lang-menu:focus-within .lang-menu__btn .chev,
.lang-menu.open .lang-menu__btn .chev { transform: rotate(180deg); }
.lang-menu__list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); z-index: 30;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.lang-menu:hover .lang-menu__list,
.lang-menu:focus-within .lang-menu__list,
.lang-menu.open .lang-menu__list { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: .92rem; font-weight: 600;
}
.lang-menu__list a:hover { background: var(--bg-elevated); }
.lang-menu__list a[aria-current="true"] { color: var(--accent); }
.lang-menu__list a[aria-current="true"]::after { content: "✓"; font-weight: 700; }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; border: 1px solid var(--border);
    background: var(--card); color: var(--text); border-radius: 10px;
    width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer;
  }
  .nav-links {
    position: absolute; inset: 62px 0 auto; margin: 0; flex-direction: column;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .lang-menu { padding-top: 12px; }
  .lang-menu__btn { width: 100%; justify-content: center; }
  .lang-menu__list { right: auto; left: 0; width: 100%; }
}

/* ---------- store badges ---------- */
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge-link {
  display: inline-block; border-radius: 8px;
  transition: transform .12s ease;
}
.store-badge-link:hover { transform: translateY(-2px); }
.store-badge-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.download-inner .store-badge-link:focus-visible { outline-color: var(--accent); }
.store-badge { height: 52px; width: auto; display: block; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  color: #fff;
  background: var(--hero-grad);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-top: 96px; padding-bottom: 72px;
}
.hero-logo {
  width: 150px; height: 150px; border-radius: 24%;
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .45);
  margin-bottom: 24px;
}
.hero h1 { color: #fff; }
.hero p { color: var(--on-accent-dim); font-size: 1.15rem; max-width: 46ch; }
.platform-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, #000 18%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem;
  margin-bottom: 22px;
}
.platform-badge svg { width: 16px; height: 16px; }
.hero-shots { display: flex; gap: 18px; justify-self: end; align-items: flex-start; }
.hero-shots a {
  flex: none; padding: 4px; border-radius: 30px;
  background: #0b0b0d;
  transition: transform .14s ease;
}
.hero-shots a:hover { transform: translateY(-4px); }
.hero-shots a:nth-child(2) { margin-top: 40px; }
.hero-shots img { display: block; width: min(210px, 40vw); border-radius: 26px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero p { margin-inline: auto; }
  .hero-logo { margin-inline: auto; }
  .store-buttons { justify-content: center; }
  .hero-shots { justify-self: center; }
  .hero-shots img { width: min(160px, 38vw); }
  .hero-shots a:nth-child(2) { margin-top: 28px; }
}

/* ---------- feature grid ---------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.5rem;
}
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.feature .ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  margin-bottom: 14px;
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: .3rem; }
.feature p { margin: 0; color: var(--text-dim); font-size: .96rem; }

/* ---------- calendars ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2.25rem; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 15px; font-size: .95rem; font-weight: 600;
}
.chip .flag { font-size: 1.1rem; line-height: 1; }

/* ---------- screenshots ---------- */
.shots {
  display: flex; gap: 20px; margin-top: 2.5rem; padding-block: 4px 16px;
  align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x proximity;
  scroll-padding-inline: max(20px, calc((100% - 1080px) / 2));
  padding-inline: max(20px, calc((100% - 1080px) / 2));
  scrollbar-width: thin;
}
.shots picture {
  flex: none; width: min(240px, 62vw); scroll-snap-align: start;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .28);
}
.shots img { display: block; width: 100%; }

/* ---------- download ---------- */
.download { background: var(--bg-elevated); }
.download-inner { text-align: center; }
.download-inner .section-lead { margin-inline: auto; }
.download-inner .store-buttons { justify-content: center; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--card); border-top: 1px solid var(--border);
  padding: 56px 0 40px; color: var(--text-dim); font-size: .95rem;
}
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer h4 { color: var(--text); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .85rem; }

/* ---------- legal subpage ---------- */
.legal { max-width: 74ch; padding: clamp(3rem, 7vw, 5rem) 0; }
.legal .updated { color: var(--text-dim); font-size: .9rem; margin-bottom: 1.5rem; }
.legal .legal-note {
  color: var(--text-dim); font-size: .92rem; font-style: italic;
  border-left: 3px solid var(--border); padding-left: 12px; margin-bottom: 2rem;
}
.legal .legal-lead { color: var(--text-dim); font-size: .98rem; }
.legal h2 {
  font-size: 1.12rem; margin: 2.4em 0 .6em;
  padding-top: 1.2em; border-top: 1px solid var(--border);
}
.legal h3 { font-size: 1rem; margin: 1.6em 0 .4em; color: var(--text-dim); }
.legal p, .legal li { font-size: .95rem; line-height: 1.7; }
.legal ul { padding-left: 1.3em; margin: 0 0 1rem; }
.legal li { margin-bottom: .5em; }
.legal a { color: var(--accent); }
.legal strong { color: var(--text); }
.legal .back {
  display: inline-block; margin-top: 2.5rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
}

/* ---------- a11y ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 50;
}
.skip:focus { left: 0; }
