/* Moonshot Lab — the studio is the night; each app brings its own morning.
   Studio: deep night blue, moonlight cream, Bricolage Grotesque.
   Arise: its own Dawn palette from the app (paper, cocoa ink, clay) and Instrument Serif. */

:root {
  --night: #0e1626;
  --night-2: #16223a;
  --night-3: #22304b;
  --moon: #ede6d3;
  --moon-dim: #c9c3b2;
  --dust: #93a0b8;
  --earthshine: #1b2840;
  --rule-night: rgba(237, 230, 211, 0.14);

  --paper-top: #fdf3e6;
  --paper: #fbeddd;
  --paper-bottom: #fae7d6;
  --cocoa: #3d322b;
  --cocoa-2: #6b5a4e;
  --clay: #c97b3d;
  --clay-ink: #a35f28;
  --ochre: #a5713f;
  --rule-day: rgba(61, 50, 43, 0.14);

  --studio: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --arise: "Instrument Serif", ui-serif, Georgia, serif;

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: var(--studio);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }
.app-name { font-family: var(--arise); font-style: italic; color: var(--ochre); font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin-bottom: 12px; }

:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 3px;
  border-radius: 6px;
}
.day :focus-visible { outline-color: var(--cocoa); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--moon);
  color: var(--night);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

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

.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--dust);
  text-decoration: none;
  font-size: 0.975rem;
  white-space: nowrap;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.site-nav a:hover { color: var(--moon); background: var(--night-2); }
.day .site-nav a { color: var(--cocoa-2); }
.day .site-nav a:hover { color: var(--cocoa); background: rgba(61, 50, 43, 0.07); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px) scale(0.98); }
.button-moon { background: var(--moon); color: var(--night); }
.button-moon:hover { background: #fff8e6; }
.button-ghost { border-color: var(--rule-night); color: var(--moon); }
.button-ghost:hover { border-color: var(--moon-dim); }
.button-clay { background: var(--clay); color: #fff8ef; }
.button-clay:hover { background: #b96d31; }
.button-cocoa { border-color: var(--rule-day); color: var(--cocoa); }
.button-cocoa:hover { border-color: var(--cocoa-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 72px;
  background:
    radial-gradient(1200px 700px at 78% 40%, #1a2944 0%, rgba(14, 22, 38, 0) 70%),
    var(--night);
}
.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.wordmark {
  font-size: clamp(3.4rem, 10.5vw, 9.5rem);
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: -0.045em;
  line-height: 0.86;
  font-variation-settings: "wdth" 85;
}
.wordmark span { display: block; }
.wordmark .lab { color: var(--moon-dim); font-weight: 300; }
.hero .lede {
  max-width: 30ch;
  margin: 32px 0 36px;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--moon);
}
.hero-moon { position: relative; justify-self: end; width: min(100%, 520px); }
.hero-moon svg { width: 100%; height: auto; overflow: visible; }

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

.section { padding: clamp(88px, 12vw, 160px) 0; }
.section-head { max-width: 40rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90;
}
.section-head p { margin-top: 18px; color: var(--dust); font-size: 1.125rem; max-width: 34rem; }

/* ---------- App shelf ---------- */

.shelf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-night); }
.shelf > li { border-bottom: 1px solid var(--rule-night); }
.app-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 0.9fr) minmax(0, 1.4fr) 13rem;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding: 36px 0;
}
.app-row .phase { width: 88px; height: 88px; }
.app-row h3 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -0.02em; }
.app-row .status { margin-top: 8px; color: var(--dust); font-size: 0.975rem; }
.app-row .about { color: var(--moon-dim); max-width: 44ch; }
.app-row .about strong { color: var(--moon); font-weight: 500; }
.app-row .go { justify-self: end; }
.app-row.is-quiet h3 { color: var(--moon-dim); font-weight: 400; }
.app-row.is-quiet .about { color: var(--dust); }

.app-row .arise-name { font-family: var(--arise); font-weight: 400; font-size: clamp(2.4rem, 4.2vw, 3.3rem); letter-spacing: 0; line-height: 0.95; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--dust);
  font-size: 0.925rem;
}
.legend li { display: inline-flex; align-items: center; gap: 10px; }
.legend svg { width: 20px; height: 20px; }

/* ---------- Night to dawn ---------- */

.dawn-band {
  position: relative;
  background: linear-gradient(180deg, var(--paper-top), var(--paper) 40%);
  color: var(--cocoa);
}
.horizon {
  position: relative;
  z-index: 1;
  height: clamp(200px, 26vw, 380px);
  margin-bottom: -2px;
  overflow: hidden;
  background: linear-gradient(180deg,
    var(--night) 0%,
    #1f2439 22%,
    #4a3240 46%,
    #a8674c 68%,
    #eab98a 86%,
    var(--paper-top) 100%);
}
.horizon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: min(90vw, 900px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 160, 0.55) 0%, rgba(255, 214, 160, 0) 60%);
}

