/* ============================================================
   UpWake landing — identity from Figma (UpWake file)
   accent #008DFB · secondary #F47C2F · ink #333333
   bg #F6F8FC · surfaces #FFFFFF · lines #E8EAF2
   ============================================================ */

:root {
  --blue: #008DFB;
  --blue-dark: #0072CF;
  --blue-soft: #E1F2FF;
  --orange: #F47C2F;
  --orange-soft: #FEEEE1;
  --ink: #333333;
  --ink-strong: #1E2430;
  --muted: #5D6470;
  --faint: #8A90A0;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --line: #E8EAF2;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-card: 0 10px 30px rgba(19, 15, 38, 0.07);
  --shadow-pop: 0 24px 60px rgba(19, 15, 38, 0.16);
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.section { padding-block: 104px; }

h1, h2, h3 { color: var(--ink-strong); line-height: 1.12; margin: 0; }

h1 {
  font-size: clamp(2.75rem, 1.4rem + 4.6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 1.3rem + 2.3vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.022em;
}

h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 0;
  border-radius: 999px;
  padding: 17px 30px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 141, 251, 0.32);
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }

.btn-header { padding: 12px 22px; font-size: 0.9375rem; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-strong);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); transform: none; }

.btn-white {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 12px 28px rgba(4, 40, 73, 0.28);
}
.btn-white:hover { color: var(--blue); transform: translateY(-1px); }

.btn-block { width: 100%; }

.ic-apple { width: 20px; height: 20px; flex: none; }

/* App Store badge (dark) */
.btn-store {
  background: #101319;
  color: #fff;
  padding: 13px 26px;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(16, 19, 25, 0.25);
}
.btn-store:hover { background: #23272f; color: #fff; transform: translateY(-1px); }
.btn-store-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn-store-text small { font-size: 0.6875rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.01em; }
.btn-store-text strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

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

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 252, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(246, 248, 252, 0.94); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 76px;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wm-up { color: var(--blue); }
.wm-wake { color: var(--ink-strong); }
.wordmark:hover { color: inherit; }

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
}
.site-nav a:hover { color: var(--ink-strong); }

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

