/* My Personal Health: one-page marketing site. Brand values from the iPad marketing set's COPY.md. */

:root {
  --accent: #e5665c;
  --bg: #120e0c;
  --bg-top: #171310;
  --surface: #1e1915;
  --text: #f5f1ee;
  --text-muted: #b3aaa3;
  --text-faint: #857c75;
  --line: rgba(255, 255, 255, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --radius-device: clamp(18px, 2.4vw, 32px);
}

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

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

body {
  margin: 0;
  background: radial-gradient(ellipse 80% 50% at 85% 0%, rgba(229, 102, 92, 0.16), transparent 70%),
              linear-gradient(180deg, var(--bg-top), var(--bg) 40%, #000);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header { padding: 28px 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  text-decoration: none;
}

.brand img { border-radius: 11px; }

/* Type */

h1,
h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6.2vw, 76px); }

h2 { font-size: clamp(30px, 4vw, 52px); }

.lede {
  margin: 24px 0 0;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: clamp(19px, 1.9vw, 24px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Device frame around the iPad screenshots (2064 × 2752 portrait, shown at 1032 × 1376) */

.device {
  margin: 0;
  padding: clamp(8px, 1vw, 12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-device);
  background: #050404;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.device img {
  aspect-ratio: 1032 / 1376;
  border-radius: calc(var(--radius-device) - 8px);
}

/* Hero */

.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 9vw, 120px); }

.hero__inner,
.feature__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero__sub {
  margin: 40px 0 0;
  padding-top: 28px;
  max-width: 40ch;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 16px;
}

.hero__sub .eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.device--hero { max-width: 480px; justify-self: end; width: 100%; }

/* Features */

.feature {
  padding: clamp(56px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.feature__copy p:not(.eyebrow) {
  margin: 20px 0 0;
  max-width: 36ch;
  color: var(--text-muted);
  font-size: clamp(18px, 1.6vw, 21px);
}

.feature .device { max-width: 440px; width: 100%; justify-self: end; }

.feature--flip .feature__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.feature--flip .feature__copy { order: 2; }
.feature--flip .device { justify-self: start; }

/* Contact */

.contact {
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact p { margin: 28px 0 0; }

.button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0f0d;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button:hover,
.button:focus-visible { background: #ee7a71; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Footer */

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 14px;
}

.site-footer p { margin: 0 0 8px; }

.site-footer a { color: var(--text-muted); }

/* Narrow screens: stack copy above the screenshot */

@media (max-width: 860px) {
  .hero__inner,
  .feature__inner,
  .feature--flip .feature__inner { grid-template-columns: minmax(0, 1fr); }

  .feature--flip .feature__copy { order: 0; }

  .device--hero,
  .feature .device,
  .feature--flip .device { justify-self: center; max-width: 420px; }
}
