/* ═══════════════════════════════════════════════════════════════════════════
   soe.css — Sounds of English, the pronunciation half of Native Phrase Lab
   (Oct 2026). Shared by the homepage, /phrase-lab/, /apps/ and /sounds/.

   Its own palette, taken from the Sound Atlas itself: parchment, sea teal,
   coral. It always appears inside Phrase Lab's world, so it never uses
   Willowbrook's meadow green.
   ═══════════════════════════════════════════════════════════════════════ */
:root { --soe-paper: #F4ECDC; --soe-sea: #2E7C7A; --soe-sea-2: #24625F; --soe-sea-soft: #D7ECE8; --soe-coral: #D9583F; --soe-ink: #1E2633; }

/* the section and its parts (first written for /phrase-lab/#sounds) */
.soe { --soe-paper: #F4ECDC; --soe-sea: #2E7C7A; --soe-sea-soft: #D7ECE8; --soe-coral: #D9583F; --soe-ink: #1E2633;
  background: radial-gradient(ellipse at 15% 0%, #FBF6EC 0%, var(--soe-paper) 55%, #EADFC8 100%); overflow: hidden; }
.soe::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(120,95,50,.035) 0 2px, transparent 2px 9px); }
.soe .xw { position: relative; }
.soe-head .xh2 em { color: var(--soe-sea); }
.soe-head .xlede { max-width: 46ch; }
.soe-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(46,124,122,.25); font-weight: 650; font-size: .92rem; color: var(--soe-ink); }
.soe-badge b { padding: 3px 9px; border-radius: 999px; background: var(--soe-coral); color: #fff; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }

.soe-stage { position: relative; max-width: 1040px; margin: clamp(36px, 5vw, 64px) auto 0; padding-right: clamp(60px, 13%, 150px); }
.soe-laptop .laptop-screen { background: var(--soe-paper); }
.soe-flip > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.soe-flip .soe-b { animation: soeMouth 9s ease-in-out infinite; }
.soe-chip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: grid; padding: 8px 16px; border-radius: 999px; background: rgba(30,38,51,.88); color: #fff; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.soe-chip > span { grid-area: 1 / 1; text-align: center; }
.soe-chip-a { animation: soeLabelA 9s ease-in-out infinite; }
.soe-chip-b { animation: soeMouth 9s ease-in-out infinite; }
@keyframes soeMouth { 0%, 38% { opacity: 0; } 48%, 88% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes soeLabelA { 0%, 38% { opacity: 1; } 48%, 88% { opacity: 0; } 98%, 100% { opacity: 1; } }
.soe-phone { position: absolute; right: 0; bottom: -26px; width: clamp(150px, 23%, 240px); }
.soe-phone .phone { max-width: none; border-radius: 34px; padding: 8px; }
.soe-phone .phone-screen { border-radius: 27px; background: var(--soe-paper); }
.soe-phone .phone::after { display: none; }
.soe-note { left: -6px; top: -34px; color: var(--soe-coral); }

.soe-steps { list-style: none; padding: 0; margin: clamp(60px, 7vw, 90px) 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: none; }
.soe-steps li { padding: 20px 18px; border-radius: 20px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(30,38,51,.08); display: grid; gap: 6px; align-content: start; }
.soe-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soe-sea); color: #fff; font-weight: 800; font-size: .95rem; box-shadow: inset 0 0 0 3px #fff, 0 0 0 1.5px var(--soe-sea); }
.soe-steps li:nth-child(even) span { background: var(--soe-coral); box-shadow: inset 0 0 0 3px #fff, 0 0 0 1.5px var(--soe-coral); }
.soe-steps b { font-family: var(--f-display); font-size: 1.3rem; font-variation-settings: 'opsz' 32, 'wdth' 92, 'wght' 760; color: var(--soe-ink); }
.soe-steps p { color: var(--ink-2); font-size: .95rem; line-height: 1.45; }

.soe-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(40px, 5vw, 64px); }
.soe-ticks { gap: 16px; }
.soe-ticks li::before { background-color: var(--soe-sea); }
.soe-ticks span { color: var(--ink-2); line-height: 1.5; }
.soe-ticks b { color: var(--soe-ink); }
.soe-try { padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; box-shadow: 0 0 0 2px var(--soe-sea), var(--shadow-3); }
.soe-try-k { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--soe-coral); }
.soe-try-h { font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.05; letter-spacing: -.03em; font-variation-settings: 'opsz' 64, 'wdth' 90, 'wght' 780; color: var(--soe-ink); }
.soe-try p { color: var(--ink-2); }
.soe-try .soe-try-h { color: var(--soe-ink); }
.soe-try .soe-free-k { color: var(--soe-ink); }
.soe-try .ipa { color: var(--soe-sea); font-weight: 700; }
.soe-try .xbtn-lab { background: var(--soe-sea); box-shadow: 0 10px 24px -10px rgba(46,124,122,.8); } .soe-try .xbtn-lab:hover { background: #24625F; }
.soe-try .xsmall a { color: var(--soe-ink); font-weight: 700; }

@media (max-width: 1000px) {
  .soe-steps { grid-template-columns: repeat(3, 1fr); }
  .soe-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .soe-stage { padding-right: 0; margin-bottom: 40px; }
  .soe-phone { width: 30%; right: -6px; bottom: -40px; }
  .soe-note { top: -30px; left: 0; }
  .soe-steps { grid-template-columns: 1fr 1fr; }
  .soe-chip { font-size: .78rem; padding: 6px 12px; bottom: 8px; left: 38%; }
}
@media (prefers-reduced-motion: reduce) {
  .soe-flip .soe-b, .soe-chip-a, .soe-chip-b { animation: none; }
  .soe-flip .soe-b, .soe-chip-b { opacity: 0; }
}

/* a sea-coloured button, for "try it" links to the Sound Atlas */
.xbtn-soe { background: var(--soe-sea); box-shadow: 0 10px 24px -10px rgba(46,124,122,.8); }
.xbtn-soe:hover { background: var(--soe-sea-2); }

/* the four free sounds, as stamps that open straight into the game.
   Each one is a deep link: /sounds/play/#/sound/<id> */
.soe-free { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.soe-free a { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 5px 16px 5px 5px; border-radius: 999px; background: #fff; color: var(--soe-ink); text-decoration: none; font-weight: 700; font-size: 1rem; box-shadow: 0 0 0 1px rgba(30,38,51,.12), 0 6px 14px -10px rgba(30,38,51,.45); transition: transform .3s var(--ease-out), box-shadow .3s; }
.soe-free a:hover { color: var(--soe-ink); transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--soe-sea), 0 10px 20px -10px rgba(46,124,122,.6); }
.soe-free .ipa { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--soe-ink); font-family: var(--f-ipa); font-size: 1.2rem; font-weight: 400; line-height: 1; box-shadow: inset 0 0 0 2px var(--soe-sea), inset 0 0 0 4px #fff, inset 0 0 0 5px rgba(46,124,122,.45); }
.soe-free-k { font-weight: 700; font-size: .92rem; color: var(--soe-ink); }

/* ── the trailer slot ──────────────────────────────────────────────────────
   Any element with data-soe-trailer is a reserved place for the Sounds of
   English trailer (being made separately). Today it simply shows its poster
   picture. When the video exists, fill in ONE of these on the element:
     data-src="/video/soe/trailer.mp4"  (+ optional data-vtt="….vtt" captions)
     data-youtube="VIDEO_ID"
   and soe.js adds a "Watch the trailer" button. The video starts only when
   the visitor presses it, with sound and controls (James's rule: nothing
   plays by itself). */
[data-soe-trailer] { position: relative; }
.soe-play { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 26px 0 10px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--soe-ink); font-family: var(--f-display); font-size: 1.1rem; font-variation-settings: 'opsz' 24, 'wdth' 96, 'wght' 700; cursor: pointer; box-shadow: 0 18px 40px -14px rgba(30,38,51,.6); transition: transform .3s var(--ease-out); }
.soe-play:hover { transform: scale(1.04); }
.soe-play-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--soe-coral); color: #fff; }
.soe-play-ic svg { width: 16px; height: 16px; fill: currentColor; margin-left: 3px; }
[data-soe-trailer].is-playing .soe-play, [data-soe-trailer].is-playing .soe-chip { display: none; }
[data-soe-trailer] > .soe-video { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }

