/* Better Skin — shared site styles.
   The palette and type rules mirror the app's onboarding design law
   (better-skin-diary/docs/onboarding-build-notes.md): warm cream, terracotta,
   ink; Georgia serif for display, system sans for everything quiet.
   No JS anywhere on the site — calm means still. */

:root {
  --canvas: #faf7f2; /* icon cream — page background */
  --sand: #f4ede4; /* onboarding canvas — alternate bands */
  --card: #f0e9de; /* everyday warm surface */
  --ink: #2b211b; /* warm near-black */
  --ink-subtle: #574d44; /* darker taupe — body with presence */
  --ink-muted: #7c7268; /* lightest taupe — quiet notes */
  --line: #e5dbce; /* hairlines */
  --terracotta: #b5654a;
  --terracotta-deep: #a05540;
  --terracotta-soft: #efe0d5;
  --dark-body: #d8cfc4; /* body text on the ink band */
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-subtle);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--terracotta-soft);
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.wrap {
  max-width: 66rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

.overline {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 1.1rem;
}

/* ---------- header / footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.9rem;
  padding-bottom: 1.9rem;
}

.site-header .logo img {
  height: 24px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 1.6rem;
}

.site-header nav a {
  color: var(--ink);
  font-size: 0.92rem;
}

.site-header nav a:hover {
  color: var(--terracotta);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 7rem;
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
}

.site-footer .logo img {
  height: 20px;
  width: auto;
  margin: 0 auto 1.4rem;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.site-footer nav a {
  color: var(--ink);
  font-size: 0.9rem;
}

.site-footer nav a:hover {
  color: var(--terracotta);
  text-decoration: none;
}

.site-footer .fine {
  font-size: 0.83rem;
  color: var(--ink-muted);
  margin: 0.3rem 0;
}

/* ---------- buttons ---------- */

.pill {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease;
}

.pill:hover {
  background: var(--terracotta-deep);
  text-decoration: none;
}

/* ---------- phone frame ---------- */

.phone {
  margin: 0;
  width: min(300px, 78vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 46px;
  padding: 11px;
  box-shadow: 0 30px 70px -38px rgba(43, 33, 27, 0.38);
}

.phone img {
  width: 100%;
  border-radius: 36px;
}

/* ---------- landing: hero ---------- */

.hero {
  padding-top: clamp(3.5rem, 9vh, 6.5rem);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 15em;
  margin: 0 auto;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  max-width: 30em;
  margin: 1.5rem auto 2.4rem;
}

.hero .cta-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.9rem 0 0;
}

.hero .phone {
  /* Overlaps the sand band below; positioned so it paints above the band. */
  position: relative;
  z-index: 1;
  margin: clamp(3.5rem, 7vh, 5.5rem) auto -104px;
  width: min(320px, 82vw);
}

.hero figcaption {
  display: none;
}

/* ---------- landing: how it works ---------- */

.band-sand {
  background: var(--sand);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.how {
  padding-top: 148px;
  padding-bottom: 4.5rem;
  text-align: center;
}

.how .overline {
  margin-bottom: 0.7rem;
}

.how h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.4rem);
  letter-spacing: -0.01em;
}

.how .steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3.4rem;
  text-align: left;
}

/* A quiet thread linking the three steps into one loop, rather than three
   islands adrift in the band. Sits behind the number circles. */
.how .steps::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.step {
  position: relative;
  z-index: 1;
}

.step .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 0 6px var(--sand);
}

.step h3 {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.step p {
  font-size: 0.98rem;
  color: var(--ink-subtle);
  margin: 0;
}

/* ---------- landing: moments ---------- */

.moments {
  padding-top: clamp(5rem, 10vh, 8rem);
}

.moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.moment + .moment {
  margin-top: clamp(6rem, 12vh, 9rem);
}

.moment .phone {
  justify-self: center;
}

.moment.flip .phone {
  order: 2;
}

.moment h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.moment p {
  margin: 1.1rem 0 0;
  max-width: 30em;
}

/* ---------- landing: ink band ---------- */

.band-ink {
  background: var(--ink);
  margin-top: clamp(6rem, 12vh, 9rem);
  padding: clamp(5rem, 10vh, 7rem) 1.5rem;
  text-align: center;
}

.band-ink .rule {
  width: 44px;
  height: 2px;
  background: var(--terracotta);
  margin: 0 auto 2.2rem;
}

.band-ink h2 {
  color: var(--sand);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  letter-spacing: -0.01em;
}

.band-ink p {
  color: var(--dark-body);
  max-width: 36em;
  margin: 1.5rem auto 0;
}

/* ---------- landing: closer ---------- */

.closer {
  padding-top: clamp(5.5rem, 11vh, 8.5rem);
  text-align: center;
}

.closer h2 {
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  letter-spacing: -0.01em;
}

.closer p {
  max-width: 28em;
  margin: 1.2rem auto 2.2rem;
}

.closer .cta-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.9rem auto 0;
}

/* ---------- inner pages (support, sent, 404, legal shells) ---------- */

.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) 1.5rem 0;
}

.page h1 {
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  letter-spacing: -0.01em;
}

.page .lede {
  margin: 1.1rem 0 0;
}

/* ---------- support form ---------- */

.support-form {
  margin-top: 2.6rem;
}

.field {
  margin-bottom: 1.4rem;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.field label .optional {
  font-weight: 400;
  color: var(--ink-muted);
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.support-form .pill {
  margin-top: 0.4rem;
}

.form-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 1.8rem;
}

/* honeypot — invisible to people, present for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .moment {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.8rem;
    text-align: center;
  }

  .moment .phone,
  .moment.flip .phone {
    order: 2;
  }

  .moment p {
    margin-left: auto;
    margin-right: auto;
  }

  .how .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Stacked single column: the horizontal thread has nothing left to
     connect, and a vertical one would run behind the paragraph text. */
  .how .steps::before {
    display: none;
  }

  .step .num {
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 640px) {
  .hero .phone {
    margin-bottom: -100px;
  }

  .how {
    padding-top: 160px;
  }

  .site-footer {
    margin-top: 5rem;
  }
}
