/* Pensar's pages, in the app's Amazon theme (design/pensar/handoff/tokens.json). Light only. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/pensar/fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/pensar/fonts/SourceSerif4-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/pensar/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/pensar/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #F4EDDF;
  --surf: #FFFBF2;
  --ink: #1B2230;
  --ink-2: #2A3346;
  --muted: #454E5C;
  --meta: #5E6674;          /* darker than the app's #6E7684: 4.5:1 on paper for small web text */
  --line: #DED3BF;
  --clay: #C0431C;
  --clay-dark: #9E3514;
  --clay-text: #B03C18;     /* clay for text on light surfaces (4.5:1); fills and lines keep --clay */
  --clay-on-ink: #F08A63;
  --sage: #1F6A57;
  --sand: #F7E4C2;
  --sand-line: #E4CB9C;
  --on-ink: #F4EDDF;
  --on-ink-muted: #B9C0CC;

  --serif: "Source Serif 4", "New York", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --gutter: 16px;
  --reading: 680px;
  --wide: 1100px;
  --radius: 8px;
  --ease: cubic-bezier(.3, .7, .4, 1);
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

a { color: var(--clay-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-dark); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surf); padding: 8px 12px; z-index: 2; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wide { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header (every page) ---------- */

.site-header {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing .site-header { max-width: var(--wide); padding: 18px var(--gutter); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 20px/1 var(--serif);
  padding: 4px 0;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand:hover { color: var(--ink); }
.header-link { color: var(--muted); text-decoration: none; padding: 10px 0; font-size: 16px; }
.header-link:hover { color: var(--clay-text); text-decoration: underline; }

/* ---------- Launch state: <html data-launch="soon|live"> picks the call to action ---------- */

[data-launch="soon"] .if-live,
[data-launch="live"] .if-soon { display: none !important; }

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 30px; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 54px; width: auto; }
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 17px/1 var(--sans);
}
.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay-on-ink);
}
.qr { display: none; align-items: center; gap: 12px; font-size: 14px; color: var(--meta); max-width: 13em; line-height: 1.35; }
.qr img { width: 76px; height: 76px; background: #fff; padding: 6px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .qr { display: inline-flex; }
}
.fine { margin: 14px 0 0; font-size: 15px; color: var(--meta); }

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

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 64px;
}
.hero h1 {
  font-size: clamp(40px, 10vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; }
.lede { margin: 22px 0 0; font-size: 19px; color: var(--muted); max-width: 30em; }

/* The reading card: Pensar's reader, live. Underlined words show their meaning. */
.reader {
  position: relative;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px 22px;
  box-shadow: 0 1px 2px rgba(27, 34, 48, 0.06), 0 24px 48px -28px rgba(27, 34, 48, 0.35);
  max-width: 480px;
  justify-self: center;
  width: 100%;
}
.reader h2 { margin: 0; font-size: 27px; }
.coach { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; font-size: 15px; color: var(--meta); }
.coach img { width: 46px; height: auto; flex: none; }
.reader-text { margin: 14px 0 0; font: 400 20px/1.75 var(--serif); }

.w {
  position: relative;
  border-bottom: 2px solid var(--clay);
  cursor: help;
  outline: none;
}
.w:focus-visible { background: var(--sand); border-radius: 2px; }
.gloss {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 14px/1.2 var(--sans);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out, transform 160ms var(--ease);
  z-index: 1;
}
.gloss::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--ink);
}
.w:hover .gloss,
.w:focus .gloss { opacity: 1; transform: translate(-50%, 0); }

.english summary {
  display: inline-block;
  margin-top: 6px;
  color: var(--clay-text);
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
}
.english summary::-webkit-details-marker { display: none; }
.english[open] summary { color: var(--meta); }
.english p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.reader-next {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 20px;
  border-radius: 6px;
  background: var(--clay);
  color: #fff;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
}
.reader-next:hover { background: var(--clay-dark); color: #fff; }

/* ---------- The loop (ink band) ---------- */

.loop { background: var(--ink); color: var(--on-ink); padding: 72px 0; }
.loop h2 { font-size: clamp(30px, 6.5vw, 46px); line-height: 1.12; max-width: 17em; }
.steps {
  display: grid;
  gap: 28px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 0 14px; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--clay-on-ink);
  color: var(--clay-on-ink);
  display: grid;
  place-items: center;
  font: 600 20px/1 var(--serif);
}
.steps h3 { font-size: 22px; margin-top: 8px; }
.steps p { margin: 6px 0 0; color: var(--on-ink-muted); }

/* ---------- Features ---------- */

.features { padding-top: 80px; padding-bottom: 32px; }
.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-bottom: 72px;
}
.feature h2 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; }
.feature p { margin: 14px 0 0; font-size: 18px; color: var(--muted); max-width: 26em; }
.feature .what { margin: 0 0 10px; font: 600 15px/1 var(--sans); color: var(--clay-text); }

.screen {
  margin: 0;
  justify-self: center;
  width: min(300px, 78vw);
  border-radius: 28px;
  overflow: hidden;
  background: var(--surf);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -34px rgba(27, 34, 48, 0.45);
}
.screen img { display: block; width: 100%; height: auto; }

/* ---------- Whose Spanish (sand band) ---------- */

