/* RedGogglesPress — shared styles for the publisher site and app pages. */

:root {
  --bg: #fffaf5;
  --surface: #ffffff;
  --surface-soft: #fff1e6;
  --ink: #161827;
  --ink-2: #5d6274;
  --line: #f0e6dc;
  --red: #e2483d;
  --red-soft: #fde5e2;
  --sun: #f5a623;
  --ocean: #0e9aa7;
  --brand: #e2483d;
  --brand-soft: #fde5e2;
  --shadow: 0 10px 30px rgba(40, 20, 10, 0.07);
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14131a;
    --surface: #1e1d26;
    --surface-soft: #2a2027;
    --ink: #f4f1ee;
    --ink-2: #a9a6b3;
    --line: #2f2d38;
    --red-soft: #3a2125;
    --brand-soft: #2b2540;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14131a;
  --surface: #1e1d26;
  --surface-soft: #2a2027;
  --ink: #f4f1ee;
  --ink-2: #a9a6b3;
  --line: #2f2d38;
  --red-soft: #3a2125;
  --brand-soft: #2b2540;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--brand); }

img { max-width: 100%; display: block; }

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 760px; }

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}

/* Red Goggles Press DBA wordmark (1080×327, 3× for Retina, shown at 44px high). */
.logo img { height: 44px; width: auto; }

@media (max-width: 560px) {
  .logo img { height: 38px; }
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}

