/* Ryan Herbig, one page. Plain HTML and CSS, no build step. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #f3eee4;
  --paper-deep: #eae3d4;
  --ink: #17150f;
  --ink-soft: #4a463c;
  --rule: #cfc6b3;
  --green: #1f6b3a;
  --green-ink: #f3eee4;
  --bubble-in: #ffffff;
  --bubble-out: #1f6b3a;
  --bubble-out-ink: #f3eee4;
  --phone: #0f0e0b;
  --phone-screen: #f6f2ea;
  --card: #faf7f0;
  --shadow: 0 30px 60px -30px rgba(23, 21, 15, 0.45);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16150f;
    --paper-deep: #1e1c15;
    --ink: #ece6d8;
    --ink-soft: #b3ab99;
    --rule: #3a362b;
    --green: #5fbf7f;
    --green-ink: #0f1a12;
    --bubble-in: #2a2820;
    --bubble-out: #2f8a52;
    --bubble-out-ink: #f3eee4;
    --phone: #000000;
    --phone-screen: #121210;
    --card: #1e1c15;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: clip;
  position: relative;
}

/* faint paper grain, no image file */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

/* Buttons and tappable links. Everything is at least 44px tall. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  background: var(--green);
  color: var(--green-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px var(--green); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .link-plain:focus-visible, .wordmark:focus-visible, .foot a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.btn-small { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.btn-invert { background: var(--paper); color: var(--ink); }

.link-plain {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.link-plain:hover { color: var(--ink); text-decoration-color: var(--green); }
.link-invert { color: var(--paper); opacity: 0.85; }
.link-invert:hover { color: var(--paper); opacity: 1; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

/* Top bar */
.top {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.15;
}
.wordmark-name { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.wordmark-sub { font-size: 0.8rem; color: var(--ink-soft); }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}
.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 18px;
}
h1 {
  font-size: clamp(2.6rem, 8.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
  max-width: 12ch;
}
.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 26px 0 30px;
  max-width: 34em;
}

/* Phone mockup, CSS only */
.phone-wrap { margin: 0; width: 100%; max-width: 340px; justify-self: center; }
.phone {
  background: var(--phone);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,0.08);
}
.phone > * { background: var(--phone-screen); }
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px;
  border-radius: 32px 32px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}
.phone-signal { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.phone-signal i { display: block; width: 3px; background: currentColor; border-radius: 1px; }
.phone-signal i:nth-child(1) { height: 4px; }
.phone-signal i:nth-child(2) { height: 6px; }
.phone-signal i:nth-child(3) { height: 8px; }
.phone-signal i:nth-child(4) { height: 10px; }
.phone-contact {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--rule);
}
.avatar {
  grid-row: 1 / span 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rule);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600;
}
.contact-name { font-weight: 600; font-size: 0.95rem; line-height: 1.1; }
.contact-note { font-size: 0.75rem; color: var(--ink-soft); }
.thread {
  padding: 16px 14px 20px;
  border-radius: 0 0 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.msg p {
  padding: 10px 13px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
}
.msg time { font-size: 0.7rem; color: var(--ink-soft); padding: 0 6px; }
.msg time b { color: var(--green); font-weight: 600; }
.msg.in { align-self: flex-start; }
.msg.in p { background: var(--bubble-in); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 0 1px 0 rgba(0,0,0,0.06); }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.out p { background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 6px; }
.phone-wrap figcaption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Section titles */
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 28px;
}

/* Offers */
.offers { padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--rule); }
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-tag {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.card h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.12; }
.card > p:not(.card-tag):not(.guarantee) { color: var(--ink-soft); }
.guarantee {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  font-weight: 500;
}
.stamp {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 8px;
  transform: rotate(-2deg);
  vertical-align: middle;
}

/* How it works */
.how { padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--rule); }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.step-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--green);
  font-variation-settings: "opsz" 144;
}
.steps h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); }

/* Price and fit */
.price { padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--rule); background: var(--paper-deep); }
.price-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.price-line {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.price-line .num { display: inline-block; }
.price-note { margin-top: 14px; color: var(--ink-soft); max-width: 30em; }
.fit { display: grid; grid-template-columns: 1fr; gap: 16px; }
.fit-col {
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--card);
}
.fit-col h3 { font-size: 1.1rem; margin-bottom: 8px; }
.fit-col p { color: var(--ink-soft); }
.fit-not { border-style: dashed; background: transparent; }

/* Who */
.who { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--rule); }
.who-line {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.35;
  max-width: 34em;
  font-variation-settings: "opsz" 48;
}

/* Close */
.close { padding: 0 0 clamp(40px, 6vw, 80px); }
.close-box {
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 60px) clamp(22px, 4vw, 56px);
  display: grid;
  gap: 26px;
}
.close-box h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.08; max-width: 20ch; }
@media (prefers-color-scheme: dark) {
  .close-box { background: var(--paper-deep); color: var(--ink); border: 1px solid var(--rule); }
  .btn-invert { background: var(--green); color: var(--green-ink); }
  .link-invert { color: var(--ink-soft); opacity: 1; }
}

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 20px 0 32px; color: var(--ink-soft); font-size: 0.95rem; }
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
}
.foot a:hover { text-decoration-color: var(--green); }
.foot-small { font-size: 0.85rem; }

/* Page load reveal */
.reveal { animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
.reveal:nth-child(2) { animation-delay: 80ms; }
.reveal:nth-child(3) { animation-delay: 160ms; }
.reveal:nth-child(4) { animation-delay: 240ms; }
.phone-wrap.reveal { animation-delay: 220ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Wider screens */
@media (min-width: 720px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 20px; }
  .fit { grid-template-columns: 1fr 1fr; }
  .close-box { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .close-box .cta-row { justify-self: end; justify-content: flex-end; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .phone-wrap { justify-self: end; }
  .how-grid { grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
  .how .section-title { margin-bottom: 0; position: sticky; top: 90px; }
  .price-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