/* ── homepage: the pronunciation section, high on the page ─────────────── */
.hero-new { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 22px; padding: 8px 18px 8px 8px; border-radius: 999px; background: #fff; color: var(--soe-ink); text-decoration: none; font-size: 1rem; line-height: 1.35; box-shadow: 0 0 0 1px rgba(46,124,122,.3), 0 12px 26px -14px rgba(46,124,122,.7); transition: box-shadow .3s, transform .3s var(--ease-out); }
@keyframes soeIn { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: no-preference) { .hero-new { animation: soeIn 1s var(--ease-out) .6s both; } }
.hero-new:hover { color: var(--soe-ink); box-shadow: 0 0 0 2px var(--soe-sea), 0 14px 30px -14px rgba(46,124,122,.8); }
.hero-new > b { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--soe-coral); color: #fff; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-new strong { color: var(--soe-sea); }
.hero-new .arr { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soe-sea-soft); color: var(--soe-sea); font-weight: 800; transition: transform .35s var(--ease-out); }
.hero-new:hover .arr { transform: translateY(3px); }
.fact-soe b { color: var(--soe-sea); }
@media (max-width: 560px) { .hero-new { font-size: .95rem; padding-right: 12px; border-radius: 22px; } }
.soe-home .soe-head .xh2 { max-width: 15ch; }
.soe-home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: center; margin-top: clamp(30px, 4vw, 50px); }
.soe-home .soe-stage { margin: 0; max-width: none; padding-right: clamp(56px, 17%, 150px); }
.soe-home .soe-try { gap: 16px; }
.soe-home .soe-try .ticks { gap: 10px; font-size: 1rem; }
.soe-home .soe-try .ticks li::before { background-color: var(--soe-sea); }
.soe-price { padding-top: 14px; border-top: 1px solid rgba(30,38,51,.1); color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.soe-price b { color: var(--soe-ink); }
.soe-price a { color: var(--soe-ink); font-weight: 700; white-space: nowrap; }
@media (max-width: 1000px) {
  .soe-home-grid { grid-template-columns: 1fr; }
  .soe-home .soe-stage { max-width: 720px; width: 100%; margin-inline: auto; }
}
@media (max-width: 600px) {
  .soe-home .soe-stage { padding-right: 0; margin-bottom: 30px; }
  .soe-home .soe-try .xbtn { width: 100%; }
}

/* ── /apps/: the band under the two app cards ─────────────────────────── */
.soe-apps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 3.5vw, 48px); align-items: center; margin-top: 20px; padding: clamp(14px, 1.6vw, 20px); padding-right: clamp(20px, 3.5vw, 48px); border-radius: 32px; background: radial-gradient(ellipse at 0% 0%, #FBF6EC, var(--soe-paper) 60%, #EADFC8); box-shadow: 0 0 0 1px rgba(30,38,51,.08), var(--shadow-2); }
.soe-apps-img { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: 0 0 0 1px rgba(30,38,51,.12); }
.soe-apps-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soe-apps-copy { display: grid; gap: 16px; justify-items: start; }
.soe-apps-copy .xh3 { color: var(--soe-ink); font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); }
.soe-apps-copy p { color: var(--ink-2); font-size: 1.1rem; line-height: 1.5; max-width: 46ch; }
.soe-apps-copy p b { color: var(--soe-ink); }
@media (max-width: 900px) {
  .soe-apps { grid-template-columns: 1fr; padding: 12px 12px 26px; }
  .soe-apps-copy { padding: 0 10px; }
}
/* language trailer: the full trailer is one tap away */
.soe-play-alt { top: calc(50% + 58px); min-height: 40px; padding: 0 18px; font-size: .95rem; background: rgba(30,38,51,.78); color: #fff; }
.soe-play-end { top: auto; bottom: 14px; translate: -50% 0; min-height: 44px; padding: 0 20px; font-size: 1rem; }
[data-soe-trailer].is-playing .soe-play-end { display: inline-flex; }
[data-soe-trailer].has-trailer .soe-chip { display: none; }
