/* Omra homepage. It follows the app's design (design/sleek): warm cream paper, peach and sage
   panels, sage-green buttons, soft brown ink, large round corners. Fraunces for headings and big
   numbers, Nunito for everything else. Light only, like the app. */

:root {
  --bg: #fff7ee;
  --surface: #fffcf7; /* cards */
  --raised: #f8e4d5; /* secondary panels */
  --fill: #f4ebe1;
  --peach: #ffd9c4;
  --sage: #c5ddd0;
  --border: #eedccb;
  --ink: #3a2e2a;
  /* The app's muted text is #8a7a70; this is a step darker so paragraphs read easily on cream. */
  --muted: #6b5a51;
  --faint: #eedccb;
  --accent: #3e7d68; /* buttons */
  --accent-deep: #2f6a57; /* small green text */
  --mint: #9ad3b8;
  --coral: #f4a58a;
  --butter: #f6d98b;
  --c1: #b9472a; /* coral, deepened for text */
  --good: #3e7d68;
  --off: #c4574c;
  --on-tone: #fffcf7;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ro: var(--text);
  --card: 24px;
  --button: 16px;
  --pad: clamp(18px, 4vw, 48px);
  --max: 1240px;
  --bar: 68px;
  color-scheme: light;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 500;
  font-size: clamp(17px, 1.15vw, 19px);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
p,
ol,
figure {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

.display {
  font-family: var(--display);
  font-weight: 600;
  /* A text-size cut of the face, so thin strokes stay sturdy at large sizes. */
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 30;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

.ro {
  font-family: var(--ro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  line-height: 1.3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--ro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.skip:focus {
  top: 12px;
}

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

/* ---------- Header ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--faint);
}

.mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

/* The mascot, small, standing beside the name. */
.mark img {
  display: block;
  width: auto;
  height: 44px;
  margin-bottom: -3px;
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-cta {
  text-decoration: none;
  background: var(--accent);
  color: var(--on-tone);
  padding: 10px 18px;
  border-radius: var(--button);
  min-height: 44px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex;
  align-items: center;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--bar) + 28px) var(--pad) clamp(28px, 5vh, 56px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.eyebrow {
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 72px);
}

.lede {
  max-width: 40ch;
  margin: clamp(16px, 2.6vh, 24px) 0 clamp(22px, 3.5vh, 32px);
  font-size: clamp(18px, 1.35vw, 21px);
}

/* The app's live-session screen in a phone, on a peach panel with a sage corner. */
.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(22px, 3vw, 40px) clamp(16px, 3vw, 40px) clamp(16px, 2vw, 24px);
  border-radius: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(circle at 0% 100%, var(--sage) 0 30%, transparent 30.3%),
    var(--peach);
}

.phone {
  position: relative;
  width: min(100%, 310px, 38svh);
  aspect-ratio: 390 / 844;
  padding: 9px;
  border-radius: 46px;
  background: #2a201d;
  box-shadow: 0 0 0 1px rgba(255, 247, 238, 0.2), 0 30px 54px -24px rgba(58, 46, 42, 0.65);
}

/* Everything on the screen is sized from the design's 390-point width, so it scales as one. */
.phone-screen {
  --u: calc(100cqw / 390);
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--ink);
  color: #fff7ee;
  font-family: var(--text);
  container-type: inline-size;
}

.phone-screen video,
.phone-screen canvas,
.s-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.phone-screen video {
  object-fit: cover;
}

.s-shade {
  background: linear-gradient(rgba(58, 46, 42, 0.78), rgba(58, 46, 42, 0.06) 34%, rgba(58, 46, 42, 0.06) 66%, rgba(58, 46, 42, 0.8));
}

.phone-screen p {
  margin: 0;
}

.s-top,
.s-cue,
.s-chips,
.s-bar {
  position: absolute;
  z-index: 2;
}

.s-top {
  inset: calc(var(--u) * 50) calc(var(--u) * 20) auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 8);
  text-align: center;
}

.s-round {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 44);
  height: calc(var(--u) * 44);
  border-radius: 50%;
  background: rgba(255, 247, 238, 0.16);
}

.s-round svg {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s-round svg.is-solid {
  fill: currentColor;
}

.s-round svg.is-thick {
  stroke-width: 4;
}

.s-round.is-small {
  width: calc(var(--u) * 36);
  height: calc(var(--u) * 36);
}

.s-round.is-play {
  background: #fff7ee;
  color: var(--ink);
}

.s-pose {
  font-family: var(--display);
  font-size: calc(var(--u) * 18);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.s-label {
  font-size: calc(var(--u) * 10);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  opacity: 0.8;
}

.s-cue {
  inset: calc(var(--u) * 128) calc(var(--u) * 20) auto;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 14);
  min-height: calc(var(--u) * 76);
  padding: calc(var(--u) * 14) calc(var(--u) * 16);
  border-radius: calc(var(--u) * 24);
  border: 1px solid rgba(255, 247, 238, 0.2);
  background: rgba(58, 46, 42, 0.66);
  font-size: calc(var(--u) * 18);
  font-weight: 700;
  line-height: 1.3;
}

.s-cue i {
  flex: 0 0 auto;
  width: calc(var(--u) * 24);
  height: calc(var(--u) * 24);
  border-radius: 50%;
  border: calc(var(--u) * 2) solid rgba(255, 247, 238, 0.6);
}

.s-cue i.is-good {
  background: var(--mint);
  border-color: var(--mint);
}

.s-chips {
  inset: auto calc(var(--u) * 12) calc(var(--u) * 122);
  display: flex;
  justify-content: space-between;
}

.s-chip {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  padding: calc(var(--u) * 8) calc(var(--u) * 12) calc(var(--u) * 8) calc(var(--u) * 10);
  border-radius: calc(var(--u) * 18);
  border: 1px solid rgba(255, 247, 238, 0.2);
  background: rgba(58, 46, 42, 0.66);
}

.s-chip img {
  width: calc(var(--u) * 34);
  height: auto;
}

.s-breath {
  width: calc(var(--u) * 24);
  height: calc(var(--u) * 24);
  border-radius: 50%;
  background: radial-gradient(rgba(255, 247, 238, 0.7) 0 42%, rgba(255, 247, 238, 0.22) 46%);
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    scale: 1.25;
  }
}

.s-bar {
  inset: auto calc(var(--u) * 12) calc(var(--u) * 22);
  padding: calc(var(--u) * 11) calc(var(--u) * 16) calc(var(--u) * 13);
  border-radius: calc(var(--u) * 28);
  border: 1px solid rgba(255, 247, 238, 0.15);
  background: rgba(58, 46, 42, 0.88);
}

.s-progress {
  display: flex;
  gap: calc(var(--u) * 4);
}

.s-progress i {
  flex: 1;
  height: calc(var(--u) * 4);
  border-radius: 99px;
  background: rgba(255, 247, 238, 0.25);
}

.s-progress i.is-done {
  background: #fff7ee;
}

.s-row {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  margin-top: calc(var(--u) * 10);
}

.s-match {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 38);
  height: calc(var(--u) * 38);
  border: calc(var(--u) * 3) solid var(--mint);
  border-radius: 50%;
  font-size: calc(var(--u) * 13);
  font-weight: 800;
}