.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  padding-block: 48px 40px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 18px auto 14px;
  max-width: 820px;
  font-size: clamp(36px, 6.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 .hl {
  background: linear-gradient(90deg, var(--red), var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  margin: 0 auto;
  max-width: 640px;
  color: var(--ink-2);
  font-size: clamp(17px, 2.2vw, 20px);
}

.hero .actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn:hover { filter: brightness(1.05); }

/* Sections */

section { padding: 36px 0; }

.section-title {
  margin: 0 0 6px;
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.02em;
}

.section-sub { margin: 0 0 26px; color: var(--ink-2); }

/* App cards */

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.app-card:hover { transform: translateY(-3px); }

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.app-icon svg { width: 34px; height: 34px; }

.app-card h3 { margin: 16px 0 4px; font-size: 20px; letter-spacing: -0.01em; }

.app-card p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }

.badge {
  align-self: flex-start;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge.live { background: #e3f6ea; color: #1b8a4b; }
.badge.soon { background: var(--surface-soft); color: var(--ink-2); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.live { background: #1d3427; color: #6fd69a; }
}

.platform {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Values */

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.value {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.value .emoji { font-size: 28px; }
.value h3 { margin: 8px 0 4px; font-size: 18px; }
.value p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* Mission banner */

.mission {
  margin: 12px 0 0;
  padding: 36px 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #e2483d, #f5a623);
  color: #fff;
  text-align: center;
}

.mission h2 { margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -0.02em; }
.mission p { margin: 0 auto; max-width: 620px; font-size: 18px; opacity: 0.95; }

/* Footer */

.site-footer {
  margin-top: 40px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.site-footer a { color: var(--ink-2); }

.heart { color: var(--red); }

/* Document pages (terms, privacy, support) */

.doc { padding-block: 24px 8px; }

.doc h1 { margin: 0 0 4px; font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; }

.doc .updated { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; }

.doc .item {
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc .item h2 { margin: 0 0 4px; font-size: 18px; }
.doc .item p { margin: 0; color: var(--ink-2); }

.back { display: inline-block; margin-bottom: 18px; font-weight: 600; text-decoration: none; }

/* Phrase Attic theme */

.theme-phraseattic {
  --brand: #5b3de0;
  --brand-soft: #f1eefe;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-phraseattic { --brand: #8c76ff; --brand-soft: #2b2540; }
}

.app-hero {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-block: 36px 24px;
}

@media (min-width: 820px) {
  .app-hero { grid-template-columns: 1.2fr 1fr; }
}

.app-hero h1 { margin: 14px 0 12px; font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }

.app-hero .lead { margin: 0; color: var(--ink-2); font-size: 19px; }

.app-hero .big-icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: var(--shadow); }

.phone {
  justify-self: center;
  width: min(320px, 100%);
  padding: 18px;
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.phone .card {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.phone .card.current { background: var(--brand-soft); box-shadow: inset 0 0 0 1px transparent; }
.phone .card .n { font-size: 13px; color: var(--ink-2); }
.phone .card .t { margin-top: 4px; font-weight: 700; font-size: 18px; line-height: 1.3; }
.phone .card .tr { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; }
.feature h3 { margin: 14px 0 4px; font-size: 18px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }

/* Lesson link page */

.lesson-box {
  margin: 24px auto;
  max-width: 560px;
  padding: 28px 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.lesson-box .big-icon { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 14px; }
.lesson-box h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.lesson-box .langs { color: var(--ink-2); margin: 0 0 18px; }
.lesson-box .code { display: inline-block; margin: 6px 0 22px; padding: 10px 22px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font: 800 28px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.lesson-box .btn { width: 100%; }
.lesson-box .hint { margin: 18px 0 0; color: var(--ink-2); font-size: 15px; }
.lesson-box .preview { margin: 18px 0 0; padding: 0; list-style: none; text-align: left; }
.lesson-box .preview li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.lesson-box .preview li span { display: block; color: var(--ink-2); }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; line-height: 1; }
.store-badge span { line-height: 1.15; text-align: left; }

@media (max-width: 560px) {
  .nav { display: none; }
  .hero { padding-top: 28px; }
}

/* Phrase Attic: hero legal/contact links, screenshots, pricing, contact */

.price-line { margin: 18px 0 0; color: var(--ink-2); font-size: 16px; }
.price-line strong { color: var(--ink); }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.legal-links a:hover { filter: brightness(0.97); text-decoration: underline; }

.device {
  justify-self: center;
  margin: 0;
  width: min(300px, 78vw);
}

.device img,
.gallery img {
  width: 100%;
  height: auto;
  border-radius: 34px;
  box-shadow: 0 0 0 8px #15161d, 0 24px 50px rgba(30, 20, 70, 0.22);
}

.gallery {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 10px 24px;
  margin: 0 -10px;
}

.gallery figure {
  flex: 0 0 min(220px, 62vw);
  margin: 0;
  scroll-snap-align: start;
}

.gallery img { border-radius: 26px; box-shadow: 0 0 0 6px #15161d, 0 14px 30px rgba(30, 20, 70, 0.18); }

.gallery figcaption {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

.plan {
  position: relative;
  padding: 28px 26px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line);
}

.plan.featured {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 40px rgba(91, 61, 224, 0.35);
}

.plan-tag {
  position: absolute;
  top: -13px;
  left: 26px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sun);
  color: #161827;
  font-size: 13px;
  font-weight: 800;
}

.plan-name { font-size: 17px; font-weight: 700; opacity: 0.85; }

.plan-price {
  margin: 6px 0 14px;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-price span { font-size: 18px; font-weight: 600; letter-spacing: 0; opacity: 0.75; }

.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plan li { padding-left: 26px; position: relative; font-size: 16px; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--brand); }
.plan.featured li::before { color: #fff; }

.pricing-note {
  max-width: 640px;
  margin: 22px auto 0;
  text-align: center;
  color: var(--ink-2);
  font-size: 15px;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border-radius: 26px;
  background: var(--brand-soft);
}

.contact-card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.contact-card p { margin: 0; color: var(--ink-2); }

/* Phrase Attic hero: offer card, phone-only hiding */

.offer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff4d6, #ffe7c2);
  box-shadow: inset 0 0 0 1.5px #f5c46b;
  color: #161827;
  text-decoration: none;
}

.offer-card:hover { filter: brightness(1.02); }
.offer-icon { flex: none; font-size: 30px; line-height: 1; }
.offer-text { flex: 1; font-size: 18px; line-height: 1.35; }
.offer-text span { font-size: 15px; color: #5d6274; }
.offer-arrow { flex: none; font-size: 22px; font-weight: 700; color: #b46f00; }

@media (max-width: 819px) {
  .hide-mobile { display: none; }
}

/* Voice video stub */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #15161d;
  box-shadow: var(--shadow);
}

.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-stub {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  color: #fff;
  background: radial-gradient(circle at 30% 20%, #3b2a8f, #15161d 70%);
}

.video-stub strong { font-size: 19px; margin-top: 8px; }
.video-stub span:last-child { color: rgba(255, 255, 255, 0.7); font-size: 15px; }

.video-play {
  display: grid;
  place-items: center;
  width: 72px;
  height: 52px;
  border-radius: 16px;
  background: #ff0033;
  color: #fff;
}

.voice-steps { margin: 20px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.voice-steps strong { color: var(--ink); }

/* Find a lesson: big flags + fields */

.find-box { margin: 0; text-align: left; }

.flag-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.flag-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 14px;
  border-radius: 18px;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.flag-option:hover { box-shadow: inset 0 0 0 3px var(--brand); color: var(--brand); }

.flag-option:hover { transform: translateY(-2px); }

.flag-legend { margin: 0 0 10px; }

.flag-option img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.field {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}


.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Lesson list: /phraseattic/learn/{language} */

.learn-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 12px; }
.learn-head h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.02em; }
.learn-flag { width: 72px; height: 48px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.1); }

.translation-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.translation-filter .field { flex: 1; margin: 0; }

.learn-status { padding: 18px 20px; border-radius: 18px; background: var(--surface-soft); color: var(--ink-2); }

.lesson-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.lesson-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lesson-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); }

.lesson-thumb {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--brand-soft);
}

/* Lessons without an image: the title's first letter on the brand colour. */
div.lesson-thumb {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 38px;
  font-weight: 800;
}

.lesson-body { flex: 1; min-width: 0; }
.lesson-card h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.01em; }

/* The title link covers the whole card, so anywhere but the copy button opens the lesson. */
.lesson-link { color: var(--ink); text-decoration: none; }
.lesson-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lesson-link:focus-visible { outline: none; }
.lesson-card:has(.lesson-link:focus-visible) { box-shadow: var(--shadow), 0 0 0 3px var(--brand); }

@media (max-width: 420px) {
  .lesson-card { gap: 12px; padding: 12px; }
  .lesson-thumb { width: 76px; height: 76px; border-radius: 14px; }
  div.lesson-thumb { font-size: 30px; }
}

.lesson-meta { margin: 0; color: var(--ink-2); font-size: 15px; }

.lesson-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

.lesson-code {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 700 14px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.translation-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

/* Copy button for lesson codes */

.copy-code {
  position: relative; /* above the card's stretched link */
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  min-width: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font: 700 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  cursor: pointer;
}

.copy-code:hover { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.copy-code:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.copy-code.copied { color: #1b8a4b; box-shadow: inset 0 0 0 1.5px #1b8a4b; }

.code-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 22px; }
.code-row .code { margin: 0; }
.code-row .copy-code { height: 46px; min-width: 46px; padding: 0 12px; border-radius: 14px; font-size: 15px; }
.code-row .copy-code svg { width: 22px; height: 22px; }

.lesson-box .big-icon.lesson-cover { width: 160px; height: 160px; border-radius: 28px; object-fit: cover; box-shadow: var(--shadow); }

.lesson-back { display: block; max-width: 560px; margin: 8px auto 0; }
