@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --night: #142744;
  --petrol: #1f4c60;
  --mint: #5cd3be;
  --ivory: #faf7ef;
  --mist: #d7e2e1;
  --white: #fffdf8;
  --page: var(--ivory);
  --text: var(--night);
  --secondary: var(--petrol);
  --surface: var(--white);
  --shell: min(1120px, calc(100% - 40px));
}

[data-theme="dark"] {
  --page: #0f2039;
  --text: var(--ivory);
  --secondary: var(--mist);
  --surface: var(--petrol);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
.shell { width: var(--shell); margin-inline: auto; }

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 21px; font-weight: 600; }
.brand img { border-radius: 10px; }
nav { display: flex; gap: 34px; }
nav { margin-right: 132px; }
nav a { text-decoration: none; color: var(--secondary); font-size: 14px; font-weight: 500; }
nav a:hover, nav a:focus-visible { color: var(--text); }
.preferences { position: fixed; z-index: 20; top: 28px; right: max(20px, calc((100vw - 1120px) / 2)); display: flex; gap: 2px; padding: 3px; border: 1px solid var(--mist); border-radius: 999px; background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(14px); box-shadow: 0 6px 18px rgba(20,39,68,.08); }
.preferences button { width: 31px; height: 27px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 600 10px "Manrope", sans-serif; cursor: pointer; }
.preferences button:hover, .preferences button:focus-visible { background: var(--mist); color: var(--night); outline: none; }
[data-theme="dark"] .eyebrow { color: var(--mint); }
[data-theme="dark"] .brand, [data-theme="dark"] .back-link, [data-theme="dark"] .text-link { color: var(--ivory); }

.hero {
  min-height: 670px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  align-items: center;
  gap: 64px;
  padding-block: 45px 90px;
}
.eyebrow { margin: 0 0 18px; color: var(--petrol); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 24px; max-width: 720px; font-size: clamp(54px, 7vw, 88px); line-height: .98; letter-spacing: -.055em; font-weight: 600; }
.lead { max-width: 570px; margin-bottom: 34px; color: var(--secondary); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 13px;
  border-radius: 14px;
  background: var(--night);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: 0 14px 35px rgba(20,39,68,.15);
}
.store-button small { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 400; letter-spacing: .02em; }
.apple-mark { width: 21px; height: 25px; color: var(--mint); font-size: 25px; line-height: 20px; }
.microcopy { margin-top: 16px; color: var(--secondary); font-size: 13px; }

