/* OneMoreCard — marketing site
   Design language: paper-white editorial canvas, oversized serif display type,
   one coral-red accent (the app's own lined-card margin rule), generous
   rounding, whispered elevation. See Assets/Marketing/OneMoreCard-Brand-Marketing-Concept.md */

:root {
  --paper: #faf9f6;
  --paper-card: #ffffff;
  --ink: #15151a;
  --graphite: #46454e;
  --smoke: #7b7a85;
  --mist: #eeece7;
  --hairline: #e4e1da;
  --accent: #ff3b30;
  --accent-ink: #c81e14;
  --accent-soft: #ffe6e3;
  --focus-ring: rgba(255, 59, 48, 0.35);

  --radius-card: 26px;
  --radius-card-lg: 32px;
  --radius-pill: 999px;
  --radius-input: 14px;

  --shadow-glow: 0 1px 2px rgba(20, 20, 25, 0.04), 0 16px 40px -16px rgba(20, 20, 25, 0.14);
  --shadow-soft: 0 1px 1px rgba(20, 20, 25, 0.03), 0 6px 20px -10px rgba(20, 20, 25, 0.10);

  --max-width: 1180px;

  --font-display: ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Scroll reveal (progressive enhancement: .js-motion is only
   added by main.js when IntersectionObserver exists and the visitor hasn't
   asked for reduced motion — content is fully visible without it) ---------- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js-motion [data-reveal="left"] { transform: translateX(-34px); }
.js-motion [data-reveal="right"] { transform: translateX(34px); }
.js-motion [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal] { transition: none !important; opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

[hidden] { display: none !important; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.rule {
  width: 46px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  margin: 18px 0 0;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: #000; box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px -12px rgba(255, 59, 48, 0.55);
}
.btn-accent:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(255, 59, 48, 0.65); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow .3s ease;
}
.site-nav.is-scrolled { box-shadow: 0 1px 0 rgba(20,20,25,0.03), 0 18px 30px -24px rgba(20,20,25,0.25); }
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
  transition: height .3s ease;
}
.site-nav.is-scrolled .wrap { height: 64px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a { color: var(--graphite); transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: #fff;
}
.lang-switch button {
  border: none;
  background: transparent;
  padding: 6px 13px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  color: var(--smoke);
  cursor: pointer;
}
.lang-switch button.active { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #dfe6fb 0%, #eef0fb 35%, #f7f3f8 60%, var(--paper) 100%);
}
.hero .wrap {
  padding-top: 22px;
  padding-bottom: 10px;
}
.hero-media {
  border-radius: var(--radius-card-lg);
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-media { animation: heroFloat 7s ease-in-out infinite; }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0 46px;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--smoke);
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.08;
}
.section-head p {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--smoke);
}
.section-head .rule { margin-left: auto; margin-right: auto; }
.section-alt { background: #fff; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* ---------- Feature showcase gallery ---------- */
.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 28px 26px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 999px; }
.gallery-card {
  flex: 0 0 auto;
  width: 250px;
  scroll-snap-align: start;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--mist);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}
.gallery-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.gallery-card img { width: 100%; height: auto; }
.gallery-shell { max-width: var(--max-width); margin: 0 auto; }

/* ---------- Bento feature grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.bento .card { padding: 34px; }
.b-span-4 { grid-column: span 4; }
.b-span-2 { grid-column: span 2; }
.b-span-3 { grid-column: span 3; }
.b-span-6 { grid-column: span 6; }

.card {
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.feature-card:hover, .algo-card:hover, .style-swatch:hover, .price-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}
.feature-card:hover .feature-icon { background: var(--accent); color: #fff; }
.feature-icon { transition: background .25s ease, color .25s ease; }

.feature-card h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}
.feature-card p { color: var(--smoke); font-size: 0.98rem; }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }

.media-frame {
  border-radius: 20px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--hairline);
}

/* ---------- Algorithms ---------- */
.algo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.algo-card {
  padding: 26px 22px;
}
.algo-card:hover { border-color: var(--accent); }
.algo-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.algo-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.algo-card p { font-size: 0.9rem; color: var(--smoke); }

/* ---------- Split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split.reverse .split-copy { order: 2; }
.split-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; margin-bottom: 18px; }
.split-copy p { color: var(--smoke); font-size: 1.02rem; }
.split-media img {
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-glow);
}
.check-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; font-size: 0.96rem; color: var(--graphite); }
.check-list svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--accent); margin-top: 1px; }

/* ---------- Mini flip-card demo (Study mode) ---------- */
.mini-demo {
  perspective: 1400px;
  margin: 30px 0 0;
}
.mini-demo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
}
.mini-demo-card.is-flipped { transform: rotateY(180deg); }
.mini-demo-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  /* Paper texture — mirrors OneMoreCard's "lined" card style: a full-bleed
     red header rule (~44px down) over faint blue ruled lines (~28px pitch,
     see CardPaperBackground.swift), painted as the card background so it
     sits behind the text without extra elements or z-index (which break
     backface-visibility during the flip in WebKit). border-radius clips
     it to the rounded corners on its own. */
  background:
    linear-gradient(rgba(255, 59, 48, 0.5), rgba(255, 59, 48, 0.5)) no-repeat 0 44px / 100% 1.5px,
    repeating-linear-gradient(to bottom, rgba(37, 99, 235, 0.15) 0 1px, transparent 1px 28px) 0 46px,
    #fff;
}
/* Both faces carry an explicit rotateY so Safari keeps them in the card's
   3D space and honours backface-visibility during the flip. */
