/* ============================================================
   matiasgarrido.com (static site, 2026-09-28)
   Layout and type follow the "v3" redesign (a calm, bookish page:
   serif body, hairline rules, no cards, no gradients); the colors
   are the site's own green and pink, never v3's ivory and ochre.
   Type: Newsreader (headings + reading text) · Archivo (menu,
   buttons, small labels) · IBM Plex Mono (prices).
   ============================================================ */

:root {
  --paper: #FFFFFF;
  --mint: #E8F6EE;          /* soft green panel */
  --blush: #FDEEF3;         /* soft pink panel */
  --ink: #0F2419;           /* deep green, reads as near-black */
  --ink-2: #3F5448;         /* secondary text */
  --ink-3: #6F8177;         /* captions */
  --hair: rgba(15, 36, 25, 0.14);
  --hair-soft: rgba(15, 36, 25, 0.08);
  --green: #10864E;         /* emerald: buttons, links */
  --green-deep: #0B6A3D;
  --pink: #E6337C;          /* raspberry: highlights, rules, key words */
  --pink-deep: #C01E5E;     /* pink for small text (readable on white) */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  line-height: 1.66;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--pink); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.15em; }
main { flex: 1; }

/* ---------- type roles ---------- */
.display {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
h1.display { font-size: clamp(2.5rem, 6vw, 4.1rem); }
.accent-pink { color: var(--pink); }
.accent-green { color: var(--green); }

.rubric {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin: 0;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.standfirst {
  font-size: 1.24rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.quiet { font-size: 0.98rem; color: var(--ink-2); }

.link {
  color: var(--pink-deep);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(224, 60, 119, 0.45);
  transition: text-decoration-color 120ms ease, color 120ms ease;
}
.link:hover { text-decoration-color: var(--pink); color: var(--pink); }

/* ---------- structure ---------- */
.band { height: 4px; background: linear-gradient(90deg, var(--green) 0 78%, var(--pink) 78% 100%); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / menu ---------- */
.site-head {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hair);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-head-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 28px;
  padding-top: 18px;
  padding-bottom: 14px;
}
.wordmark {
  font-family: 'Archivo', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em {
  display: block;
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-3);
  margin-top: 2px;
}
.menu { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.menu a {
  font-family: 'Archivo', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: color 120ms ease, border-color 120ms ease;
}
.menu a:hover { color: var(--ink); border-bottom-color: var(--green); }
.menu a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--pink); }
.menu .ext { font-size: 0.9em; margin-left: 2px; }

.menu-toggle { display: none; }

/* phone menu: the links fold into a panel that opens under a hamburger button (js/menu.js). Without JavaScript the
   links simply stay visible, stacked. Kicks in wherever the five links no longer fit on one line (up to 900px). */
@media (max-width: 760px) {
  .site-head { position: static; }
}
@media (max-width: 900px) {
  .site-head-inner { flex-direction: row; flex-wrap: wrap; align-items: center; padding-top: 14px; padding-bottom: 12px; gap: 0; }
  /* the button is the usual three-line "hamburger" (Matias, 2026-09-30); it turns into a pink X while the menu is open */
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 44px; height: 44px; margin-right: -11px;   /* 44px tap area; the bars still line up with the page edge */
    padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 3px; cursor: pointer;
  }
  .burger, .burger::before, .burger::after {
    display: block; width: 22px; height: 2px; border-radius: 1px; background: currentColor;
    transition: transform 220ms ease, background-color 160ms ease;
  }
  .burger { position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -7px; }
  .burger::after { top: 7px; }
  @media (hover: hover) { .menu-toggle:hover { color: var(--green); } }
  .menu-open .menu-toggle { color: var(--pink-deep); }
  .menu-open .burger { background-color: transparent; }
  .menu-open .burger::before { transform: translateY(7px) rotate(45deg); }
  .menu-open .burger::after { transform: translateY(-7px) rotate(-45deg); }
  .menu { flex-basis: 100%; flex-direction: column; flex-wrap: nowrap; gap: 0; margin-top: 12px; }
  .js .menu { max-height: 0; overflow: hidden; margin-top: 0; transition: max-height 280ms ease, margin-top 280ms ease; }
  .js .menu-open .menu { max-height: 420px; margin-top: 12px; }
  .menu a { display: block; padding: 14px 2px; font-size: 0.8rem; border-bottom: 1px solid var(--hair-soft); }
  .menu a:first-child { border-top: 1px solid var(--hair-soft); }
  .menu a:hover { border-bottom-color: var(--hair-soft); color: var(--green); }
  .menu a[aria-current="page"] { color: var(--pink-deep); border-bottom-color: var(--hair-soft); }
}
@media (max-width: 380px) {
  .wordmark { font-size: 0.76rem; letter-spacing: 0.08em; max-width: calc(100% - 52px); }
  .wordmark em { font-size: 0.78rem; white-space: normal; }
}

/* ---------- buttons ---------- */
.btn, .btn-ghost {
  font-family: 'Archivo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn { background: var(--green); color: #fff; border: 1px solid var(--green); }
.btn:hover { background: #36D389; border-color: #36D389; }   /* hover goes lighter and brighter, never darker (Matias, 2026-09-30) */
.btn-pink { background: #D6286F; border-color: #D6286F; }
.btn-pink:hover { background: #F75B9C; border-color: #F75B9C; }
.btn-ghost { background: transparent; color: var(--pink-deep); border: 1px solid var(--pink); }
.btn-ghost:hover { background: var(--blush); }

a:focus-visible, .btn:focus-visible, .btn-ghost:focus-visible, .menu-toggle:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* ---------- homepage hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 150px);
}
.hero {
  max-width: 760px;
  padding: 56px 0 64px;
}
.capsule-art { width: calc(100% + 40px); max-width: none; height: auto; }
/* the extra 40px spill to the right; below this width it would push past the screen edge */
@media (max-width: 1140px) {
  .capsule-art { width: 100%; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero { padding: 48px 0 28px; margin: 0 auto; text-align: center; }
  .hero .byline { justify-content: center; }
  .hero .byline::after { display: none; }
  .hero-line { margin-left: auto; margin-right: auto; }
  .capsule-art { width: min(340px, 86%); margin: 0 auto 48px; }
}
.byline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.6rem;
}
.byline::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }
.hero h1 { margin-bottom: 1.8rem; }
.hero-line {
  font-style: italic;
  font-variation-settings: 'opsz' 40;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 760px;
  margin: 0 0 2.6rem;
}
.hero-line .link { text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- long-form pages ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(44px, 8vh, 84px) 24px 64px;
}
.article > .rubric { margin-bottom: 14px; }
.article > h1 { margin-bottom: 1.3rem; }
.article .standfirst { margin-bottom: 2.4rem; }
/* the three offer pages open centered: label, heading and first paragraph (Matias, 2026-09-30) */
.article.intro-center > .rubric,
.article.intro-center > h1,
.article.intro-center > .standfirst { text-align: center; }
.article.all-center > p { text-align: center; }

.notice {
  background: var(--mint);
  border-top: 3px solid var(--green);
  padding: 24px 26px 18px;
  margin: 0 0 2.4rem;
}
.notice p:last-child { margin-bottom: 0.2rem; }
.notice-title { font-family: 'Newsreader', serif; font-weight: 600; font-size: 1.22rem; line-height: 1.3; color: var(--green); margin: 0 0 0.6rem; }
.offer p.desc strong { color: var(--ink); font-weight: 600; }

.deliverables { list-style: none; padding: 0; margin: 2rem 0 2.2rem; counter-reset: d; }
.deliverables li {
  counter-increment: d;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 18px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--hair);
}
.deliverables li:last-child { border-bottom: 1px solid var(--hair); }
.deliverables li::before {
  content: counter(d, decimal-leading-zero);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--pink);
}
.deliverables h3 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}
.deliverables p { margin: 0; }

