/* LearnEnglish.here — shared styles (Home, PET flashcards, About)
   Pure CSS, no external fonts or dependencies. */

:root {
  /* Brand */
  --teal-600: #0F766E;
  --teal-700: #0B5D57;
  --teal-800: #0A4D48;
  --teal-900: #083F3B;
  --teal-100: #D3ECE8;
  --teal-50: #EEF7F5;
  --coral-500: #FF6B57;
  --coral-700: #C2412F;
  --coral-100: #FFE1DB;
  --coral-50: #FFF5F2;

  /* Neutrals */
  --ink: #16212F;
  --ink-muted: #4A5868;
  --ink-soft: #64748B;
  --line: #E4EAEE;
  --line-soft: #EEF2F4;
  --paper: #FAFCFB;
  --white: #FFFFFF;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2.125rem, 1.6rem + 2.25vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.38rem + 1.05vw, 2.375rem);
  --fs-h3: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
  --fs-lead: clamp(1.075rem, 1.02rem + .24vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .75rem;
  --fs-stat: clamp(2.25rem, 1.99rem + 1.13vw, 3rem);

  /* Space */
  --space-4: .25rem;
  --space-8: .5rem;
  --space-12: .75rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-40: 2.5rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --section-padding: clamp(4rem, 2.94rem + 4.51vw, 7.5rem);
  --container: 72rem;
  --gutter: clamp(1.25rem, .99rem + 1.13vw, 2rem);
  --gap: clamp(1rem, .7rem + 1.3vw, 1.75rem);

  /* Shape & depth */
  --radius-small: .625rem;
  --radius-medium: 1rem;
  --radius-large: 1.5rem;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(8, 63, 59, .05), 0 2px 6px rgba(8, 63, 59, .04);
  --shadow: 0 1px 2px rgba(8, 63, 59, .04), 0 10px 30px -12px rgba(8, 63, 59, .16);
  --shadow-lg: 0 2px 4px rgba(8, 63, 59, .04), 0 24px 48px -20px rgba(8, 63, 59, .28);
  --border: 1px solid var(--line);

  /* Header */
  --header-row: 4rem;
  --nav-row: 2.75rem;
  --header-height: calc(var(--header-row) + var(--nav-row) + 1px);

  --focus: 3px solid var(--coral-500);
  --motion: 160ms ease;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 var(--fs-body)/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, ul, ol { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { overflow-wrap: break-word; color: var(--ink); text-wrap: balance; }
h1 { max-width: 18ch; font-size: var(--fs-h1); font-weight: 800; line-height: 1.1; letter-spacing: -.028em; }
h2 { max-width: 30ch; font-size: var(--fs-h2); font-weight: 750; line-height: 1.18; letter-spacing: -.025em; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
p { max-width: 65ch; text-wrap: pretty; }
p + p { margin-top: var(--space-16); }
h1 + p { margin-top: var(--space-24); }
h2 + p { margin-top: var(--space-16); }
h3 + p { margin-top: var(--space-8); }
strong { font-weight: 700; }

a {
  color: var(--teal-600);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color var(--motion), background-color var(--motion), border-color var(--motion), box-shadow var(--motion), transform var(--motion);
}

a:hover, a:focus-visible { color: var(--teal-700); text-decoration: underline; }

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

section[id], main[id] { scroll-margin-top: var(--header-height); }

.container {
  width: min(var(--container), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section { padding-block: var(--section-padding); }
.tint { background: var(--teal-50); }
.coral-tint { background: linear-gradient(180deg, var(--coral-50), var(--white)); }

.label {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
  color: var(--teal-700);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.label::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--coral-500);
}

.lead { color: var(--ink-muted); font-size: var(--fs-lead); line-height: 1.6; }
.note, figcaption { color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }
.note { margin-top: var(--space-24); }
figcaption { margin-top: var(--space-16); }
figcaption strong { color: var(--ink); }

.skip-link {
  position: fixed;
  z-index: 3;
  top: var(--space-8);
  left: var(--gutter);
  padding: var(--space-8) var(--space-16);
  background: var(--white);
  border-radius: var(--radius-small);
  transform: translateY(calc(-100% - var(--space-24)));
}

.skip-link:focus { transform: none; box-shadow: var(--shadow); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.header-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "logo action" "nav nav";
  grid-template-rows: var(--header-row) var(--nav-row);
  align-items: center;
  column-gap: var(--space-12);
}

.site-logo { grid-area: logo; width: min(100%, 9.5rem); border-radius: var(--radius-small); }
.site-logo img { mix-blend-mode: multiply; }
.header-button { grid-area: action; }
.site-nav {
  grid-area: nav;
  display: flex;
  gap: var(--space-4);
  margin-inline: -5px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav a {
  flex: none;
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover, .site-nav a:focus-visible { background: var(--teal-50); color: var(--teal-700); text-decoration: none; }
.site-nav a[aria-current="page"] {
  background: var(--teal-50);
  color: var(--teal-700);
}

/* ---------- Buttons & actions ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--space-48);
  padding: 13px var(--space-24);
  background: var(--teal-600);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(8, 63, 59, .12), 0 6px 16px -6px rgba(15, 118, 110, .5);
  color: var(--white);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button:hover, .button:focus-visible {
  background: var(--teal-700);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(8, 63, 59, .12), 0 10px 22px -8px rgba(15, 118, 110, .55);
}
.button:active { transform: translateY(0); }
.header-button { min-height: 2.5rem; padding: 8px var(--space-16); font-size: var(--fs-small); box-shadow: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12) var(--space-16); margin-top: var(--space-32); }

/* Secondary links next to a primary button read as quiet outline buttons */
.actions > a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-48);
  padding: 12px var(--space-24);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--teal-700);
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.actions > a:not(.button):hover, .actions > a:not(.button):focus-visible {
  border-color: var(--teal-600);
  background: var(--teal-50);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  overflow: clip;
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(15, 118, 110, .07), transparent 70%),
    linear-gradient(180deg, var(--paper), var(--white));
}

.hero-grid, .grid { display: grid; gap: var(--gap); }
.hero-grid { align-items: center; gap: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.hero .lead { max-width: 54ch; }
.hero-visual { width: min(100%, 22rem); margin-inline: auto; }
.hero-visual img { width: 100%; }
.hero-visual > .product-image { border-radius: var(--radius-medium); box-shadow: var(--shadow-lg); }

/* Home hero: cover in front, a sample page behind it */
.hero-stack { position: relative; width: min(100%, 25rem); }
.stack {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
  padding: 6% 4% 4%;
}
.stack::before {
  content: "";
  position: absolute;
  inset: 10% 0 2% 6%;
  z-index: 0;
  border-radius: 46% 54% 48% 52% / 52% 44% 56% 48%;
  background: radial-gradient(circle at 40% 40%, var(--teal-100), var(--teal-50) 70%);
}
.stack img {
  grid-area: stack;
  position: relative;
  width: 76%;
  border: 0;
  border-radius: var(--radius-small);
}
.stack-back {
  z-index: 1;
  justify-self: end;
  margin-top: 9%;
  transform: rotate(4deg);
  box-shadow: var(--shadow);
}
.stack-front {
  z-index: 2;
  justify-self: start;
  transform: rotate(-2.5deg);
  box-shadow: var(--shadow-lg);
}
.hero-stack figcaption { text-align: center; }

.price-line { margin-top: var(--space-24); color: var(--ink-muted); }
.price-line strong { margin-inline-end: var(--space-4); color: var(--ink); font-size: var(--fs-h3); font-weight: 800; }

.trust {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-24);
  color: var(--ink-muted);
  font-size: var(--fs-small);
}

.check {
  position: relative;
  flex: 0 0 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--teal-50);
}

.check::after {
  content: "";
  position: absolute;
  top: .42rem;
  left: .38rem;
  width: .6rem;
  height: .32rem;
  border: solid var(--teal-600);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.product-image {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

/* ---------- Cards & grids ---------- */

.grid, .featured, .downloads, .faq { margin-top: var(--space-40); }
ul.grid, ol.grid, .chips, .downloads { padding: 0; list-style: none; }

.card {
  min-width: 0;
  padding: clamp(1.25rem, 1.1rem + .6vw, 1.75rem);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-sm);
}

.card p { color: var(--ink-muted); }
.accent-cards .card { position: relative; }
.accent-cards .card::before {
  content: "";
  display: block;
  width: 2rem;
  height: 4px;
  margin-bottom: var(--space-16);
  border-radius: 4px;
  background: var(--coral-500);
}

.featured {
  display: grid;
  align-items: center;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  padding: clamp(1.25rem, .9rem + 1.5vw, 2.5rem);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}
.featured-image {
  display: block;
  width: min(100%, 22rem);
  overflow: hidden;
  border-radius: var(--radius-medium);
  background: var(--teal-50);
}
.featured-image .product-image { border: 0; box-shadow: none; }
.featured-image:hover img { transform: scale(1.02); }
.featured-image img { transition: transform 300ms ease; }
.featured h3 { font-size: clamp(1.25rem, 1.15rem + .45vw, 1.5rem); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-24); }
.badge {
  display: inline-block;
  padding: 3px var(--space-12);
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-pill);
  color: var(--teal-700);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------- Product page ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  padding-top: var(--space-24);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}

.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: var(--teal-700); text-decoration: underline; }
.breadcrumb .separator { color: #A8B4BF; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.breadcrumb + .hero { padding-top: clamp(2rem, 1.64rem + 1.5vw, 3rem); background: var(--white); }

.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8) var(--space-16);
  padding-bottom: var(--space-32);
}
.subnav .label { margin: 0; }

