/* Shared stylesheet for HelloVozi blog articles (ES + EN). */

:root {
  --ink: #241A4E;
  --ink-soft: #3A2F63;
  --muted: #5C5380;
  --muted2: #8A80A8;
  --purple: #6C5CE7;
  --purple-dark: #5B4FE0;
  --orange: #E15C33;
  --bg: #F5F3FC;
  --card: #FFFFFF;
  --tint: #EDE9FA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

a { color: var(--purple-dark); }

::selection { background: #DCD6FA; }

a:focus-visible,
button:focus-visible,
.cta-box a.btn:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  color: var(--ink);
}

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(245, 243, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 26, 78, 0.08);
  gap: 12px;
  flex-wrap: wrap;
}
nav a.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
}
nav a.brand span { color: var(--purple); }
nav a.home-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 90px;
}

/* Breadcrumbs — sits above <main>, not inside it (matches approved design). It's a <nav>, which
   also matches the generic `nav` selector above — without an explicit reset here it inherits
   that rule's position:sticky/top:0/z-index:50/backdrop-filter, and on mobile (where the main
   nav wraps to more than one line) both navs try to stick to the same y:0 spot, causing the
   real nav to get visually sliced/duplicated by the breadcrumb painting over it on scroll. */
.breadcrumbs {
  position: static;
  z-index: auto;
  background: none;
  backdrop-filter: none;
  max-width: 720px;
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted2);
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.breadcrumbs a { color: var(--muted2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; }
.breadcrumbs .current { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(225, 92, 51, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  margin: 24px 0 22px;
}

h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: pretty;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13.5px;
  color: var(--muted2);
  margin: 0 0 16px;
}
.meta-row__byline { color: var(--muted2); }
.meta-row__date { color: var(--muted2); }
.meta-row__readtime { color: var(--muted2); }
.meta-row__sep { color: rgba(138, 128, 168, 0.5); }

.lede { font-size: 18px; color: #4A4066; margin: 0 0 28px; }

/* Headline stat block — the single most-cited number ("83/123"), pulled out
   as its own visual unit rather than buried in a paragraph. */
.headline-stat {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: white;
  border-radius: 24px;
  padding: 34px 30px;
  margin: 0 0 20px;
}
.headline-stat::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 92, 51, 0.3), transparent 70%);
}
.headline-stat__number {
  position: relative;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 52px;
  line-height: 1;
}
.headline-stat__number span { color: var(--orange); }
.headline-stat__label {
  position: relative;
  color: #C9BEEE;
  font-size: 15px;
  line-height: 1.6;
  max-width: 46ch;
  margin: 14px 0 0;
}

/* Hero image — fixed aspect ratio so a pending placeholder never shifts layout
   once the real asset is dropped in. */
.hero-media { margin: 0 0 32px; }
.hero-media__frame {
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: 20px;
  overflow: hidden;
  display: block;
}
.hero-media__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media figcaption { font-size: 12.5px; color: var(--muted2); margin-top: 8px; }

/* Generic placeholder block, used for the hero image and the app screenshot
   until real assets exist. Deliberately looks like a placeholder, not a
   fake photo. */
.media-placeholder {
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: 16px;
  border: 2px dashed rgba(36, 26, 78, 0.22);
  background: repeating-linear-gradient(
    135deg,
    rgba(36, 26, 78, 0.03),
    rgba(36, 26, 78, 0.03) 10px,
    rgba(36, 26, 78, 0.06) 10px,
    rgba(36, 26, 78, 0.06) 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  margin: 0 0 32px;
}
.media-placeholder.screenshot { aspect-ratio: 9 / 16; max-width: 360px; margin-left: auto; margin-right: auto; }
.media-placeholder p {
  font-size: 13.5px;
  color: var(--muted2);
  margin: 0;
  max-width: 46ch;
}
.media-placeholder code {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

article h2 { font-size: 25px; line-height: 1.3; letter-spacing: normal; margin: 0 0 16px; }
article p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 28px; }
article strong { color: var(--ink); }
article ul { margin: 0 0 18px; padding-left: 22px; }
article li { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 10px; }
article li strong { color: var(--ink); }

/* Methodology callout — visible near the headline stat, not just a footnote.
   Orange, not purple: this is a caveat, not a brand action — matches the
   orange = "pay attention" convention used for the lowest-skill tag below. */
.methodology-note {
  background: #FCEAE3;
  border-left: 3px solid var(--orange);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin: 0 0 32px;
}
.methodology-note p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}
.methodology-note strong { color: var(--ink); }

