/* ============================================
   TillerDad — tillerdad.com
   Warm, editorial, personal.
   ============================================ */

:root {
  --bg: #FDFAF6;
  --bg-alt: #F0EAE0;
  --text: #2C2418;
  --text-muted: #6B5D4F;
  --text-light: #907E6C;
  --terracotta: #C4704B;
  --terracotta-dark: #A85A3A;
  --terracotta-light: #D4896A;
  --sage-muted: #9BB48F;
  --border: #E2D9CE;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
}

/* ---- Reset ---- */

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

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

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

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 0.8rem;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

a:hover {
  color: var(--terracotta-dark);
}

a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
  border-radius: 2px;
}

strong {
  font-weight: 700;
}

/* ---- Layout ---- */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.hero-content {
  max-width: 600px;
}

.hero-content > * {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content > :nth-child(1) { animation-delay: 0s; }
.hero-content > :nth-child(2) { animation-delay: 0.1s; }
.hero-content > :nth-child(3) { animation-delay: 0.2s; }
.hero-content > :nth-child(4) { animation-delay: 0.35s; }
.hero-content > :nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  border-radius: 16px;
  margin-bottom: var(--space-md);
}

.brand-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-style: italic;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: var(--space-xl);
}

.hero-note {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

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

.btn {
  display: inline-block;
  background: var(--terracotta);
  color: var(--bg);
  text-decoration: none;
  padding: 1rem 2.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(196, 112, 75, 0.25);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--terracotta-dark);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 112, 75, 0.35);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(196, 112, 75, 0.2);
}

.btn:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.btn-large {
  padding: 1.125rem 3rem;
  font-size: 1.125rem;
}

/* ---- About ---- */

.about {
  padding: clamp(4rem, 3rem + 5vw, 8rem) 0;
}

.js .about {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .about.visible {
  opacity: 1;
  transform: translateY(0);
}

.pull {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  color: var(--terracotta);
  border-left: 3px solid var(--terracotta-light);
  padding-left: 1.25rem;
  margin-top: var(--space-xl);
  line-height: 1.6;
}

/* ---- Sprout divider ---- */

.sprout-divider {
  text-align: center;
  margin: 0 auto;
  line-height: 0;
}

.sprout-divider svg {
  opacity: 0.75;
  transition: opacity 0.3s;
}

.sprout-divider svg:hover {
  opacity: 1;
  animation: sway 1.2s ease-in-out;
}

@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(4deg); }
  75% { transform: rotate(-4deg); }
}

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

.features {
  padding: clamp(3rem, 2rem + 4vw, 6rem) 0;
}

.js .features {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .features.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-list {
  margin-top: var(--space-xl);
}

.feature {
  margin-bottom: var(--space-xl);
  padding-left: 1.25rem;
  border-left: 3px solid var(--sage-muted);
}

.feature:last-child {
  margin-bottom: 0;
}

.feature dt {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.feature dd {
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- Channel preview ---- */

.preview {
  padding: clamp(4rem, 3rem + 4vw, 7rem) 0;
}

.js .preview {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .preview.visible {
  opacity: 1;
  transform: translateY(0);
}

.post-list {
  list-style: none;
  margin-top: var(--space-xl);
}

.post {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  color: var(--text);
  line-height: 1.5;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.post:first-child {
  border-top: 1px solid var(--border);
}

.post-tag {
  display: inline-block;
  font-family: 'Nunito Sans', sans-serif;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--sage-muted);
  padding: 0.2em 0.6em;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: 2px;
}

/* ---- Telegram section ---- */

.telegram {
  background: var(--bg-alt);
  padding: clamp(6rem, 4rem + 5vw, 9rem) 0;
  margin-top: clamp(2.5rem, 1.5rem + 2vw, 4rem);
}

.js .telegram {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .telegram.visible {
  opacity: 1;
  transform: translateY(0);
}

.setup-intro {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin-bottom: var(--space-xl);
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 0.875rem;
  line-height: 1.6;
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15em;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--terracotta);
  width: 2rem;
  text-align: center;
}

.telegram-note {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.telegram-note p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- Bloom divider ---- */

.bloom-divider {
  text-align: center;
  margin: 0 auto;
  padding: var(--space-lg) 0;
  line-height: 0;
}

.bloom-divider svg {
  opacity: 0.7;
  transition: opacity 0.3s;
}

.bloom-divider svg:hover {
  opacity: 1;
  animation: sway 1.2s ease-in-out;
}

/* ---- Final CTA ---- */

.cta-final {
  padding: clamp(7rem, 5rem + 7vw, 14rem) 0;
  text-align: center;
}

.js .cta-final {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .cta-final.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-final h2 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  margin-bottom: var(--space-md);
}

.cta-final p {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

/* ---- Footer ---- */

footer {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--terracotta);
  text-decoration: underline;
}

/* ---- Responsive ---- */

@media (min-width: 640px) {
  .pull {
    margin-left: -2rem;
    padding-left: 2rem;
  }

  .feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl) var(--space-2xl);
  }

  .feature {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 85vh;
    min-height: 85svh;
    padding: var(--space-2xl) 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .feature {
    padding-left: 1rem;
  }

  .steps li {
    padding-left: 2.25rem;
  }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-content > * {
    animation: none;
    opacity: 1;
  }

  .js .about,
  .js .features,
  .js .preview,
  .js .telegram,
  .js .cta-final {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sprout-divider svg:hover,
  .bloom-divider svg:hover {
    animation: none;
  }
}

/* ---- Print ---- */

@media print {
  .hero {
    min-height: auto;
    padding: var(--space-xl) 0;
  }

  .btn {
    border: 2px solid var(--text);
    background: none;
    color: var(--text);
  }

  .js .about,
  .js .features,
  .js .preview,
  .js .telegram,
  .js .cta-final {
    opacity: 1;
    transform: none;
  }
}