.footnote { font-size: 0.95rem; font-style: italic; color: var(--ink-2); }
.closer { font-style: italic; font-variation-settings: 'opsz' 40; font-size: 1.3rem; line-height: 1.5; color: var(--ink); margin: 2.2rem 0 0; }
.star { color: var(--pink); font-style: normal; }

/* ---------- offer panel (price + buttons) ---------- */
.offer {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--pink);
  max-width: 480px;
  margin: 2.8rem auto 0;
  padding: 30px 30px 28px;
  text-align: center;
  box-shadow: 0 14px 40px -24px rgba(15, 36, 25, 0.35);
}
.offer .price {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--green);
  margin: 0;
}
.offer h2, .offer h3 {
  font-family: 'Archivo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 10px 0 16px;
}
.offer h2.big {
  font-family: 'Newsreader', serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 14px;
}
.offer p.desc { font-size: 1rem; color: var(--ink-2); line-height: 1.6; margin: 0 0 22px; }
.offer .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* price panel with the offer's square image on top (the same image as its PayPal checkout) */
.offer.has-img { padding: 0; overflow: hidden; border-top: 0; }
.offer.has-img .offer-img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--hair); }
.offer.has-img .offer-body { padding: 26px 30px 28px; }
/* ---------- book page ---------- */
.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(36px, 6vh, 64px) 24px 72px;
}
.book img {
  width: min(300px, 70vw);
  height: auto;
  border-radius: 3px;
  box-shadow: 2px 3px 0 rgba(15, 36, 25, 0.12), 10px 24px 48px -12px rgba(15, 36, 25, 0.35);
}
.book .btn { margin-top: 36px; min-width: min(300px, 70vw); }