.hero {
  position: relative;
  padding-block: 168px 96px;
  overflow: clip;
  background:
    radial-gradient(52rem 30rem at 8% -6%, #E3EEFF 0%, transparent 62%),
    radial-gradient(46rem 28rem at 96% 4%, #EFEAFF 0%, transparent 58%),
    radial-gradient(40rem 26rem at 55% 108%, #E1F2FF 0%, transparent 60%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(19, 15, 38, 0.05);
}
.eyebrow-ic { border-radius: 6px; }

.hero-copy h1 { margin-top: 26px; }
.hero-copy .accent { color: var(--blue); }

.lead {
  margin-top: 26px;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-strong);
  font-weight: 500;
  max-width: 34em;
}

.sub {
  margin-top: 14px;
  color: var(--muted);
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--faint);
}
.trust-row svg { width: 14px; height: 14px; color: #34C759; }

/* Phone mockup */

.hero-visual { display: flex; justify-content: center; }

.phone-wrap {
  position: relative;
  width: min(330px, 78vw);
}

.phone {
  border-radius: 52px;
  padding: 11px;
  background: linear-gradient(160deg, #2A2F3B, #12151C);
  box-shadow: var(--shadow-pop), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  animation: phone-float 7s ease-in-out infinite alternate;
}

.phone img { border-radius: 42px; }

@keyframes phone-float {
  from { transform: translateY(-6px) rotate(-1.1deg); }
  to   { transform: translateY(10px) rotate(0.6deg); }
}

.float-card {
  position: absolute;
  left: -74px;
  bottom: 88px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 17px 13px 13px;
  box-shadow: var(--shadow-card);
  animation: card-float 6.4s ease-in-out infinite alternate;
}

@keyframes card-float {
  from { transform: translateY(4px); }
  to   { transform: translateY(-7px); }
}

.float-card-bell {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}
.float-card-bell svg { width: 20px; height: 20px; }

.float-card-text { display: flex; flex-direction: column; gap: 3px; }
.float-card-text strong { font-size: 0.8125rem; font-weight: 600; color: var(--ink-strong); white-space: nowrap; }
.float-card-text em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 8px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* ---------- Features ---------- */

.features .section-head { text-align: center; max-width: 620px; margin-inline: auto; }
.section-sub { margin-top: 16px; color: var(--muted); font-size: 1.125rem; }

.mission-group { margin-top: 72px; }

.group-head { display: flex; align-items: center; gap: 20px; }

.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-orange { background: var(--orange-soft); color: #C65F1D; }

.group-line { flex: 1; height: 1px; background: var(--line); }

.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.mission-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.mission-card img { width: 84px; height: 84px; margin-bottom: 18px; }
.mission-card h3 { margin-bottom: 8px; }
.mission-card p { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }

/* ---------- Final CTA ---------- */

.final-cta { padding-block: 40px; }

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60rem 24rem at 85% -30%, rgba(255, 255, 255, 0.16) 0%, transparent 60%),
    linear-gradient(135deg, #008DFB 0%, #0072CF 78%);
  padding: 88px 48px 92px;
  text-align: center;
  color: #fff;
  box-shadow: 0 30px 70px rgba(0, 114, 207, 0.35);
}

.cta-panel h2 { color: #fff; max-width: 15em; margin-inline: auto; position: relative; z-index: 1; }
.cta-panel p {
  margin: 18px auto 36px;
  max-width: 34em;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  z-index: 1;
}
.cta-panel .btn { position: relative; z-index: 1; }

.cta-sun {
  position: absolute;
  top: -70px;
  right: -52px;
  width: 210px;
  height: 210px;
  border-radius: 52px;
  transform: rotate(8deg);
  box-shadow: 0 24px 48px rgba(4, 40, 73, 0.35);
}

.cta-character {
  position: absolute;
  bottom: -30px;
  left: -26px;
  width: 320px;
  opacity: 0.98;
  transform: rotate(-2deg);
  pointer-events: none;
}

/* ---------- Support ---------- */

.support {
  background:
    radial-gradient(40rem 22rem at 100% 0%, #EFEAFF 0%, transparent 55%),
    var(--bg);
}

.support-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.support-copy h2 { max-width: 9em; }
.support-copy p { margin-top: 18px; color: var(--muted); max-width: 30em; }
.support-mail { margin-top: 22px; font-weight: 500; color: var(--ink); }
.support-mail a { font-weight: 600; }

.support-form-wrap { position: relative; }

.support-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 20px;
}

.field { display: grid; gap: 8px; }

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.req { color: var(--orange); }

.field input,
.field textarea {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink-strong);
  background: #FAFBFE;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.field input:hover,
.field textarea:hover { border-color: #D5D9E6; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 141, 251, 0.14);
}

.field input.invalid,
.field textarea.invalid { border-color: #E5484D; }

.field textarea { resize: vertical; min-height: 120px; }

.form-error {
  font-size: 0.875rem;
  color: #D93843;
  background: #FDF0F0;
  border-radius: 10px;
  padding: 10px 14px;
}

.form-error[hidden],
.support-success[hidden],
.support-form[hidden] { display: none; }

.support-success {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 36px;
  box-shadow: var(--shadow-card);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.support-success h3 { font-size: 1.375rem; }
.support-success p { color: var(--muted); max-width: 26em; }
.support-success .btn { margin-top: 10px; }

.success-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}
.success-badge svg { width: 30px; height: 30px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 40px 0 32px;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-nav a { color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.footer-nav a:hover { color: var(--ink-strong); }

.footer-bottom { margin-top: 26px; }
.footer-bottom p { font-size: 0.875rem; color: var(--faint); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .float-card { animation: none; }
  .btn, .mission-card { transition: none; }
}

/* ---------- Legal pages ---------- */

.legal-page main {
  padding-block: 148px 96px;
  background:
    radial-gradient(46rem 24rem at 12% -4%, #E3EEFF 0%, transparent 58%),
    radial-gradient(40rem 22rem at 92% 0%, #EFEAFF 0%, transparent 52%),
    var(--bg);
}

.legal { max-width: 780px; }

.legal-head { margin-bottom: 40px; }

.legal-dates {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--faint);
  margin-bottom: 12px;
}

.legal h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.25rem); }

.legal section { margin-top: 44px; }
.legal section h2 { font-size: 1.5rem; margin-bottom: 14px; }
.legal section p { margin-top: 12px; color: var(--ink); }
.legal section p:first-of-type { margin-top: 0; }
.legal ul, .legal ol { margin: 12px 0 0; padding-left: 24px; display: grid; gap: 8px; }
.legal li { color: var(--ink); }
.legal li::marker { color: var(--faint); font-weight: 600; }

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 16px;
  padding: 26px 30px;
  box-shadow: var(--shadow-card);
}
.callout h2 { font-size: 1.25rem; margin-bottom: 10px; }
.callout p { color: var(--muted); font-size: 0.9375rem; margin-top: 8px; }
.callout ul { font-size: 0.9375rem; }
.callout li strong { color: var(--ink-strong); }

/* ---------- 404 ---------- */

.legal-page main:has(.notfound) {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-block: 120px 48px;
}

.notfound {
  position: relative;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 72px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  max-width: 560px;
}

.notfound-sun {
  position: absolute;
  top: -56px;
  right: -44px;
  width: 128px;
  height: 128px;
  border-radius: 32px;
  transform: rotate(8deg);
  box-shadow: 0 16px 32px rgba(19, 15, 38, 0.18);
}

.notfound-code {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 6px 14px;
}

.notfound h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
.notfound-sub { color: var(--muted); max-width: 26em; }
.notfound .btn { margin-top: 14px; }

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

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 72px; }
  .hero { padding-block: 148px 80px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead, .hero-copy .sub { margin-inline: auto; }
  .cta-row, .trust-row { justify-content: center; }
  .mission-grid { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: 1fr; gap: 44px; }
  .float-card { left: -12px; }
  .cta-character { display: none; }
}

@media (max-width: 640px) {
  .section { padding-block: 72px; }
  .header-inner { gap: 14px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.8125rem; }
  .btn-header span { display: none; }
  .btn-header { padding: 12px 16px; }
  .hero { padding-block: 128px 64px; }
  .float-card { bottom: 46px; left: -8px; }
  .float-card-text strong, .float-card-text em { white-space: normal; }
  .mission-grid { grid-template-columns: 1fr; }
  .cta-panel { padding: 64px 24px; }
  .cta-sun { width: 120px; height: 120px; top: -44px; right: -40px; border-radius: 30px; opacity: 0.55; }
  .support-form { padding: 26px 20px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