.spotlight .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.spotlight { padding-top: clamp(48px, 6vw, 96px); }
.spot-copy .kicker { color: var(--ochre); font-family: var(--arise); font-style: italic; font-size: 1.35rem; }
.spot-copy h2 {
  margin-top: 8px;
  font-family: var(--arise);
  font-weight: 400;
  font-size: clamp(3rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--cocoa);
}
.spot-copy p { margin: 24px 0 32px; max-width: 34ch; color: var(--cocoa-2); font-size: 1.125rem; }
.spot-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin: 0 0 36px;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule-day);
}
.spot-facts dt { font-family: var(--arise); font-size: 1.6rem; line-height: 1.1; color: var(--cocoa); }
.spot-facts dd { margin: 4px 0 0; color: var(--cocoa-2); font-size: 0.95rem; }

/* ---------- Phones ---------- */

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: end;
}
/* iPhone 17 Pro: full 402 x 874 pt screens (1206 x 2622 px) in a silver aluminium frame.
   Sizes are in cqw, so the frame keeps its proportions at any width. */
.iphone {
  margin: 0;
  width: 100%;
  container-type: inline-size;
}
.iphone-body {
  position: relative;
  padding: 3.6cqw;
  border-radius: 17cqw;
  background: #121214;
  box-shadow:
    inset 0 0 0 1.1cqw #d9d6d1,
    inset 0 0 0 1.5cqw #a9a59f,
    inset 0 0 0 1.9cqw #18181a,
    0 5cqw 12cqw -5cqw rgba(61, 50, 43, 0.55),
    0 1.5cqw 3cqw rgba(61, 50, 43, 0.12);
}
.iphone-body::before,
.iphone-body::after {
  content: "";
  position: absolute;
  width: 1.1cqw;
  border-radius: 1cqw;
  background: linear-gradient(90deg, #a9a59f, #e3e0db);
}
/* Action button, volume up, volume down on the left. */
.iphone-body::before {
  left: -0.9cqw;
  top: 19%;
  height: 6%;
  box-shadow: 0 17cqw 0 0 #c4c0ba, 0 32cqw 0 0 #c4c0ba;
}
/* Side button and Camera Control on the right. */
.iphone-body::after {
  right: -0.9cqw;
  top: 29%;
  height: 10.5%;
  box-shadow: 0 50cqw 0 -0.1cqw #c4c0ba;
}
.iphone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 13.5cqw;
  background: var(--paper);
}
.phones .iphone:nth-child(2) { transform: translateY(-40px); }

/* ---------- Principles ---------- */

.day-plain { background: var(--paper); color: var(--cocoa); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.principles h3 { font-size: 1.5rem; letter-spacing: -0.015em; color: var(--cocoa); }
.principles p { margin-top: 12px; color: var(--cocoa-2); max-width: 32ch; }
.dawn-band .studio { padding-top: clamp(24px, 4vw, 48px); }
.studio-head h2 { color: var(--cocoa); }
.studio-head p { color: var(--cocoa-2); }

/* ---------- Footer ---------- */

.site-foot { background: var(--night); color: var(--moon); padding: clamp(80px, 10vw, 128px) 0 40px; }
.site-foot .contact { font-size: clamp(2rem, 5.4vw, 4.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; font-stretch: 88%; font-variation-settings: "wdth" 88; }
.site-foot .contact a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 260ms var(--ease);
}
.site-foot .contact a:hover { background-size: 100% 2px; }
.site-foot .contact .ask { display: block; color: var(--dust); font-weight: 400; font-size: 0.4em; letter-spacing: -0.01em; margin-bottom: 18px; }
.foot-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--rule-night);
  color: var(--dust);
  font-size: 0.925rem;
}
.foot-line nav { display: flex; gap: 8px; }
.foot-line a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; }
.foot-line a:hover { color: var(--moon); }

/* ---------- Arise page ---------- */

.day { background: var(--paper); color: var(--cocoa); color-scheme: light; }
.day .brand { color: var(--cocoa); }

.arise-hero {
  position: relative;
  min-height: 100svh;
  padding: 120px 0 64px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper-top), var(--paper) 55%, var(--paper-bottom));
  display: flex;
  align-items: center;
}
.arise-hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.arise-hero h1 {
  font-family: var(--arise);
  font-weight: 400;
  font-size: clamp(3.1rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--cocoa);
  max-width: 13ch;
}
.arise-hero .lede { margin: 28px 0 32px; max-width: 38ch; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--cocoa-2); }
.arise-hero .meta { margin-top: 20px; color: var(--cocoa-2); font-size: 0.95rem; }
.arise-hero .iphone { max-width: min(340px, calc((100svh - 190px) / 2.17)); justify-self: center; width: 100%; }
.sun-rise {
  position: absolute;
  left: 50%;
  bottom: -38vmin;
  width: 120vmin;
  height: 120vmin;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 178, 110, 0.38) 0%, rgba(242, 178, 110, 0.12) 40%, rgba(250, 231, 214, 0) 70%);
  pointer-events: none;
}