/* ---------- author quote: Matias's photo + a line from his book The AI Rider, above the footer of every page
   (Matias, 2026-09-30: "this guy has written a book" + "I'm hiring a person with a face"). One figure, three
   children: photo (spans both rows), quote, credit; on phones they stack, centered. ---------- */
.author-quote { background: var(--mint); border-top: 1px solid var(--hair-soft); }
.author-quote-inner {
  max-width: 768px;          /* the reading column of the pages above (720px + gutters) */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0 44px;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
}
.author-photo {
  grid-row: 1 / span 2;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--paper), 0 16px 34px -16px rgba(15, 36, 25, 0.45);
}
.author-quote blockquote { margin: 0 0 18px; align-self: end; }
.author-quote blockquote p {
  font-style: italic;
  font-variation-settings: 'opsz' 40;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.36;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
/* a short quote (one sentence, under ~65 characters) gets bigger type so it fills its column like the long ones */
.author-quote blockquote.short p { font-size: clamp(1.6rem, 3.3vw, 2.35rem); line-height: 1.28; }
/* curly quote marks in pink; the opening one hangs outside the text column so the words line up */
.author-quote blockquote p::before { content: "\201C"; color: var(--pink); margin-left: -0.42em; }
.author-quote blockquote p::after { content: "\201D"; color: var(--pink); }
.author-quote figcaption {
  align-self: start;
  font-family: 'Archivo', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
}
.author-quote figcaption .role {
  display: block;
  font-family: 'Newsreader', serif;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  margin-top: 3px;
}
.author-quote cite { font-style: italic; }
/* a small cover of the book beside the credit, so "he wrote a book" is seen at a glance (Matias, 2026-10-05):
   cover on the left spanning both lines, name and "Author of ..." hugging each other beside its middle */
.author-quote figcaption.with-cover { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 14px; }
.author-quote .cover { grid-row: 1 / span 2; align-self: center; display: block; line-height: 0; }
.author-quote .cover img {
  width: 40px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 36, 25, 0.10), 4px 8px 16px -8px rgba(15, 36, 25, 0.5);
}
.author-quote figcaption.with-cover .who { align-self: end; }
.author-quote figcaption.with-cover .role { align-self: start; }
@media (max-width: 640px) {
  .author-quote-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 44px; padding-bottom: 48px; }
  .author-photo { grid-row: auto; width: 112px; height: 112px; margin-bottom: 24px; }
  .author-quote blockquote { margin-bottom: 16px; }
  .author-quote blockquote p::before { margin-left: 0; }
  .author-quote figcaption.with-cover { justify-content: center; text-align: left; }
}

/* ---------- not-found page ---------- */
.lost { max-width: 720px; margin: 0 auto; padding: clamp(64px, 16vh, 170px) 24px 80px; }
.lost .code { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; color: var(--pink-deep); margin-bottom: 0.8rem; }
.lost h1 { margin-bottom: 1.6rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--hair); padding: 24px 0 32px; }
.site-foot p {
  margin: 0;
  font-family: 'Archivo', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;      /* centered on every page and width (Matias, 2026-09-30) */
}

/* ---------- one gentle entrance, once ---------- */
.rise > * { animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise > *:nth-child(2) { animation-delay: 70ms; }
.rise > *:nth-child(3) { animation-delay: 140ms; }
.rise > *:nth-child(4) { animation-delay: 210ms; }
.rise > *:nth-child(n+5) { animation-delay: 280ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rise > * { animation: none; }
}

.nowrap { white-space: nowrap; }