.s-num {
  font-family: var(--display);
  font-size: calc(var(--u) * 17);
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: lining-nums tabular-nums;
}

.s-controls {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  margin-left: auto;
}

.hero-art figcaption {
  position: relative;
  margin-top: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Signup ---------- */

.signup-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
}

.signup-form[hidden],
.signup.is-done .signup-note {
  display: none;
}

.signup-form input[type='email'] {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--button);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}

.signup-form input[type='email']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.signup-form input::placeholder {
  color: #8a7a70;
}

.signup-form input[aria-invalid='true'] {
  border-color: var(--off);
}

.signup-form button {
  height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--button);
  background: var(--accent);
  color: var(--on-tone);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.signup-form button:hover {
  background: var(--accent-deep);
}

.signup-form button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.signup-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.trap {
  position: absolute;
  left: -9999px;
}

.signup-message {
  min-height: 0;
  margin-top: 10px;
  font-size: 17px;
}

.signup-message:empty {
  display: none;
}

.signup-message.is-error {
  color: var(--off);
}

.signup.is-done .signup-message {
  font-size: clamp(20px, 2vw, 26px);
  color: var(--good);
}

.signup-note {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Shared section layout ---------- */

.helps,
.streak,
.join {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--pad);
}

/* ---------- How it helps ---------- */

.helps > h2 {
  max-width: 18ch;
  font-size: clamp(30px, 3.8vw, 56px);
}

.help-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  margin-top: clamp(28px, 4vw, 48px);
}

.help {
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--card);
  background: var(--surface);
  border: 1px solid var(--border);
}

.help .ro {
  color: var(--accent-deep);
}

.help h3 {
  margin: 10px 0 10px;
  font-size: clamp(22px, 2vw, 28px);
}

.help p {
  color: var(--muted);
}

/* What's in the app, as three plain numbers. */
.counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  margin: clamp(14px, 2vw, 28px) 0 0;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--card);
  background: var(--peach);
}

.counts div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.counts dd {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
}

.counts dt {
  max-width: 24ch;
}

/* ---------- Streak ---------- */

.streak {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--pad);
}

.streak h2 {
  font-size: clamp(34px, 4.4vw, 64px);
}

.streak-copy p {
  max-width: 32ch;
  margin-top: 20px;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
}

.day {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.day .ro {
  font-size: 14px;
  color: var(--muted);
}

.day svg {
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 16% 18%;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  transition-delay: calc(var(--i) * 140ms);
}

.week.is-live .day.is-done svg {
  background: var(--good);
  border-color: var(--good);
  color: var(--on-tone);
}

.day.is-next svg {
  border: 1.5px dashed var(--c1);
  color: var(--c1);
}

.day.is-rest svg {
  opacity: 0.35;
}

.streak-readout {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--faint);
  font-size: clamp(17px, 1.6vw, 22px);
}

.streak-readout span:first-child {
  color: var(--good);
}

.streak-readout span:last-child {
  color: var(--c1);
}

/* ---------- Closing ---------- */

.join {
  padding-top: 0;
}

.join-copy {
  padding: clamp(28px, 5vw, 64px);
  border-radius: clamp(24px, 3vw, 40px);
  background: var(--raised);
}

.join h2 {
  font-size: clamp(30px, 3.8vw, 56px);
}

.join-copy > p {
  max-width: 34ch;
  margin: 16px 0 26px;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px var(--pad) 34px;
  border-top: 1px solid var(--faint);
}

.foot .mark {
  font-size: 24px;
}

.foot .ro {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: calc(var(--bar) + 32px);
  }

  .mark img {
    height: 38px;
  }

  .bar-cta {
    display: none;
  }

  .streak,
  .help-list,
  .counts {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .day .ro {
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .signup-form {
    flex-direction: column;
  }

  .signup-form input[type='email'] {
    flex: none;
  }
}

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

  .day svg {
    transition: none;
  }

  .s-breath {
    animation: none;
  }
}
