/* Notemory landing page. The app's own tokens (Theme+Standard.swift): coral accent, warm light and
   deep dark backgrounds, Bricolage Grotesque for display, DM Sans for text. No frameworks. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("fonts/BricolageGrotesque-Bold.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("fonts/DMSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/DMSans-SemiBold.woff2") format("woff2"); }

:root {
  --bg: #F4F2EE; --surface: #FFFFFF; --elevated: #FFFFFF; --border: #E8E5DF;
  --text: #16181D; --muted: #5E6470; --faint: #686D77;
  --accent: #FF6A4D; --on-accent: #14100E; --accent-text: #B8361E; --accent-wash: #FFE6DF;
  --blue: #5B8CFF; --lime: #B6F04A; --violet: #A78BFA; --amber: #FFB547; --mint: #3DD6B0;
  --shadow: 0 24px 60px -24px rgba(22, 24, 29, .28), 0 2px 8px rgba(22, 24, 29, .06);
  --frame: #1B1E25;
  --radius-card: 28px; --radius: 20px; --radius-small: 12px;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "DM Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1015; --surface: #171A21; --elevated: #1D212A; --border: #252A33;
    --text: #F3F4F6; --muted: #A3A9B5; --faint: #8A919D;
    --accent-text: #FF8A70; --accent-wash: #2B1A16;
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 2px 8px rgba(0, 0, 0, .4);
    --frame: #2A2F39;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }
.overline { font: 600 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }

/* Scroll progress (scroll-driven where supported). */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 40; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* Header */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--border); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); }
.icon-link:hover { color: var(--text); background: var(--surface); }
.icon-link svg { width: 20px; height: 20px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { border: 0; background: none; font: 600 .8rem/1 var(--body); color: var(--muted); padding: 8px 10px; border-radius: 999px; cursor: pointer; min-width: 40px; min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 860px) { .nav { display: none; } .tools { margin-left: auto; } }
@media (max-width: 420px) { .tools .icon-link.social { display: none; } }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 14px; font: 600 1rem/1 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn svg { width: 20px; height: 20px; }
.store small { display: block; font-size: .72rem; font-weight: 600; opacity: .75; margin-bottom: 3px; }
.store .label { display: block; text-align: left; line-height: 1.05; }
.store[aria-disabled="true"] { cursor: default; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 40px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 800; }
.hero h1 .sub { display: block; color: var(--accent-text); font-size: .55em; margin-top: .25em; letter-spacing: -0.01em; }
.hero .lead { margin: 22px 0 30px; max-width: 34em; }
.hero-shot { position: relative; }
.glow { position: absolute; inset: -8% -14% -10% -6%; background: radial-gradient(closest-side, rgba(255, 106, 77, .30), rgba(255, 106, 77, .12) 55%, rgba(255, 106, 77, 0)); z-index: -1; pointer-events: none; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-shot { max-width: 520px; } }

/* Device frame around the iPad screenshots */
.device { background: var(--frame); padding: 2.2%; border-radius: clamp(18px, 2.6vw, 34px); box-shadow: var(--shadow); }
.device img { border-radius: clamp(10px, 1.6vw, 20px); width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface); }
.device.crop img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Story sections */
.story { padding: clamp(56px, 10vw, 120px) 0; }
.story .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 6vw, 80px); align-items: center; }
.story.flip .text { order: 2; }
.story .wrap:has(.pair) { grid-template-columns: .8fr 1.35fr; }
.story.flip .wrap:has(.pair) { grid-template-columns: 1.35fr .8fr; }
.story .text { display: grid; gap: 18px; max-width: 32em; }
.story .points { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; color: var(--muted); }
.story .points li { position: relative; padding-left: 28px; }
.story .points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px; border-radius: 5px; background: var(--dot, var(--accent)); }
.shots { position: relative; display: grid; }
.shots.pair { grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.shots.pair .device:nth-child(2) { margin-top: 18%; }
.chip { display: inline-flex; align-items: center; gap: 8px; align-self: start; justify-self: start; padding: 8px 14px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-text); font-weight: 600; font-size: .85rem; }
.tag { font-size: .8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; margin-left: 6px; white-space: nowrap; }
@media (max-width: 860px) {
  .story .wrap, .story .wrap:has(.pair), .story.flip .wrap:has(.pair) { grid-template-columns: 1fr; }
  .story.flip .text { order: 0; }
  .shots { max-width: 560px; }
}

/* Cards (privacy, plans) */
.band { padding: clamp(56px, 10vw, 120px) 0; }
.band header.intro { display: grid; gap: 14px; max-width: 40em; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 26px; display: grid; gap: 12px; align-content: start; }
.card .sym { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-text); }
.card .sym svg { width: 22px; height: 22px; }
.card p { color: var(--muted); }
.plan { position: relative; }
.plan h3 { font-size: 1.6rem; }
.plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.plan ul li { padding-left: 22px; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }
.plan.featured { border: 2px solid var(--accent); }
.plan .badge { justify-self: start; font: 600 .78rem/1 var(--body); padding: 6px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.note { margin-top: 18px; color: var(--faint); font-size: .95rem; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 700 1.4rem/1 var(--display); color: var(--accent-text); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* Closing call and footer */
.cta { text-align: center; padding: clamp(56px, 10vw, 110px) 0; }
.cta .wrap { display: grid; justify-items: center; gap: 22px; }
.cta img { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); }
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--muted); font-size: .95rem; }
footer .wrap { display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(3, 1fr); }
footer h4 { margin: 0 0 10px; color: var(--text); font: 700 1rem/1.2 var(--display); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }
footer .fine { grid-column: 1 / -1; font-size: .85rem; color: var(--faint); }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .about { grid-column: 1 / -1; } }

/* Motion: revealed as they enter the screen; images drift slightly with the scroll where the
   browser supports scroll-driven animations. All of it off with Reduce Motion. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay { transition-delay: .12s; }
.no-js .reveal { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  .drift { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes drift { from { translate: 0 6%; } to { translate: 0 -6%; } }
  .tilt { animation: tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  @keyframes tilt { from { transform: perspective(1400px) rotateX(14deg) scale(.94); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .drift, .tilt, .progress { animation: none !important; }
  .progress { display: none; }
  .faq summary::after { transition: none; }
}