.subnav-links {
  display: flex;
  gap: var(--space-8);
  min-width: 0;
  margin-inline: -5px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav a {
  flex: none;
  padding: 6px var(--space-16);
  scroll-margin-inline: 5px;
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--teal-700);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}

.subnav a:hover, .subnav a:focus-visible { background: var(--teal-50); border-color: var(--teal-600); text-decoration: none; }

.stats .card { display: grid; gap: var(--space-8); align-content: start; }
.stats.accent-cards .card::before { margin-bottom: var(--space-8); }
.stats strong { color: var(--teal-600); font-size: var(--fs-stat); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.stats li:last-child strong { font-size: clamp(1.45rem, 1.21rem + 1vw, 2.125rem); line-height: 1.15; }
.stats span { color: var(--ink-muted); }

.showcase-grid { max-width: 56rem; align-items: start; }
.showcase-grid img { width: 100%; }
/* The preview collage has an empty band at the bottom: crop it away */
.showcase-grid img[src$="pet-preview.png"] {
  aspect-ratio: 1674 / 1893;
  object-fit: cover;
  object-position: top;
  background: #E6E6E6;
}

.anatomy li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-16);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-muted);
}
.anatomy { row-gap: 0; }
.anatomy strong { color: var(--ink); }
.number {
  display: inline-grid;
  flex: 0 0 var(--space-32);
  width: var(--space-32);
  height: var(--space-32);
  place-items: center;
  border-radius: 50%;
  background: var(--coral-50);
  box-shadow: inset 0 0 0 1px var(--coral-100);
  color: var(--coral-700);
  font-size: var(--fs-small);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.subheading { margin-top: var(--space-64); }
.downloads { display: grid; gap: var(--space-12); margin-top: var(--space-24); }
.downloads li {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: var(--space-16);
  align-items: start;
  padding: var(--space-16) var(--space-24);
  border: var(--border);
  border-radius: var(--radius-medium);
  background: var(--white);
  color: var(--ink-muted);
}
.downloads strong { color: var(--ink); }
.downloads .badge { justify-self: start; }

.topics { gap: var(--space-12); }
.topics .card { display: flex; gap: var(--space-12); align-items: baseline; padding: var(--space-16) var(--space-24); font-weight: 600; }
.topics span { color: var(--coral-700); font-size: var(--fs-small); font-weight: 700; font-variant-numeric: tabular-nums; }

.steps { margin-top: var(--space-24); }
.steps .card { display: block; }
.steps .number { margin-bottom: var(--space-12); }
.steps strong { display: block; color: var(--ink); font-size: var(--fs-h3); }
.steps p { margin-top: var(--space-8); }

.tip {
  margin-top: var(--space-32);
  padding: var(--space-16) var(--space-24);
  border-left: 4px solid var(--coral-500);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--coral-50);
  color: var(--ink-muted);
}
.tip strong { color: var(--ink); }