.app-stage { position: relative; min-height: 620px; display: grid; place-items: center; overflow: visible; }
.orbit { position: absolute; border: 1px solid rgba(31,76,96,.16); border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; }
.orbit-two { width: 370px; height: 370px; border-color: rgba(92,211,190,.5); }
.screenshots { position: relative; z-index: 1; width: 420px; height: 590px; }
.screenshot { position: absolute; width: 250px; margin: 0; padding: 0; border: 0; border-radius: 39px; overflow: hidden; background: var(--mist); box-shadow: 0 24px 44px rgba(20,39,68,.18), 0 8px 18px rgba(20,39,68,.1); cursor: pointer; transition: transform .55s cubic-bezier(.22,.75,.2,1), top .55s cubic-bezier(.22,.75,.2,1), left .55s cubic-bezier(.22,.75,.2,1), right .55s cubic-bezier(.22,.75,.2,1), opacity .4s ease, box-shadow .4s ease; }
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot-primary { z-index: 2; right: 12px; top: 8px; transform: rotate(2.5deg); }
.screenshot-secondary { z-index: 1; left: 8px; top: 42px; transform: rotate(-5deg) scale(.91); opacity: .82; }
.screenshot:hover, .screenshot:focus-visible { box-shadow: 0 30px 54px rgba(20,39,68,.23), 0 10px 22px rgba(20,39,68,.12); outline: none; }
.screenshots.is-swapped .screenshot-primary { z-index: 1; right: 158px; top: 42px; transform: rotate(-5deg) scale(.91); opacity: .82; }
.screenshots.is-swapped .screenshot-secondary { z-index: 2; left: 158px; top: 8px; transform: rotate(2.5deg) scale(1); opacity: 1; }
[data-theme="dark"] .screenshot { box-shadow: 0 24px 48px rgba(0,0,0,.34), 0 8px 18px rgba(0,0,0,.2); }
.phone {
  position: relative;
  z-index: 1;
  width: 284px;
  min-height: 552px;
  padding: 22px 18px 25px;
  border: 7px solid var(--night);
  border-radius: 48px;
  background: var(--mist);
  box-shadow: 0 32px 70px rgba(20,39,68,.2);
  transform: rotate(2deg);
}
[data-theme="dark"] .phone { border-color: var(--mist); box-shadow: 0 32px 70px rgba(0,0,0,.3); }
.phone-top { display: flex; justify-content: space-between; padding: 0 10px 28px; color: var(--petrol); font-size: 10px; font-weight: 600; }
.app-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; font-size: 19px; }
.app-title img { border-radius: 12px; }
.calculator-card { padding: 8px 17px; border-radius: 22px; background: var(--ivory); box-shadow: 0 12px 30px rgba(20,39,68,.08); }
.calc-row { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; border-bottom: 1px solid var(--mist); }
.calc-row:last-child { border-bottom: 0; }
.calc-row span { grid-row: span 2; align-self: center; color: var(--petrol); font-size: 11px; font-weight: 500; }
.calc-row strong { font-size: 19px; font-weight: 600; text-align: right; }
.calc-row em { color: var(--petrol); font-size: 9px; font-style: normal; text-align: right; }
.calc-row.result strong { color: var(--petrol); }
.calc-row.result::before { content: ""; width: 5px; height: 5px; margin-right: 7px; align-self: center; border-radius: 50%; background: var(--mint); }
.calc-row.result { grid-template-columns: auto 1fr auto; }
.calc-row.result span { grid-column: 2; }
.calc-row.result strong, .calc-row.result em { grid-column: 3; }
.phone-note { margin: 20px 0 0; color: var(--petrol); font-size: 11px; text-align: center; }

.essentials { padding: 112px 0; background: var(--night); color: var(--ivory); }
.essentials .eyebrow { color: var(--mint); }
h2 { margin-bottom: 24px; font-size: clamp(34px, 4.8vw, 58px); line-height: 1.08; letter-spacing: -.04em; font-weight: 600; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 58px; }
.metric { min-height: 190px; padding: 24px; border: 1px solid rgba(215,226,225,.18); border-radius: 20px; background: rgba(31,76,96,.35); }
.metric-dot { display: block; width: 8px; height: 8px; margin-bottom: 38px; border-radius: 50%; background: var(--mint); }
.metric p { margin-bottom: 10px; color: var(--mist); font-size: 13px; }
.metric strong { font-size: 30px; font-weight: 600; }
.metric small { margin-left: 5px; color: var(--mint); }

.privacy { display: grid; grid-template-columns: 310px 1fr; gap: 94px; align-items: center; padding-block: 130px; }
.privacy-mark { width: 280px; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: var(--mist); }
.privacy-mark::before, .privacy-mark span { grid-area: 1 / 1; }
.privacy-mark::before { content: ""; width: 108px; height: 128px; border: 8px solid var(--petrol); border-radius: 60px 60px 50px 50px; }
.privacy-mark span { display: block; width: 34px; height: 34px; border: 8px solid var(--mint); border-radius: 50%; }
.privacy p:not(.eyebrow) { max-width: 660px; color: var(--secondary); font-size: 18px; line-height: 1.65; }
.privacy ul { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 28px 0 35px; list-style: none; }
.privacy li { padding: 9px 13px; border: 1px solid var(--mist); border-radius: 999px; color: var(--secondary); font-size: 12px; font-weight: 500; }
.text-link { text-decoration: none; font-weight: 600; }
.text-link span { color: var(--mint); }