.day .section-head h2 { color: var(--cocoa); font-family: var(--arise); font-weight: 400; font-size: clamp(2.6rem, 5.6vw, 4.4rem); letter-spacing: -0.005em; line-height: 1; font-stretch: normal; font-variation-settings: normal; }
.day .section-head p { color: var(--cocoa-2); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.steps .iphone { max-width: 300px; margin-bottom: 32px; }
.proofs-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.proofs-layout .proofs { grid-template-columns: minmax(0, 1fr); }
.proofs-layout .proofs .proof:nth-child(n) { padding-left: 0; padding-right: 0; border-left: 0; }
.steps .n { font-family: var(--arise); font-style: italic; color: var(--ochre); font-size: 1.35rem; }
.steps h3 { margin-top: 4px; font-family: var(--arise); font-weight: 400; font-size: 2rem; line-height: 1.05; color: var(--cocoa); }
.steps p { margin-top: 10px; color: var(--cocoa-2); max-width: 32ch; }

.proofs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-day); }
.proof { padding: 32px 0; border-bottom: 1px solid var(--rule-day); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: start; }
.proofs .proof:nth-child(odd) { padding-right: clamp(16px, 3vw, 48px); }
.proofs .proof:nth-child(even) { padding-left: clamp(16px, 3vw, 48px); border-left: 1px solid var(--rule-day); }
.proof svg { width: 56px; height: 56px; }
.proof h3 { font-family: var(--arise); font-weight: 400; font-size: 1.9rem; line-height: 1.05; color: var(--cocoa); }
.proof p { margin-top: 8px; color: var(--cocoa-2); max-width: 40ch; }

.no-cheat { background: var(--cocoa); color: var(--paper); }
.no-cheat .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.no-cheat h2 { font-family: var(--arise); font-weight: 400; font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1; }
.no-cheat dl { margin: 0; }
.no-cheat dt { font-weight: 600; font-size: 1.125rem; }
.no-cheat dd { margin: 6px 0 28px; color: #e2d2c0; max-width: 46ch; }
.no-cheat dd:last-child { margin-bottom: 0; }

.runs { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.runs .iphone { max-width: 320px; justify-self: center; width: 100%; }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.milestones li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-day); }
.milestones .name { font-family: var(--arise); font-size: 1.8rem; color: var(--cocoa); }
.milestones .days { color: var(--cocoa-2); font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.get { text-align: left; }
.get .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.get h2 { font-family: var(--arise); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1; color: var(--cocoa); max-width: 14ch; }
.get p { margin-top: 16px; color: var(--cocoa-2); max-width: 40ch; }

.day .site-foot { background: var(--cocoa); color: var(--paper); }
.day .site-foot .contact .ask, .day .foot-line { color: #d8c6b2; }
.day .foot-line { border-top-color: rgba(251, 237, 221, 0.18); }
.day .foot-line a:hover { color: var(--paper); }
.day .site-foot :focus-visible { outline-color: var(--paper); }

/* ---------- Entrance (one moment per page) ---------- */

[data-enter] > * { animation: rise 900ms var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: 120ms; }
[data-enter] > *:nth-child(3) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .app-row { grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "phase name" "phase about" "phase go"; row-gap: 12px; }
  .app-row .phase { grid-area: phase; align-self: start; width: 72px; height: 72px; }
  .app-row .name-block { grid-area: name; }
  .app-row .about { grid-area: about; }
  .app-row .go { grid-area: go; justify-self: start; margin-top: 8px; }
  .spotlight .wrap, .runs, .no-cheat .wrap { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .hero .wrap, .arise-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 104px; align-items: flex-start; }
  .hero-moon { order: -1; justify-self: start; width: min(62vw, 300px); margin-bottom: 8px; }
  .arise-hero .iphone { max-width: 260px; justify-self: start; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .steps .iphone { max-width: 280px; }
  .proofs { grid-template-columns: minmax(0, 1fr); }
  .proofs-layout { grid-template-columns: minmax(0, 1fr); }
  .proofs-layout .iphone { max-width: 280px; }
  .proofs .proof:nth-child(odd), .proofs .proof:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
}

@media (max-width: 600px) {
  .site-nav a.hide-sm { display: none; }
  .site-nav a { padding: 0 10px; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .phones .iphone:nth-child(2) { transform: none; }
  .phones .iphone:nth-child(3) { display: none; }
  .spot-facts { grid-template-columns: minmax(0, 1fr); }
  .milestones { grid-template-columns: minmax(0, 1fr); }
  .actions .button { flex: 1 1 100%; }
  .app-row { grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; }
  .app-row .phase { width: 56px; height: 56px; }
}