.faq { display: grid; gap: var(--space-12); max-width: 52rem; }
.faq details {
  border: var(--border);
  border-radius: var(--radius-medium);
  background: var(--white);
  transition: border-color var(--motion), box-shadow var(--motion);
}
.faq details[open] { border-color: var(--teal-100); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  list-style: none;
  padding: var(--space-16) var(--space-24);
  border-radius: var(--radius-medium);
  font-weight: 650;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+" / "";
  display: grid;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-600);
  font-size: 1.125rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "−" / ""; }
.faq summary:hover, .faq summary:focus-visible { color: var(--teal-700); }
.faq details p { padding: 0 var(--space-24) var(--space-24); color: var(--ink-muted); }

.buy-band {
  padding-block: clamp(3.5rem, 2.8rem + 3vw, 5.5rem);
  background:
    radial-gradient(40rem 20rem at 90% 0%, rgba(255, 107, 87, .18), transparent 70%),
    linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: var(--white);
}
.buy-band h2 { color: var(--white); }
.buy-band .lead { color: rgba(255, 255, 255, .88); }
.button-inverse { background: var(--white); color: var(--teal-700); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35); }
.button-inverse:hover, .button-inverse:focus-visible { background: var(--teal-50); color: var(--teal-800); }

.buy-band :focus-visible, .site-footer :focus-visible {
  outline-color: var(--white);
}

