/* Mateus Moura · site styles
   One light theme, one accent (terracotta), warm-tinted neutrals.
   Display: Newsreader. Body: Atkinson Hyperlegible Next (chosen for older readers).
   Fonts are self-hosted so visitors' IPs never reach a third party. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Neutrals, tinted warm */
  --paper: #f7f2ea;
  --paper-2: #efe6d8;
  --card: #fffcf7;
  --ink: #1f2a37;
  --ink-2: #3b4655;
  --ink-3: #5a6472;
  --line: #e1d6c5;
  --line-2: #cfc2ae;

  /* The one accent */
  --accent: #b4532a;
  --accent-strong: #97421f;
  --accent-soft: #f4e0d3;
  --accent-soft-line: #e9c9b5;

  --live: #3f7a4e;

  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale (4/8) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  /* Radius scale */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-full: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) {
  body {
    font-size: 1.1875rem;
  }
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus {
  top: var(--s4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.5rem);
  font-weight: 450;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--accent-strong);
}

h2 {
  font-size: clamp(2.05rem, 1.4rem + 2.5vw, 3.1rem);
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.lead {
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  min-height: 54px;
  padding: 0 28px;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.98rem;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--accent-strong);
  }
  .btn-secondary:hover {
    border-color: var(--ink);
  }
  .nav a:hover,
  .site-footer a:hover {
    color: var(--ink);
    text-decoration: underline;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(247 242 234 / 0.94);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgb(247 242 234 / 0.82);
    backdrop-filter: saturate(1.2) blur(10px);
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 72px;
}

.brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--s2);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(3px);
}

.nav {
  display: none;
  gap: var(--s5);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  font-size: 1rem;
  text-decoration: none;
}

@media (min-width: 980px) {
  .nav {
    display: flex;
    margin-right: var(--s4);
  }
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s3);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-decoration: none;
}

.lang a[aria-current] {
  background: var(--ink);
  color: var(--paper);
}

.header-cta {
  display: none;
}

@media (min-width: 640px) {
  .header-cta {
    display: inline-flex;
  }
}

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

.hero {
  padding-block: clamp(32px, 4vw, 56px) clamp(64px, 8vw, 112px);
}

.hero .wrap {
  display: grid;
  gap: var(--s7);
  align-items: center;
}

@media (min-width: 980px) {
  .hero .wrap {
    grid-template-columns: 1.12fr 0.88fr;
    gap: var(--s8);
  }
}

.hero .lead {
  margin-top: var(--s5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 1rem;
}

.proof li {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
}

.proof li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Phone with a sample conversation */

.phone {
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 10px;
  background: var(--ink);
  border-radius: 44px;
  box-shadow:
    0 30px 60px -32px rgb(31 42 55 / 0.5),
    0 12px 24px -14px rgb(31 42 55 / 0.3);
}

.screen {
  overflow: hidden;
  background: #f1eadf;
  border-radius: 34px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 16px 18px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  flex: none;
}

.chat-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--ink-3);
}

.chat-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 12px 16px;
  list-style: none;
}

.msg {
  max-width: 86%;
  padding: 8px 12px 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.msg.in {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.msg.out {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--accent-soft-line);
  border-bottom-right-radius: 6px;
}

.msg ul {
  margin: 6px 0 2px;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.msg.wide {
  max-width: 100%;
}

.msg li {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}

.msg li span:last-child {
  white-space: nowrap;
}

.msg time {
  display: block;
  margin-top: 1px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--ink-3);
}

.chat-input {
  display: flex;
  align-items: center;
  margin: 0 12px 12px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--card);
  color: var(--ink-3);
  font-size: 0.95rem;
}

