/* ============================================================
   WordClimb — shared styles
   Identity: Blue #0A84FF → Indigo #5856D6 → Purple #AF52DE
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* brand */
  --blue:   #0A84FF;
  --indigo: #5856D6;
  --purple: #AF52DE;
  --grad: linear-gradient(120deg, #0A84FF 0%, #5856D6 52%, #AF52DE 100%);
  --grad-soft: linear-gradient(120deg, #0A84FF12 0%, #5856D612 50%, #AF52DE12 100%);

  /* light surfaces */
  --bg:        #F2F2F7;
  --bg-2:      #EAEAF0;
  --card:      #FFFFFF;
  --card-2:    #F7F7FB;
  --ink:       #11121A;
  --ink-2:     #3C3C4399;   /* secondary label, apple style */
  --ink-3:     #3C3C4366;
  --line:      #00000010;
  --line-2:    #0000001A;
  --shadow-sm: 0 1px 2px #1c1c2e0a, 0 2px 8px #1c1c2e0a;
  --shadow-md: 0 4px 16px #1c1c2e12, 0 1px 3px #1c1c2e0a;
  --shadow-lg: 0 24px 60px -16px #1c1c2e2e, 0 8px 24px -8px #1c1c2e1a;
  --shadow-glow: 0 30px 80px -20px #5856d655;

  /* type */
  --display: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* layout */
  --container: 1140px;
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 32px;
  --nav-h: 60px;
}

[data-theme="dark"] {
  --bg:        #0E0E11;
  --bg-2:      #161619;
  --card:      #1C1C1E;
  --card-2:    #2C2C2E;
  --ink:       #F5F5F7;
  --ink-2:     #EBEBF599;
  --ink-3:     #EBEBF566;
  --line:      #FFFFFF12;
  --line-2:    #FFFFFF1F;
  --grad-soft: linear-gradient(120deg, #0A84FF1f 0%, #5856D61f 50%, #AF52DE1f 100%);
  --shadow-sm: 0 1px 2px #0000004d;
  --shadow-md: 0 6px 20px #00000055;
  --shadow-lg: 0 30px 70px -16px #00000099;
  --shadow-glow: 0 30px 90px -20px #5856d666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: #5856d63a; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--display);
  font-weight: 600; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: inline-block; margin-bottom: 18px;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.h-display { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.h2 { font-size: clamp(30px, 4.2vw, 50px); letter-spacing: -.03em; }
.h3 { font-size: clamp(21px, 2.4vw, 27px); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); line-height: 1.5; font-weight: 400; }
.muted { color: var(--ink-2); }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.measure { max-width: 620px; }
.measure-sm { max-width: 540px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: 980px; border: none; cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -8px #5856d6aa; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px #5856d6cc; }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-text { padding: 8px 0; color: var(--indigo); font-weight: 600; }
.btn-text:hover { gap: 12px; }
[data-theme="dark"] .btn-text { color: #8e8cff; }

/* ---------- app store badge ---------- */
.appstore-badge { transition: transform .2s, filter .2s; display: inline-block; }
.appstore-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.appstore-badge svg { height: 54px; width: auto; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}

/* ---------- pill / chip ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 980px; font-size: 13.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
  transition: background .4s;
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.mark { width: 30px; height: 30px; flex: none; }
.mark.lg { width: 88px; height: 88px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 8px 14px; border-radius: 980px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--card); }
.nav-links a.active { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line-2); cursor: pointer; color: var(--ink-2);
  transition: transform .18s, color .2s, box-shadow .2s; box-shadow: var(--shadow-sm);
}
.icon-btn:hover { transform: translateY(-1px); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-toggle {
  display: flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 980px;
  padding: 3px; box-shadow: var(--shadow-sm);
}
.lang-toggle button {
  border: none; background: none; cursor: pointer; font-family: var(--body); font-weight: 600;
  font-size: 13px; padding: 5px 11px; border-radius: 980px; color: var(--ink-2); transition: .2s;
}
.lang-toggle button.active { background: var(--grad); color: #fff; }
.nav-cta { display: inline-flex; }
.menu-btn { display: none; }

@media (max-width: 920px) {
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 2px;
    background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(20px);
    padding: 14px 20px 22px; border-bottom: 1px solid var(--line); transform: translateY(-120%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1); margin-left: 0; align-items: stretch; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 17px; border-radius: 12px; }
  .menu-btn { display: grid; margin-left: auto; }
  .nav-cta { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 64px 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h4 { font-family: var(--display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer a { color: var(--ink-2); font-size: 15px; transition: color .2s; }
.footer a:hover { color: var(--ink); }
.footer-brand p { color: var(--ink-2); font-size: 15px; max-width: 280px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; }
.footer-social { display: flex; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .footer-brand { grid-column: 1 / -1; } }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }
.reveal.d5 { transition-delay: .35s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
/* verification escape hatch: ?noanim or .no-anim disables motion + forces reveal */
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }
.no-anim .reveal { opacity: 1 !important; transform: none !important; }

/* ============================================================
   IPHONE FRAME  (shared component)
   ============================================================ */
.phone {
  --w: 300px;
  width: var(--w); aspect-ratio: 300 / 620; position: relative; flex: none;
  background: #0a0a0c; border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #ffffff14, 0 0 0 1px #00000040;
}
[data-theme="dark"] .phone { box-shadow: var(--shadow-lg), inset 0 0 0 2px #ffffff1f; }
.phone-screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden; position: relative;
  background: var(--scr-bg, #F2F2F7); color: #11121A;
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #0a0a0c; border-radius: 16px; z-index: 30;
}
.scr-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px 6px; font-size: 13px; font-weight: 700; font-family: var(--display); color: #11121A; z-index: 20;
}
.scr-status .dots { display: flex; gap: 5px; align-items: center; }
.scr-body { flex: 1; overflow: hidden; position: relative; }

/* generic app UI atoms used inside screens */
.app-grad-head { background: var(--grad); color: #fff; }
.app-card { background: #fff; border-radius: 16px; box-shadow: 0 2px 10px #1c1c2e10; }

@media (max-width: 520px) { .phone { --w: 270px; } }

/* real screenshot variant: match screenshot aspect, hide synthetic chrome */
.phone.shot { aspect-ratio: 1206 / 2622; padding: 10px; }
.phone.shot .phone-screen { background: #000; }
.phone.shot .phone-notch { display: none; }
.phone-shot-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
