/* Homepage only. Shared tokens live in site.css. */

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

.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 4.9vw, 60px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 13ch;
}
.hero .lede {
  margin-top: 22px;
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34rem;
}
.hero .actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero .note {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
}

/* The demo: a school email on the left, what Galileo found on the right. */

.demo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 20px;
  align-items: start;
}

.mail {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.6;
  box-shadow: 0 24px 48px -32px rgba(18, 20, 28, 0.28);
}
.mail-head {
  background: var(--fill);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.mail-head strong {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 2px;
}
.mail-body { padding: 14px 16px 18px; }
.mail-body p + p { margin-top: 10px; }

.mark {
  --hl: var(--cobalt-tint);
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;
  border-radius: 3px;
  padding: 0 2px;
  margin: 0 -2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: mark 0.55s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.mark.todo { --hl: var(--coral-tint); }
.mark.news { --hl: var(--purple-tint); }

@keyframes mark {
  to { background-size: 100% 100%; }
}

/* A phone-width slice of the app's Today screen. */

.today {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 20px 16px 18px;
  margin-top: 44px;
  box-shadow: 0 32px 64px -36px rgba(18, 20, 28, 0.35);
  font-size: 14px;
}
.today h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.today .date { color: var(--muted); font-size: 13px; margin-top: 2px; }

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 14px;
}
.day {
  background: var(--fill);
  border-radius: 12px;
  text-align: center;
  padding: 6px 0 7px;
  line-height: 1.15;
}
.day span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }
.day b { display: block; font-family: var(--heading); font-size: 16px; font-weight: 600; margin-top: 2px; }
.day i {
  display: block;
  width: 5px;
  height: 5px;
  margin: 3px auto 0;
  border-radius: 50%;
  background: transparent;
}
.day.dot i { background: var(--coral); }
.day.on { background: var(--cobalt); }
.day.on span, .day.on b { color: #fff; }
.day.on.dot i { background: #fff; }

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.tile {
  border-radius: 16px;
  padding: 10px 12px 11px;
  line-height: 1.2;
}
.tile b { display: block; font-family: var(--heading); font-size: 26px; font-weight: 700; }
.tile span { font-size: 12.5px; font-weight: 500; }
.tile.todo { background: var(--coral-tint); }
.tile.todo b { color: var(--coral-text); }
.tile.todo span { color: var(--coral-deep); }
.tile.event { background: var(--cobalt-tint); color: var(--cobalt-text); }

.today h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  margin-top: 6px;
  line-height: 1.3;
}
.row .title { font-weight: 600; font-size: 14px; }
.row .sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.check {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--cobalt);
  border-radius: 5px;
}
.when {
  flex: none;
  width: 42px;
  text-align: center;
  border-radius: 10px;
  background: var(--cobalt-tint);
  color: var(--cobalt-text);
  padding: 4px 0 5px;
  line-height: 1.1;
}
.when span { display: block; font-size: 10px; font-weight: 700; }
.when b { display: block; font-family: var(--heading); font-size: 17px; font-weight: 600; }
.mailicon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple-tint);
  display: grid;
  place-items: center;
}
.mailicon svg { width: 16px; height: 16px; stroke: var(--purple); }
.row .clip {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.found {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.45s ease-out forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mark { animation: none; background-size: 100% 100%; }
  .found { animation: none; opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.tinted { background: var(--fill); }
.section h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 22ch;
}
.section .intro {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  max-width: 38rem;
}

/* How it works: a real sequence, so it is numbered. */

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cobalt-tint);
  color: var(--cobalt-text);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 18px;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 56px;
  right: calc(-1 * clamp(24px, 4vw, 48px) + 16px);
  height: 1px;
  background: var(--line);
}
.steps h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.steps p { margin-top: 8px; color: var(--muted); }

/* The four tabs */

.tabs-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.tabs li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.tabicon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ground);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.tabicon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabs h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
.tabs p { margin-top: 4px; color: var(--muted); }
.tabs q { quotes: "\201C" "\201D"; color: var(--ink); }

/* Privacy */

.promises {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(32px, 6vw, 80px);
  max-width: 920px;
}
.promises h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  padding-left: 18px;
  border-left: 3px solid var(--pin);
}
.promises p { margin-top: 6px; color: var(--muted); padding-left: 21px; }
.section .more { margin-top: 36px; font-weight: 600; }

/* Get Galileo */

.get {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.panel {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3.5vw, 36px);
}
.panel h3 { font-size: 22px; font-weight: 600; }
.panel > p { margin-top: 8px; color: var(--muted); }
.panel .btn { margin-top: 22px; }

.waitlist { margin-top: 22px; }
.waitlist label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.waitlist .field {
  display: flex;
  gap: 10px;
}
.waitlist input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist input:focus { outline: none; border-color: var(--cobalt); }
.waitlist input[aria-invalid="true"] { border-color: var(--danger); }
.waitlist .status {
  min-height: 1.5em;
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}
.waitlist .status.ok { color: var(--pin-text); font-weight: 600; }
.waitlist .status.err { color: var(--danger); }

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

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .demo { max-width: 640px; }
  .tabs-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps li:not(:last-child)::after { display: none; }
  .promises { grid-template-columns: minmax(0, 1fr); }
  .get { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .demo { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .today { margin-top: 0; }
  .waitlist .field { flex-direction: column; }
  .hero .actions .btn { flex: 1 1 auto; }
}

/* Animation delays for the hero demo (classes, not inline styles, for a strict CSP). */
.d_5 { --d: .5s; }
.d_8 { --d: .8s; }
.d1_1 { --d: 1.1s; }
.d1_4 { --d: 1.4s; }
.d1_7 { --d: 1.7s; }
.d2 { --d: 2s; }
.d2_3 { --d: 2.3s; }
.d2_6 { --d: 2.6s; }
.d2_9 { --d: 2.9s; }
.d3_2 { --d: 3.2s; }