.varieties { background: var(--sand); padding: 72px 0; border-block: 1px solid var(--sand-line); }
.varieties h2 { font-size: clamp(30px, 6.5vw, 46px); line-height: 1.1; max-width: 15em; }
.varieties .intro-text { margin: 16px 0 0; font-size: 18px; color: var(--muted); max-width: 34em; }
.cool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.cool li {
  background: var(--surf);
  border: 1px solid var(--sand-line);
  border-radius: var(--radius);
  padding: 16px;
}
.cool .say-it { display: block; font: 600 clamp(20px, 5.4vw, 26px)/1.15 var(--serif); white-space: nowrap; }
.cool .from { display: block; margin-top: 8px; font-weight: 600; }
.cool .city { display: block; font-size: 14px; color: var(--meta); }
.cool-caption { margin: 14px 0 0; font-size: 15px; color: var(--muted); }

/* ---------- Grown-ups ---------- */

.grownups { padding-top: 80px; padding-bottom: 72px; }
.grownups h2 { font-size: clamp(30px, 6.5vw, 46px); }
.promises { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.promises li { padding-left: 30px; position: relative; font-size: 18px; color: var(--muted); max-width: 30em; }
.promises li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--sage);
  border-bottom: 2.5px solid var(--sage);
  transform: rotate(-45deg);
}
.promises strong { color: var(--ink); }

/* ---------- FAQ (landing + support) ---------- */

.faq-section { padding-bottom: 80px; }
.faq-section h2 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  position: relative;
  font: 600 18px/1.35 var(--serif);
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--meta);
  border-bottom: 2px solid var(--meta);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 160ms cubic-bezier(.32, .72, 0, 1);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 12px; color: var(--muted); }

/* ---------- Last call (ink) ---------- */

.last { background: var(--ink); color: var(--on-ink); padding: 72px 0 80px; text-align: center; }
.last img.paco { width: 150px; height: auto; display: block; margin: 0 auto 12px; }
.last h2 { font-size: clamp(30px, 6.5vw, 46px); max-width: 15em; margin: 0 auto; }
.last .get { justify-content: center; }
.last .soon { background: var(--on-ink); color: var(--ink); }
.last .soon::before { background: var(--clay); }
.last .fine { color: var(--on-ink-muted); }
.last .qr { color: var(--on-ink-muted); }

/* ---------- Footer (every page) ---------- */

.site-footer {
  width: 100%;
  max-width: var(--reading);
  margin: 0 auto;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 15px;
  color: var(--meta);
}
.landing .site-footer { max-width: var(--wide); padding: 24px var(--gutter) 36px; border-top: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.site-footer a:hover { color: var(--clay-text); text-decoration: underline; }
.site-footer a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-footer .maker a { padding: 0; text-decoration: underline; }
.trademarks { flex-basis: 100%; margin: 6px 0 0; font-size: 13px; }

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

.page-doc { padding: 0 var(--gutter); }

.doc {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 24px 0 56px;
}
.doc h1 { font-size: clamp(32px, 7vw, 44px); }
.updated { margin: 10px 0 28px; color: var(--meta); font-size: 15px; }
.doc h2 { font-size: 25px; margin: 44px 0 12px; scroll-margin-top: 16px; }
.doc h3 { font: 600 17px/1.4 var(--sans); margin: 26px 0 6px; }
.doc ul, .doc ol { margin: 0 0 1em; padding-left: 1.25em; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--meta); }

.summary {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 8px;
  margin: 0 0 8px;
}
.summary h2 { font-size: 21px; margin: 0 0 12px; }
.summary ul { padding-left: 1.1em; }

.note {
  background: var(--sand);
  border: 1px solid var(--sand-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 1em;
}
.note p:last-child { margin-bottom: 0; }

.toc { font-size: 15px; columns: 2 220px; column-gap: 32px; padding-left: 1.25em; margin: 20px 0 0; }
.toc li { margin: 0 0 6px; break-inside: avoid; }

/* Tables become stacked cards on a phone. */
.table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 16px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.table th { font: 600 14px/1.3 var(--sans); color: var(--meta); text-transform: uppercase; letter-spacing: 0.05em; }
.table td:first-child { font-weight: 600; }
.table td:last-child, .table th:last-child { padding-right: 0; }

@media (max-width: 640px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; font-weight: 600; color: var(--meta); }
}

/* Support: a real person, then the questions people actually have. */
.contact {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 8px;
}
.contact h2 { font-size: 21px; margin: 0 0 8px; }
.contact p:last-child { margin: 14px 0 0; font-size: 15px; color: var(--meta); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 4px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surf);
  font: 600 17px/1 var(--sans);
  text-decoration: none;
  transition: transform 120ms var(--ease), background 120ms;
}
.button:hover { background: var(--ink-2); color: var(--surf); }
.button:active { transform: scale(0.98); }

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { grid-template-columns: 1fr; }
  .steps li::before { grid-row: auto; margin-bottom: 14px; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { grid-template-columns: 1.2fr 1fr; gap: 56px; padding-top: 48px; padding-bottom: 96px; }
  .reader { justify-self: end; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature:nth-child(even) > :first-child { order: 2; }
  .grownups-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