/* ---------- About ---------- */

.bio-grid { margin-top: 0; }
.bio { padding: clamp(1.5rem, 1.32rem + .75vw, 2.25rem); border-radius: var(--radius-large); }
.bio-photo {
  width: 120px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: var(--space-16);
}

.bio h2 { font-size: var(--fs-h3); }
.bio-role { font-size: var(--fs-small); }
.bio-avatar {
  width: 128px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24%;
  margin-bottom: var(--space-16);
  box-shadow: var(--shadow-sm);
}

.team-grid { margin-top: var(--space-24); }
.team-card { padding: var(--space-24); background: var(--paper); box-shadow: none; }
.team-card .tip { margin-top: var(--space-16); padding-inline: var(--space-16); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: var(--space-64) var(--space-40);
  background: var(--teal-900);
  color: rgba(255, 255, 255, .9);
}

.footer-brand {
  display: inline-block;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-small);
}
.footer-brand img { width: 9rem; }
.footer-tagline { margin-top: var(--space-16); color: var(--white); font-weight: 500; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); margin-top: var(--space-24); }
.site-footer nav a { color: rgba(255, 255, 255, .85); font-weight: 500; text-decoration: none; }
.site-footer nav a:hover, .site-footer nav a:focus-visible { color: var(--white); text-decoration: underline; }
.site-footer a { color: inherit; }
.footer-notes {
  margin-top: var(--space-32);
  padding-top: var(--space-24);
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .68);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.footer-notes p + p { margin-top: var(--space-8); }

/* ---------- Breakpoints ---------- */

@media (min-width: 600px) {
  .stats, .topics, .audience-grid, .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .format-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  :root { --header-row: 4.5rem; --nav-row: 0px; }
  .header-layout {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "logo nav action";
    grid-template-rows: var(--header-row);
    column-gap: var(--space-24);
  }
  .site-logo { width: min(100%, 10.5rem); }
  .header-button { padding-inline: var(--space-24); font-size: var(--fs-body); }
  .site-nav a { font-size: .9375rem; }
  .anatomy, .bio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-48); }
  .featured { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
  .hero-visual { width: min(100%, 24rem); }
  .hero-stack { width: min(100%, 28rem); }
  .stats, .audience-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (hover: none) {
  .featured-image:hover img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, .button, .featured-image img, .faq details { transition: none; }
  .button:hover, .button:focus-visible, .featured-image:hover img { transform: none; }
}

@media print {
  .site-header, .skip-link, .button, .buy-band, .subnav, a[href^="https://hieric.gumroad.com/"] { display: none; }
  .section, .site-footer { padding-block: var(--space-24); }
  .hero, .tint, .coral-tint, .site-footer { background: var(--white); color: var(--ink); }
  .footer-notes { color: var(--ink-muted); }
  .footer-brand { display: none; }
  .product-image, .featured, .card, .stack img { box-shadow: none; }
  .stack::before { display: none; }
  figure, .card, .faq details { break-inside: avoid; }
}