.closing { padding: 90px 20px 110px; text-align: center; }
.closing img { margin-bottom: 26px; border-radius: 18px; box-shadow: 0 12px 30px rgba(20,39,68,.14); }
.closing h2 { margin-bottom: 12px; }
.closing p { color: var(--secondary); }
footer { border-top: 1px solid var(--mist); }
.footer-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; color: var(--secondary); font-size: 12px; }
.footer-inner div { display: flex; gap: 24px; }
.footer-inner a { text-decoration: none; }

.legal-page { min-height: calc(100vh - 94px); }
.legal-header { padding-top: 30px; }
.legal-content { width: min(760px, calc(100% - 40px)); margin: 90px auto 120px; }
.legal-content h1 { font-size: clamp(42px, 6vw, 70px); }
.legal-content h2 { margin-top: 44px; margin-bottom: 14px; font-size: 24px; letter-spacing: -.02em; }
.legal-content p, .legal-content li { color: var(--secondary); line-height: 1.75; }
.legal-content ul { padding-left: 20px; }
.legal-content ol { padding-left: 22px; }
.legal-content table { width: 100%; margin: 24px 0 32px; border-collapse: collapse; }
.legal-content th, .legal-content td { padding: 14px 12px; border-bottom: 1px solid var(--mist); text-align: left; vertical-align: top; }
.legal-content th { color: var(--text); font-size: 13px; }
.legal-content td { color: var(--secondary); line-height: 1.55; }
.manual-shot { display: block; width: min(310px, 78vw); height: auto; aspect-ratio: 736 / 1600; object-fit: contain; margin: 40px auto 55px; border-radius: 42px; box-shadow: 0 25px 55px rgba(20,39,68,.18); }
.manual-example { padding: 20px; background: var(--mist); border-radius: 14px; }
.legal-content .notice { padding: 20px; border-left: 4px solid var(--mint); background: var(--mist); border-radius: 0 12px 12px 0; }
.back-link { display: inline-block; margin-bottom: 45px; text-decoration: none; font-weight: 600; }

@media (max-width: 820px) {
  nav { display: none; }
  .preferences button { width: 36px; height: 32px; font-size: 11px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-top: 50px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .app-stage { min-height: 590px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .privacy { grid-template-columns: 1fr; gap: 55px; text-align: center; }
  .privacy-mark { margin: 0 auto; }
  .privacy p:not(.eyebrow) { margin-inline: auto; }
  .privacy ul { justify-content: center; }
}

@media (max-width: 520px) {
  :root { --shell: calc(100% - 28px); }
  .site-header { height: 76px; }
  .brand span { display: none; }
  .preferences { top: 18px; right: 14px; }
  h1 { font-size: 52px; }
  .hero { padding-bottom: 70px; }
  .app-stage { min-height: 540px; }
  .screenshots { width: 330px; height: 520px; }
  .screenshot { width: 218px; border-radius: 33px; }
  .screenshot-primary { right: 5px; }
  .screenshot-secondary { left: 3px; top: 44px; }
  .screenshots.is-swapped .screenshot-primary { right: 107px; top: 44px; }
  .screenshots.is-swapped .screenshot-secondary { left: 107px; top: 8px; }
  .phone { width: 260px; min-height: 510px; }
  .orbit-one { width: 410px; height: 410px; }
  .orbit-two { width: 310px; height: 310px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { min-height: 160px; padding: 19px; }
  .metric-dot { margin-bottom: 28px; }
  .privacy { padding-block: 90px; }
  .privacy-mark { width: 220px; }
  .footer-inner { flex-direction: column; justify-content: center; gap: 16px; padding-block: 25px; }
  .footer-inner div { flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
}

@media (max-width: 380px) {
  h1 { font-size: 44px; }
  .phone { width: 238px; padding-inline: 14px; }
  .screenshots { width: 286px; height: 480px; }
  .screenshot { width: 190px; border-radius: 29px; }
  .screenshots.is-swapped .screenshot-primary { right: 91px; }
  .screenshots.is-swapped .screenshot-secondary { left: 91px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 145px; }
}

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