/* Quenda — "dawn fog": the walk home after a night shift. */
:root {
  --fog: #F1F0EC;
  --fog-2: #E7E5DF;
  --paper: #FFFFFF;
  --ink: #17181C;
  --ink-2: #4A4A47;
  --ink-3: #6B6A66;
  --line: #E1DED7;
  --predawn: #0E1017;
  --night: #2D3157;
  --night-2: #4B4F86;
  --night-text: #B9BCE6;
  --alba: #EDC6AE;
  --alba-deep: #E5AD8B;
  --tarde: #D8B57C;
  --salvia: #6E8B78;
  --salvia-text: #55735F;
  --warn: #9A6B1F;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { background: var(--predawn); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  /* Must match the top of the hero sky: iOS Safari tints its toolbar from the page
     background (theme-color is ignored), so a light body shows as a pale bar. */
  background: var(--predawn);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.mark { width: 26px; height: 26px; }
.mark-night { fill: var(--night); }
.mark-day { fill: #E8B593; }
.wordmark { font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: -0.03em; line-height: 1; padding-bottom: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--sans); border: 0; cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease), opacity .3s;
}
.btn:active { transform: scale(.98); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-light { background: #F4F2EE; color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-ghost { color: #E9E8F0; background: rgba(255,255,255,.08); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-dark { background: var(--ink); color: #F4F2EE; }
.btn-dark:hover { background: #000; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) 18px calc(32px + env(safe-area-inset-left));
  color: #F4F2EE;
  transition: background-color .4s var(--ease), color .4s var(--ease), backdrop-filter .4s;
}
/* Once anything scrolls under it, the nav needs its own ground or the hero type shows through. */
.nav.scrolled { background: rgba(14,16,23,.9); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.nav .mark-night { fill: #8A8FC4; }
.nav.solid { background: rgba(241,240,236,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--ink); }
.nav.solid .mark-night { fill: var(--night); }
.nav.solid .btn-light { background: var(--ink); color: #F4F2EE; }
.nav-links { display: flex; gap: 32px; font-size: 15px; opacity: .86; }
.nav-links a:hover { opacity: .6; }
.nav-cta { display: flex; align-items: center; gap: 22px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: 150px 24px 110px;
  background: var(--predawn);
  color: #F4F2EE;
}
.sky {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    #0E1017 0%, #121427 28%, #1C1D38 44%, #3A3150 58%, #8E6E78 68%, #D9A88E 74%, #EFD6C3 78%, var(--fog) 86%);
}
.stars {
  position: absolute; inset: 0 0 50% 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 78% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 36%, #fff 50%, transparent 51%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.sun {
  position: absolute; left: 50%; top: 74%; width: 1100px; height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(248,214,190,.75) 0%, rgba(237,180,150,.28) 40%, rgba(237,198,174,0) 70%);
  filter: blur(8px);
}
.horizon { position: absolute; left: 0; right: 0; top: 78.5%; height: 1px; background: rgba(255,255,255,.35); }

.hero-copy { position: relative; z-index: 2; max-width: 860px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.eyebrow { font: 500 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #A3A5BD; }
.eyebrow.dark { color: var(--ink-3); }
h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(46px, 7.2vw, 96px); line-height: .98; letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 em, h2 em { font-weight: 300; }
.lede { font-size: 19px; line-height: 1.5; color: #C9CADA; max-width: 560px; text-wrap: pretty; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding-top: 8px; }

.hero-phone { position: relative; z-index: 1; margin-top: 64px; width: 330px; }
.hero-phone .phone { margin: 0 auto; }

/* ---------- Phone (HTML recreation of the Paper "Hoy (noche)" screen) ---------- */
.phone {
  width: 330px; height: 660px; border-radius: 52px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 10px #1B1D27, 0 0 0 11px #3A3D4D, 0 30px 70px rgba(14,16,23,.35);
  font-family: var(--sans);
}
.phone-night {
  background: linear-gradient(180deg, #0E1017 0%, #191C33 30%, #2A2740 46%, #0E1017 58%);
  color: #F4F2EE;
}
.ph-status { display: flex; justify-content: space-between; padding: 18px 30px 0; font: 600 15px/1 system-ui; }
.ph-icons { display: inline-flex; }
.ph-icons svg { width: 66px; height: 18px; fill: #fff; }
.ph-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.ph-unit { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: #E9E8F0; background: rgba(255,255,255,.07); border-radius: 99px; padding: 6px 12px 6px 9px; }
.ph-unit svg { width: 15px; height: 15px; }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; background: #2A2D45; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.ph-hero { text-align: center; padding: 34px 20px 0; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ph-label { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #A3A5BD; }
.ph-big { font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1.08; letter-spacing: -0.03em; }
.ph-time { font-family: var(--serif); font-weight: 300; font-size: 20px; color: #D9D7E4; }
.ph-sub { font-size: 13px; line-height: 1.45; color: #A3A5BD; max-width: 240px; padding-top: 10px; }
.ph-week { display: flex; justify-content: space-between; padding: 32px 16px 0; }
.ph-week .d { width: 38px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ph-week .d span { font-size: 10px; color: #8C8EA6; }
.ph-week .d.today span { color: #F4F2EE; font-weight: 600; }
.ph-week b { width: 34px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 400 19px/1 var(--serif); }
.s-n { background: var(--night); color: #E9E8F0; }
.today .s-n { background: var(--night-2); box-shadow: inset 0 0 0 1.5px var(--alba); }
.s-m { background: var(--alba); color: var(--ink); }
.s-t { background: var(--tarde); color: var(--ink); }
.s-off { background: #1A1C28; color: #8C8EA6; }
.s-out { box-shadow: inset 0 0 0 1px #3A3D58; color: #8C8EA6; }
.ph-card { margin: 22px 14px 0; background: #171A26; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ph-card-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #A3A5BD; }
.ok { display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; color: #A9C6B2; font-size: 12px; }
.ok i { width: 6px; height: 6px; border-radius: 50%; background: #8FB39B; }
.ph-card p { font-size: 14.5px; line-height: 1.42; }
.c-n { color: var(--night-text); }
.c-m { color: var(--alba); }
.ph-card-actions { display: flex; gap: 8px; }
.pbtn { flex: 1; height: 40px; border-radius: 99px; background: #F4F2EE; color: var(--ink); display: grid; place-items: center; font-size: 13.5px; font-weight: 600; }
.pbtn.ghost { flex: 0 0 96px; background: rgba(255,255,255,.07); color: #D9D7E4; font-weight: 500; }

.ph-tabs { position: absolute; left: 12px; right: 12px; bottom: 18px; height: 56px; border-radius: 99px; background: rgba(30,33,48,.9); display: flex; justify-content: space-around; align-items: center; }
.ph-tabs span { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: #8C8EA6; }
.ph-tabs span.on { color: #F4F2EE; font-weight: 600; }
.ph-tabs svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Why ---------- */
.why { padding: 20px 24px 120px; background: var(--fog); }
.why-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 48px; align-items: end; }
.why-intro { font-family: var(--serif); font-weight: 300; font-size: 28px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.stat { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--ink); padding-top: 18px; }
.num { font-family: var(--serif); font-weight: 300; font-size: 76px; line-height: 1; letter-spacing: -0.04em; }
.num small { font-size: 34px; letter-spacing: 0; margin-left: 2px; }
.cap { font-size: 16px; line-height: 1.45; color: var(--ink-2); max-width: 280px; }
.stats { display: contents; }
.source { grid-column: 2 / 4; font-size: 13px; color: var(--ink-3); }

/* ---------- Section heads ---------- */
.section-head { max-width: 1120px; margin: 0 auto 56px; display: flex; flex-direction: column; gap: 18px; }
h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.03em; max-width: 820px; text-wrap: balance; }

/* ---------- How ---------- */
.how { padding: 120px 24px 140px; background: var(--paper); }
.steps { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--fog); border-radius: 28px; padding: 28px 28px 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.step-n { font-family: var(--serif); font-size: 18px; color: var(--ink-3); }
.step h3 { font-family: var(--sans); font-weight: 600; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.step p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.viz { margin-top: 18px; min-height: 230px; }

.viz-list { background: var(--paper); border-radius: 20px 20px 0 0; padding: 4px 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #EEECE7; }
.row:last-child { border-bottom: 0; }
.av { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.a1 { background: var(--alba); color: #5B3A28; }
.a2 { background: #D9DBEE; color: var(--night); }
.a3 { background: #E6DCC4; color: #6B5320; }
.a4 { background: #D7E1D9; color: #3B5544; }
.who { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who b { font-size: 14.5px; font-weight: 600; }
.who small { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { width: 56px; flex-shrink: 0; text-align: right; font-size: 12.5px; font-weight: 600; }
.st.ok { color: var(--salvia-text); display: block; }
.st.warn { color: var(--warn); }

.viz-swap { position: relative; display: flex; gap: 8px; align-items: flex-end; padding-bottom: 28px; }
.tile { flex: 1; height: 190px; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.tile small { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.tile span { font-size: 13.5px; line-height: 1.4; display: flex; flex-direction: column; }
.tile b { font-family: var(--serif); font-weight: 300; font-size: 28px; letter-spacing: -0.02em; }
.tile-n { background: linear-gradient(160deg, #3A3F6E, #24284A); color: #F4F2EE; transform: translateY(-14px); }
.tile-n small { color: var(--night-text); }
.tile-m { background: linear-gradient(160deg, #F5DCCB, #EAB998); color: var(--ink); transform: translateY(0); }
.tile-m small { color: #7A4A31; }
.swap-ico { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: var(--fog); display: grid; place-items: center; }
.swap-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step.in .tile-n { animation: trade-a 5s var(--ease) 1s infinite; }
.step.in .tile-m { animation: trade-b 5s var(--ease) 1s infinite; }
@keyframes trade-a { 0%, 40% { transform: translateY(-14px); } 50%, 90% { transform: translateY(0); } 100% { transform: translateY(-14px); } }
@keyframes trade-b { 0%, 40% { transform: translateY(0); } 50%, 90% { transform: translateY(-14px); } 100% { transform: translateY(0); } }

.viz-rules { display: flex; flex-direction: column; gap: 8px; padding-bottom: 28px; }
.rule { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 16px; padding: 14px 16px; font-size: 14.5px; }
.rule i { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: var(--salvia) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat; }

/* ---------- Supervisors ---------- */
.sup { background: var(--predawn); color: #F4F2EE; padding: 140px 24px; position: relative; overflow: hidden; }
.sup::before { content: ""; position: absolute; right: -200px; bottom: -260px; width: 800px; height: 600px; background: radial-gradient(50% 50% at 50% 50%, rgba(75,79,134,.45), transparent 70%); pointer-events: none; }
.sup-inner { position: relative; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 460px; gap: 80px; align-items: center; }
.sup-copy { display: flex; flex-direction: column; gap: 22px; }
.sup .lede { color: #B9BAC8; }
.ticks { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; color: #E0DFE8; }
.ticks li::before { content: ""; width: 14px; height: 1px; background: var(--alba); flex-shrink: 0; transform: translateY(-4px); }

.approval { background: #F4F2EE; color: var(--ink); border-radius: 30px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 40px 100px rgba(0,0,0,.4); }
.ap-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; font-family: var(--serif); font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
.ap-count { font-family: var(--sans); font-size: 13px; font-weight: 600; background: var(--ink); color: #F4F2EE; border-radius: 99px; padding: 4px 10px; }
.ap-item { background: var(--paper); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ap-item.dim { opacity: .9; }
.ap-who { display: flex; align-items: center; }
.ap-who .av + .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--paper); }
.ap-names { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; }
.ap-names b { font-size: 15px; }
.ap-names small { font-size: 13px; color: var(--ink-3); }
.ap-rules { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; background: var(--fog); color: var(--ink-2); }
.pill.ok { background: #E3EBE5; color: var(--salvia-text); font-weight: 600; }
.ap-actions { display: flex; gap: 8px; }
.pbtn.dark { background: var(--ink); color: #F4F2EE; height: 42px; }
.pbtn.ghost-d { flex: 0 0 110px; background: var(--fog); color: var(--ink); height: 42px; font-weight: 500; }
.ap-bulk { text-align: center; font-size: 14px; font-weight: 600; padding: 8px 0 2px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }

/* ---------- Calm ---------- */
.calm { padding: 160px 24px; background: linear-gradient(180deg, var(--fog) 0%, #ECE4DD 100%); }
.calm-inner { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.calm-moon { width: 64px; height: 64px; }
.calm p { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 600px; text-wrap: pretty; }
.calm .calm-note { font-size: 14px; color: var(--ink-3); }

/* ---------- CTA ---------- */
.cta { padding: 140px 24px 160px; background: var(--paper); }
.cta-inner { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta p { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 540px; }
.cta-form { display: flex; gap: 8px; padding-top: 10px; width: 100%; max-width: 460px; }
.cta-form input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--fog); padding: 0 22px; font: 400 16px var(--sans); color: var(--ink); outline: none; transition: border-color .2s; }
.cta-form input:focus { border-color: var(--ink); }

/* ---------- Footer ---------- */
.foot { background: var(--predawn); color: #C9CADA; padding: 36px 32px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 14px; color: var(--ink-2); }
.foot .muted { color: #8C8EA6; }
.foot .wordmark { color: #F4F2EE; }
.foot .mark-night { fill: #8A8FC4; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #F4F2EE; padding: 14px 22px; border-radius: 99px; font-size: 15px; transition: all .4s var(--ease); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.static .reveal { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .step.in .tile-n, .step.in .tile-m { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .why-inner { grid-template-columns: 1fr 1fr; }
  .why-intro { grid-column: 1 / -1; }
  .source { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; max-width: 520px; }
  .sup-inner { grid-template-columns: 1fr; gap: 56px; }
  .approval { max-width: 460px; }
}
@media (max-width: 600px) {
  .nav { padding: calc(12px + env(safe-area-inset-top)) 18px 12px; }
  .nav-cta .link { display: none; }
  .hero { padding-top: 120px; }
  .lede { font-size: 17px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { width: 100%; max-width: 360px; }
  .hero-phone { width: 324px; }
  .phone { width: 300px; }
  .phone { height: 600px; }
  .ph-week { padding-left: 10px; padding-right: 10px; }
  .why { padding-bottom: 90px; }
  .why-inner { grid-template-columns: 1fr; gap: 32px; }
  .num { font-size: 64px; }
  .how, .sup, .calm, .cta { padding-top: 96px; padding-bottom: 104px; }
  .cta-form { flex-direction: column; }
  .foot { flex-direction: column; align-items: flex-start; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
}