.phone-caption {
  margin-top: var(--s4);
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: no-preference) {
  .chat .msg {
    animation: msg-in 280ms var(--ease-out) both;
  }
  .chat .msg:nth-child(1) { animation-delay: 300ms; }
  .chat .msg:nth-child(2) { animation-delay: 900ms; }
  .chat .msg:nth-child(3) { animation-delay: 1800ms; }
  .chat .msg:nth-child(4) { animation-delay: 2400ms; }
  .chat .msg:nth-child(5) { animation-delay: 3100ms; }
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-tint {
  background: var(--paper-2);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p {
  margin-top: var(--s4);
  font-size: 1.2rem;
  color: var(--ink-2);
}

/* Routines */

.routines {
  display: grid;
  gap: 0 var(--s7);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}

@media (min-width: 720px) {
  .routines {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .routines {
    grid-template-columns: repeat(3, 1fr);
  }
}

.routine {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
}

.routine p {
  margin-top: 10px;
  color: var(--ink-2);
}

.routine .says {
  margin-top: var(--s4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--accent-strong);
}

/* Story */

.story .wrap {
  display: grid;
  gap: var(--s7);
}

@media (min-width: 980px) {
  .story .wrap {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
    gap: var(--s8);
  }
}

.story blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 1.25rem + 2.8vw, 3.3rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.story figcaption {
  margin-top: var(--s5);
  color: var(--ink-3);
  font-size: 1rem;
}

.story-text h2 {
  margin-bottom: var(--s5);
}

.story-text p + p {
  margin-top: var(--s4);
}

.story-text p {
  color: var(--ink-2);
  max-width: 34em;
}

/* Steps */

.steps {
  display: grid;
  gap: var(--s6);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  padding-top: var(--s5);
  border-top: 2px solid var(--ink);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--accent);
}

.step h3 {
  margin-top: var(--s4);
}

.step p {
  margin-top: var(--s2);
  color: var(--ink-2);
}

.rules {
  display: grid;
  gap: var(--s5) var(--s6);
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.rules h3 {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .rules {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rule strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

.rule span {
  display: block;
  margin-top: 6px;
  color: var(--ink-2);
}

/* Pricing */

.plans {
  display: grid;
  gap: var(--s5);
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.plan.featured {
  border: 2px solid var(--accent);
}

.badge {
  align-self: flex-start;
  margin-bottom: var(--s4);
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.plan .for {
  margin-top: var(--s2);
  color: var(--ink-2);
}

.price {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-top: var(--s5);
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.price small {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--ink-3);
}

.later {
  margin-top: var(--s2);
  font-size: 0.98rem;
  color: var(--ink-3);
}

.ticks {
  display: grid;
  gap: 10px;
  margin: var(--s5) 0 var(--s6);
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 13px;
  height: 7px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

.care {
  display: grid;
  gap: var(--s4);
  align-items: center;
  margin-top: var(--s5);
  padding: clamp(20px, 3vw, 28px) clamp(24px, 4vw, 40px);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
}

@media (min-width: 900px) {
  .care {
    grid-template-columns: 1fr auto;
    gap: var(--s6);
  }
}

.care p {
  margin-top: 6px;
  color: var(--ink-2);
}

.care-price {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  white-space: nowrap;
}

.care-price small {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-3);
}

.note {
  margin-top: var(--s5);
  max-width: 60ch;
  font-size: 1rem;
  color: var(--ink-3);
}

/* Lessons: a price list, read like a menu */

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}

.menu li {
  display: grid;
  gap: var(--s2) var(--s6);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .menu li {
    grid-template-columns: 1fr auto;
    align-items: baseline;
  }
}

.menu .meta {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.menu p {
  margin-top: var(--s2);
  max-width: 58ch;
  color: var(--ink-2);
}

.menu .cost {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.1;
  white-space: nowrap;
}

.menu .cost small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-3);
}

@media (min-width: 800px) {
  .menu .cost {
    text-align: right;
  }
}

.gift {
  display: grid;
  gap: var(--s4);
  align-items: center;
  margin-top: var(--s7);
  padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 40px);
  background: var(--accent-soft);
  border-radius: var(--r-md);
}

@media (min-width: 900px) {
  .gift {
    grid-template-columns: 1fr auto;
    gap: var(--s6);
  }
}

.gift p {
  margin-top: 6px;
  color: var(--ink);
}

/* About */

.about .wrap {
  display: grid;
  gap: var(--s7);
}

@media (min-width: 980px) {
  .about .wrap {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
    gap: var(--s8);
  }
}

.facts {
  padding: clamp(24px, 4vw, 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.monogram {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 500;
}

.facts .name {
  margin-top: var(--s4);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.facts dl {
  display: grid;
  gap: var(--s4);
  margin: var(--s5) 0 0;
}

.facts dt {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.facts dd {
  margin: 2px 0 0;
}

.about-text h2 {
  margin-bottom: var(--s5);
}

.about-text p {
  max-width: 36em;
  color: var(--ink-2);
}

.about-text p + p {
  margin-top: var(--s4);
}

/* FAQ */

.faq {
  max-width: 52rem;
  border-top: 1px solid var(--line-2);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 18px 48px 18px 0;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  transform: translateY(-50%);
  transition: transform 200ms var(--ease-out);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  padding: 0 0 var(--s5);
  max-width: 62ch;
  color: var(--ink-2);
}

/* Contact */

.contact-panel {
  display: grid;
  gap: var(--s5);
  padding: clamp(32px, 6vw, 72px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.contact-panel .lead {
  max-width: 36em;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s2);
}

.contact-panel .small {
  font-size: 1rem;
  color: var(--ink-3);
}

/* Footer */

.site-footer {
  padding-block: var(--s7) var(--s8);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.98rem;
}

.site-footer .wrap {
  display: grid;
  gap: var(--s3);
}

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

/* 404 */

.lost {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: var(--s5);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