/* Skills chart — semantic HTML/CSS bars, no image, no chart dependency.
   Labels and numeric values are always visible as text, never color-only. */
.skills-chart { margin: 24px 0 8px; padding: 0; }
.skills-chart figcaption {
  font-size: 13px;
  color: var(--muted2);
  margin: 0 0 14px;
}
.skills-chart__list { list-style: none; margin: 0; padding: 0; }
.skills-chart__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 16px;
}
.skills-chart__label {
  grid-column: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.skills-chart__value {
  grid-column: 2;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* CEFR-equivalent badge — same padding/border-radius as .skills-chart__tag, in a neutral
   gray/purple so it doesn't compete visually with the orange "lowest scores" tag. */
.skills-chart__cefr {
  grid-column: 3;
  justify-self: end;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--tint);
  padding: 3px 9px;
  border-radius: 10px;
}
.skills-chart__track {
  grid-column: 1 / -1;
  background: var(--tint);
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
}
.skills-chart__bar {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--purple);
}
/* "Weak tier" = within 20 points of Ecuador's lowest score, not only the
   single lowest value — currently flags both Speaking and Listening. */
.skills-chart__row--weak .skills-chart__label { color: var(--orange); }
.skills-chart__row--weak .skills-chart__bar { background: var(--orange); }
.skills-chart__tag {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--orange);
  background: #FCEAE3;
  padding: 3px 9px;
  border-radius: 10px;
  margin-top: 2px;
}
.skills-chart__scale {
  font-size: 12.5px;
  color: var(--muted2);
  margin: 4px 0 0;
}
.skills-chart__cefr-note {
  font-size: 12.5px;
  color: var(--muted2);
  margin: 4px 0 0;
}
.skills-chart__source {
  font-size: 12.5px;
  color: var(--muted2);
  margin: 12px 0 0;
}

/* Numbered explanation list — hypotheses/possible-explanations items, each with a numbered
   circle badge and a bold lead-in sentence. */
.explanation-list { display: flex; flex-direction: column; margin: 0 0 32px; }
.explanation-list__item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #E1DFE8; }
.explanation-list__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--purple-dark);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.explanation-list__item p { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0; }
.explanation-list__item strong { color: var(--ink); }

/* Help/practice list — dot-marker items with a divider (replaces a plain <ul> so it doesn't
   visually collide with the numbered-circle explanation list above it). */
.help-list { display: flex; flex-direction: column; margin: 0 0 32px; }
.help-list__item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #E1DFE8; }
.help-list__dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--purple-dark); margin-top: 8px; }
.help-list__item p { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.help-list__item strong { color: var(--ink); }

/* Understand-vs-respond explainer — simple 3-step editorial diagram, HTML/CSS only. */
.explainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 8px;
}
.explainer__step {
  background: var(--card);
  border: 1px solid #E1DFE8;
  border-radius: 16px;
  padding: 20px 18px;
  text-align: left;
}
.explainer__step h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-dark);
  margin: 0 0 8px;
}
.explainer__step p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Product highlight — placeholder/real screenshot beside a short description
   of the real in-app action, placed near the CTA. */
