:root {
  color-scheme: dark;
  --ink: #f9f7ff;
  --muted: #b3aec8;
  --muted-strong: #d4d0df;
  --violet: #9e88ff;
  --violet-bright: #b9a8ff;
  --lavender: #d7ccff;
  --night: #100c2b;
  --night-deep: #09071a;
  --panel: rgba(34, 27, 74, 0.72);
  --line: rgba(255, 255, 255, 0.11);
  --shadow: 0 30px 90px rgba(3, 1, 18, 0.45);
  --radius: 28px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 9%, rgba(101, 75, 211, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 33%, rgba(89, 63, 185, 0.18), transparent 24rem),
    var(--night-deep);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.68;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.4px),
    radial-gradient(circle at 75% 12%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.4px),
    radial-gradient(circle at 86% 48%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.4px),
    radial-gradient(circle at 33% 72%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.4px);
  background-size: 270px 270px, 340px 340px, 210px 210px, 390px 390px;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 27px;
  overflow: hidden;
  background: var(--violet-bright);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(158, 136, 255, 0.35);
}

.brand-mark::after {
  position: absolute;
  top: -4px;
  left: 8px;
  width: 25px;
  height: 25px;
  content: "";
  background: #0b081f;
  border-radius: 50%;
}

.brand-star {
  position: absolute;
  top: 4px;
  right: 1px;
  z-index: 1;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}

.header-link {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.header-link:hover {
  color: var(--ink);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 76px 0 104px;
  text-align: center;
}

.ad-slot {
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  text-align: center;
}

.ads-enabled .ad-slot {
  display: flex;
}

.ad-slot--top {
  padding-top: 36px;
}

.ad-slot--native {
  min-height: 120px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ad-slot--bottom {
  min-height: 136px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.ad-label {
  color: #686277;
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.ad-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.ad-frame--rectangle {
  width: 300px;
  min-height: 250px;
}

.ad-frame--native {
  width: 100%;
  min-height: 68px;
}

.ad-frame--banner {
  width: 320px;
  min-height: 50px;
}

.ad-frame iframe {
  max-width: 100%;
  border: 0;
}

.eyebrow,
.section-kicker,
.results-kicker {
  color: var(--violet-bright);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--violet-bright);
  border-radius: 50%;
  box-shadow: 0 0 13px var(--violet);
}

h1 {
  max-width: 840px;
  margin: 26px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 8.2vw, 7rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

h1 em {
  color: var(--violet-bright);
  font-weight: 400;
}

.hero-copy {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.calculator-card {
  width: min(760px, 100%);
  margin-top: 48px;
  overflow: hidden;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 42%),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

form {
  padding: 30px;
}

label {
  display: block;
  margin-bottom: 13px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.time-field {
  position: relative;
}

.clock-icon {
  position: absolute;
  top: 50%;
  left: 19px;
  width: 17px;
  height: 17px;
  border: 1.5px solid #817a9c;
  border-radius: 50%;
  transform: translateY(-50%);
}

.clock-icon::before,
.clock-icon::after {
  position: absolute;
  left: 7px;
  width: 1.5px;
  content: "";
  background: #817a9c;
  border-radius: 1px;
  transform-origin: bottom center;
}

.clock-icon::before {
  top: 3px;
  height: 5px;
}

.clock-icon::after {
  top: 7px;
  height: 4px;
  transform: rotate(125deg);
}

input[type="time"] {
  width: 100%;
  height: 62px;
  padding: 0 20px 0 52px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 680;
  letter-spacing: 0.03em;
  background: rgba(8, 5, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input[type="time"]:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(158, 136, 255, 0.13);
}

input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.65;
  cursor: pointer;
}

button {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 0 25px;
  color: #160f35;
  font-size: 0.9rem;
  font-weight: 780;
  cursor: pointer;
  background: var(--violet-bright);
  border: 0;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(120, 94, 225, 0.2);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

button:hover {
  background: #cbbfff;
  box-shadow: 0 14px 34px rgba(120, 94, 225, 0.32);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.form-help,
.form-error {
  margin: 13px 0 0;
  color: #8f89a5;
  font-size: 0.78rem;
}

.form-error:not(:empty) {
  color: #ffaaa5;
}

.results {
  padding: 30px;
  background: rgba(9, 6, 30, 0.38);
  border-top: 1px solid var(--line);
}

.results[hidden] {
  display: none;
}

.results-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
}

.results-heading h2 {
  max-width: 440px;
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.wake-label {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.time-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.time-option {
  position: relative;
  min-width: 0;
  padding: 19px 16px 17px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.time-option.recommended {
  background: rgba(158, 136, 255, 0.1);
  border-color: rgba(185, 168, 255, 0.42);
}

.option-tag {
  display: block;
  min-height: 16px;
  margin-bottom: 5px;
  color: var(--violet-bright);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.option-time {
  display: block;
  overflow: hidden;
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  font-weight: 720;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-cycles {
  display: block;
  margin-top: 5px;
  color: #928ba7;
  font-size: 0.72rem;
}

.results-note {
  margin: 18px 0 0;
  color: #858097;
  font-size: 0.75rem;
  line-height: 1.55;
}

.results.reveal {
  animation: reveal 420ms ease both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cycle-note {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
  text-align: left;
}

.cycle-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--violet-bright);
  font-size: 0.8rem;
  background: rgba(158, 136, 255, 0.1);
  border: 1px solid rgba(158, 136, 255, 0.25);
  border-radius: 50%;
  place-items: center;
}

.cycle-note p {
  margin: 0;
  color: #8f89a4;
  font-size: 0.76rem;
  line-height: 1.55;
}

.cycle-note strong {
  color: var(--muted-strong);
}

.how-it-works {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-number {
  color: rgba(255, 255, 255, 0.2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 0.9;
}

.how-it-works h2 {
  max-width: 420px;
  margin: 13px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.how-it-works > p {
  max-width: 470px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  min-height: 110px;
  color: #777187;
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

footer p:last-child {
  text-align: right;
}

.brand-small {
  color: #9993aa;
  font-size: 0.82rem;
}

.brand-small .brand-mark {
  width: 20px;
  height: 20px;
}

.brand-small .brand-mark::after {
  left: 6px;
  width: 19px;
  height: 19px;
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 28px, 660px);
  }

  .site-header {
    min-height: 78px;
  }

  .hero {
    padding: 60px 0 78px;
  }

  .ad-slot--top {
    padding-top: 28px;
  }

  .ad-slot--native {
    padding: 32px 0;
  }

  h1 {
    font-size: clamp(3.3rem, 16vw, 5.3rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  form,
  .results {
    padding: 22px;
  }

  .results-heading {
    align-items: start;
    flex-direction: column;
  }

  .time-options {
    grid-template-columns: 1fr;
  }

  .time-option {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 15px 17px;
  }

  .option-tag {
    grid-column: 1 / -1;
  }

  .option-cycles {
    margin: 0;
  }

  .how-it-works {
    grid-template-columns: 54px 1fr;
    gap: 25px;
  }

  .how-it-works > p {
    grid-column: 2;
    margin-top: 0;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer p:nth-of-type(1) {
    display: none;
  }
}

@media (max-width: 430px) {
  .header-link {
    font-size: 0.68rem;
  }

  .hero-copy {
    font-size: 0.9rem;
  }

  .calculator-card {
    border-radius: 22px;
  }

  .ad-frame--banner {
    width: min(320px, 100%);
  }

  .how-it-works {
    grid-template-columns: 1fr;
  }

  .section-number {
    font-size: 2rem;
  }

  .how-it-works > p {
    grid-column: 1;
  }

  footer {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  footer p:last-child {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