.mini-demo-front { transform: rotateY(0deg); }
.mini-demo-back { transform: rotateY(180deg); }
.mini-demo-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.mini-demo-q, .mini-demo-a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 16px;
}
.mini-demo-hint {
  margin-top: auto;
  font-size: 0.76rem;
  color: var(--smoke);
}
.mini-demo-pills {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.mini-demo-pills .pill {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  border-radius: 999px;
  background: var(--mist);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--graphite);
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.mini-demo-pills .pill.is-active {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .mini-demo-card { transition: none; }
  .mini-demo-pills .pill { transition: none; }
}

/* ---------- Stats strip ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.stat-tile {
  padding: 24px 20px;
  text-align: center;
}
.stat-tile .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--ink);
  font-weight: 600;
}
.stat-tile .num.pulse { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js-motion .stat-tile.is-visible .num.pulse { animation: statPulse 2.2s ease-in-out .9s 1; }
}
@keyframes statPulse {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.18); }
  50% { transform: scale(0.98); }
  65% { transform: scale(1.06); }
}
.stat-tile .lbl {
  font-size: 0.82rem;
  color: var(--smoke);
  margin-top: 6px;
}

/* ---------- Card styles spotlight ---------- */
.style-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.style-swatch {
  padding: 22px 18px 26px;
  text-align: left;
}
.style-swatch .paper-demo {
  height: 90px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  background-color: #fff;
}
.style-swatch h3 { font-size: 0.98rem; }

.paper-rule { color: #aebdea; }
.paper-lined { background-image: repeating-linear-gradient(to bottom, transparent 0 15px, currentColor 15px 16px); color: #aebdea; }
.paper-lined::before { content:''; position:absolute; left:18px; top:0; bottom:0; width:2px; background:var(--accent); }
.paper-grid { background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px); background-size: 14px 14px; color: #aebdea; }
.paper-dotted { background-image: radial-gradient(currentColor 1.3px, transparent 1.5px); background-size: 14px 14px; color: #9a99a6; }
.paper-blank {}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.price-card li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--graphite); }
.price-card li svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.price-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}
.price-card { padding: 36px; }
.price-card.highlight { border-color: var(--accent); box-shadow: var(--shadow-glow); position: relative; }
.price-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.price-tag { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); margin: 14px 0 4px; }
.price-sub { font-size: 0.85rem; color: var(--smoke); margin-bottom: 22px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-card-lg);
  padding: 64px 44px;
  text-align: center;
  margin: 0 28px;
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-band p { color: rgba(255,255,255,0.7); margin-top: 14px; font-size: 1.02rem; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--accent-soft); }
.cta-band .hero-cta-row { padding-top: 30px; padding-bottom: 0; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 60px 0 34px;
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer-brand p { color: var(--smoke); font-size: 0.92rem; margin-top: 14px; max-width: 280px; }
.footer-col h4 {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 0.92rem; color: var(--graphite); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--smoke);
}

/* ---------- Legal pages ---------- */
.legal-page { padding: 64px 0 100px; }
.legal-page .wrap { max-width: 760px; }
.legal-page h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); margin-bottom: 10px; }
.legal-updated { color: var(--smoke); font-size: 0.85rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.25rem; margin: 40px 0 12px; }
.legal-page p, .legal-page li { color: var(--graphite); font-size: 0.98rem; line-height: 1.75; }
.legal-page ul { padding-left: 22px; }
.legal-page a.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-card {
  padding: 28px 30px;
  margin-bottom: 10px;
}
.legal-intro { font-size: 1.05rem; color: var(--graphite); margin-bottom: 8px; }

.timeline { margin-top: 30px; display: grid; gap: 16px; }
.timeline-row { display: grid; grid-template-columns: 80px 1fr; gap: 18px; font-size: 0.94rem; }
.timeline-row .yr { font-family: var(--font-display); color: var(--accent); font-weight: 600; }

/* ---------- Responsive ---------- */
.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;
}

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .b-span-4, .b-span-3, .b-span-2, .b-span-6 { grid-column: span 2; }
  .algo-grid { grid-template-columns: repeat(2, 1fr); }
  .style-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; flex: 0 0 auto; }
  .nav-right { gap: 8px; }
  .nav-right > a.btn { display: none; }
  .brand { font-size: 1rem; min-width: 0; }
  .brand img { flex: 0 0 auto; }
  .site-nav .wrap { gap: 8px; padding: 0 16px; }
  .lang-switch { flex: 0 0 auto; }
  section { padding: 64px 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-badge { position: static; transform: none; display: inline-block; margin-bottom: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band { margin: 0 16px; padding: 44px 24px; }
  .wrap { padding: 0 20px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(21, 21, 26, 0.4);
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 84vw);
  height: 100%;
  background: var(--paper);
  padding: 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: -20px 0 40px rgba(0,0,0,0.15);
}
.mobile-nav-panel a { font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  width: 38px; height: 38px;
}
