/* TextMyAgent — Base + Components
 * Mobile-first. Reads on a 375px phone. Works without JS.
 */

@import url("./tokens.css");

/* ---------- Reset (just what's needed) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Base ---------- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: var(--leading-relaxed);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--color-text);
}

p { margin: 0 0 var(--space-text); }
p:last-child { margin-bottom: 0; }

/* ---------- Section wrappers ---------- */
.section {
  padding: var(--space-section) 1.5rem;
}
.section--deep { background-color: var(--color-bg-deep); }
.section--elevated { background-color: var(--color-bg-elevated); }

.container {
  max-width: var(--width-content);
  margin: 0 auto;
}
.container--prose { max-width: var(--width-prose); }
.container--narrow { max-width: var(--width-narrow); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  transition: background-color 150ms ease, transform 100ms ease;
  min-height: 52px;
}
.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-bg-elevated);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-primary-hover);
}
.btn--primary:active { transform: translateY(1px); }

.btn-helper {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(3rem, 6vw, 6rem) 1.5rem clamp(2rem, 4vw, 4rem);
  background-color: var(--color-bg);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--width-page);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
  }
}

.hero__copy { display: flex; flex-direction: column; gap: 1.25rem; }

.hero__title {
  font-family: var(--font-serif);
  font-size: var(--size-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero__sub {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
  max-width: 32em;
}

.hero__cta { margin-top: 0.5rem; }

.hero__footnote {
  margin-top: 1.5rem;
  font-size: var(--size-small);
  color: var(--color-text-muted);
  max-width: 30em;
}

.hero__image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--color-bg-deep);
  box-shadow: var(--shadow-soft);
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Generic image card ---------- */
.figure {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-bg-deep);
  box-shadow: var(--shadow-soft);
}
.figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.figure--portrait img { aspect-ratio: 4 / 5; }
.figure--landscape img { aspect-ratio: 16 / 10; }

/* Placeholder when a real stock photo is pending. Looks intentional, not broken. */
.figure--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(201, 122, 86, 0.05), rgba(74, 93, 68, 0.05)),
    var(--color-bg-deep);
  aspect-ratio: 4 / 3;
  color: var(--color-text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: var(--leading-normal);
}
.figure--placeholder.figure--portrait { aspect-ratio: 4 / 5; }
.figure--placeholder.figure--landscape { aspect-ratio: 16 / 10; }
.figure--placeholder::before {
  content: "Real photo —";
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-style: normal;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---------- Section: What is this ---------- */
.intro__heading { font-size: var(--size-h1); margin-bottom: 1.5rem; }
.intro__lede {
  font-size: 1.25rem;
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}
.intro__figure { margin-top: 3rem; }

/* ---------- How it works ---------- */
.how__heading {
  text-align: center;
  font-size: var(--size-h1);
  margin-bottom: 3rem;
}
.how__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 800px) {
  .how__grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}
.how__step { display: flex; flex-direction: column; gap: 1rem; }
.how__num {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.how__step h3 { font-size: var(--size-h3); margin: 0; }
.how__step p { color: var(--color-text-muted); }

/* ---------- Use cases ---------- */
.cases__heading {
  text-align: center;
  font-size: var(--size-h1);
  margin: 0 auto 4rem;
  max-width: 18em;
}
.case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: var(--space-block);
}
@media (min-width: 800px) {
  .case {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: var(--space-section);
  }
  .case:nth-child(even) .case__image { order: 2; }
}
.case__image { width: 100%; }
.case__copy { display: flex; flex-direction: column; gap: 1rem; }
.case__title { font-size: var(--size-h2); margin: 0; }
.case__body { color: var(--color-text); }
.case__body em { color: var(--color-text-muted); font-style: italic; }

/* ---------- Pricing ---------- */
.pricing__heading {
  text-align: center;
  font-size: var(--size-h1);
  margin-bottom: 3rem;
}
.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .pricing__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
.card {
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.card h3 { font-size: 1.5rem; margin: 0; }
.card__price {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  margin: 0;
  color: var(--color-text);
}
.card__price-sub {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}
.card__bullets {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card__bullets li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 1rem;
}
.card__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--color-primary);
}
.pricing__note {
  text-align: center;
  margin: 2rem auto 0;
  max-width: 36em;
  color: var(--color-text-muted);
  font-size: var(--size-small);
}

/* ---------- Founder note ---------- */
.note__portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-deep);
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-soft);
}
.note__portrait img { width: 100%; height: 100%; object-fit: cover; }
.note__heading { text-align: center; font-size: var(--size-h1); margin-bottom: 2rem; }
.note__body { font-size: 1.125rem; line-height: var(--leading-relaxed); }
.note__sign {
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-text);
}

/* ---------- FAQ ---------- */
.faq__heading { text-align: center; font-size: var(--size-h1); margin-bottom: 3rem; }
.faq__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.faq__q {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}
.faq__a { color: var(--color-text-muted); margin: 0; }

/* ---------- Footer ---------- */
.footer {
  background-color: var(--color-bg-deep);
  padding: 3rem 1.5rem 2rem;
  margin-top: 0;
}
.footer__inner {
  max-width: var(--width-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}
@media (min-width: 700px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
}
.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer__links a:hover { color: var(--color-text); text-decoration: underline; }
.footer__compliance {
  margin: 2rem auto 0;
  max-width: 56em;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: var(--leading-normal);
}

/* ---------- Accessibility / Motion ---------- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

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