.product-highlight {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--tint);
  border-radius: 20px;
  padding: 22px;
  margin: 0 0 24px;
}
.product-highlight .media-placeholder {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 536 / 545;
  margin: 0;
}
.product-highlight__frame {
  /* 300px (not the old 220px): this holds a landscape UI screenshot
     (topic-selection-screen.png, 803x547) full-bleed, no crop — at 220px
     its on-screen text (search bar, topic labels) was too small to read. */
  flex-shrink: 0;
  width: 300px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid #E1DFE8;
  overflow: hidden;
  box-shadow: 0 8px 24px -12px rgba(36, 26, 78, 0.2);
  line-height: 0;
}
.product-highlight__frame img { width: 100%; height: auto; display: block; }
.product-highlight__text { flex: 1; min-width: 200px; }
.product-highlight__text p { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

.cta-box__eyebrow {
  color: var(--orange);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cta-box h2 {
  color: white;
  font-size: 22px;
  margin: 0 0 10px;
}

.cta-box {
  background: var(--ink);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 44px 0;
  text-align: center;
}
.cta-box p { color: #C9BEEE; font-size: 15px; margin: 0 0 18px; }
.cta-box a.btn {
  display: inline-block;
  background: var(--purple-dark);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 28px;
  border-radius: 24px;
}

.altlang { margin: 36px 0 0; font-size: 14px; }

.source-block {
  font-size: 13px;
  color: var(--muted2);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(36, 26, 78, 0.08);
}
.source-block h2 {
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 10px;
}
.source-block ul { margin: 0 0 12px; padding-left: 18px; }
.source-block li { margin: 0 0 6px; }
.source-block p { margin: 0; }

footer { text-align: center; padding: 32px 24px; color: var(--muted2); font-size: 13px; }

/* Keep every element inside the reading column — no horizontal overflow. */
article, .skills-chart, .explainer { max-width: 100%; }
img, svg { max-width: 100%; }

/* ~768px and below: collapse the nav's scroll-anchor links (same breakpoint and same items
   hidden as the home page's isMobile state — La idea/Cómo funciona/Historias/Preguntas only
   make sense as same-page scroll targets on the home page). Logo, Blog, the ES/EN toggle and
   Crear cuenta stay visible, matching the home nav's mobile behavior exactly. */
@media (max-width: 768px) {
  nav { padding: 14px 18px; }
  nav .nav-link-scroll { display: none; }
}

/* ~360px small phones: single-column, no fixed widths that could force
   horizontal scroll (explainer grid, headline-stat number size). */
@media (max-width: 480px) {
  main { padding: 28px 16px 64px; }
  .lede { font-size: 15.5px; }
  article h2 { font-size: 20px; }
  article p, article li { font-size: 15.5px; }
  .explainer { grid-template-columns: 1fr; }
  .cta-box { padding: 24px 18px; }
  .headline-stat__number { font-size: 36px; }
  .skills-chart__row { grid-template-columns: 1fr; }
  .skills-chart__value { grid-column: 1; justify-self: start; }
  .skills-chart__cefr { grid-column: 1; justify-self: start; }
}

/* ~768px tablets: reading column already fits inside 720px main, this tier
   only needs to loosen outer page padding back up from the phone value. */
@media (min-width: 481px) and (max-width: 900px) {
  main { padding: 48px 32px 80px; }
}

@media (prefers-contrast: more) {
  article p, article li, .cta-box p { color: var(--ink); }
}

/* =====================================================================
   BLOG INDEX (/blog/) — listing page, separate from the single-article
   reading column above. Cards need more horizontal room than the 720px
   article measure, so this gets its own wider main variant instead of
   changing the shared `main` rule used by every post page.
   ===================================================================== */

.blog-index-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 24px 90px;
}
.blog-index-main .lede { max-width: 60ch; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin: 8px 0 0;
}

/* Single post card. Whole card is one <a> (valid in HTML5 — a block-level
   link can wrap a heading + paragraph), so the entire card is clickable,
   not just the title. */
.post-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid #E1DFE8;
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover { box-shadow: 0 12px 28px -14px rgba(36, 26, 78, 0.28); transform: translateY(-2px); }
.post-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

.post-card__image {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: var(--tint);
  overflow: hidden;
}
.post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-card__body { padding: 20px 22px 24px; }

.post-card__tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(225, 92, 51, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.post-card__date {
  display: block;
  font-size: 12.5px;
  color: var(--muted2);
  margin-bottom: 6px;
}

.post-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 8px;
}

.post-card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
}

.post-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--purple-dark);
}

@media (max-width: 480px) {
  .blog-index-main { padding: 28px 16px 64px; }
  .post-grid { grid-template-columns: 1fr; gap: 20px; }
}
