:root {
  --ink: #2c3e50;
  --deep: #3e4454;
  --mist: #b3b8c8;
  --line: #e1e5ee;
  --paper: #f5f6fd;
  --white: #ffffff;
  --night: #172331;
  --warm: #d9c7b2;
  --soft: rgba(245, 246, 253, 0.82);
  --shadow: rgba(23, 35, 49, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Avenir Next, Avenir, Optima, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.68;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 14%, rgba(245, 246, 253, 0.62) 0 52px, rgba(245, 246, 253, 0.12) 54px 108px, transparent 110px),
    linear-gradient(135deg, #172331 0%, #2c3e50 52%, #687385 100%);
  color: var(--white);
}

.hero__image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 35, 49, 0.94) 0%, rgba(44, 62, 80, 0.78) 44%, rgba(44, 62, 80, 0.22) 100%),
    linear-gradient(0deg, rgba(23, 35, 49, 0.78), rgba(23, 35, 49, 0.18) 52%, rgba(23, 35, 49, 0.42)),
    url("./assets/home-hero-bg.png") 62% center / cover no-repeat;
  opacity: 0.92;
}

.hero::after {
  position: absolute;
  right: min(7vw, 88px);
  bottom: min(9vw, 96px);
  width: clamp(112px, 17vw, 220px);
  height: clamp(112px, 17vw, 220px);
  border: 1px solid rgba(225, 229, 238, 0.2);
  border-radius: 50%;
  content: "";
  opacity: 0.48;
}

.nav {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 760;
}

.brand__mark {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1px solid rgba(245, 246, 253, 0.72);
  border-radius: 50%;
  box-shadow: 8px 0 0 -2px var(--mist);
}

.nav__link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 760;
}

.nav__link:hover,
.footer a:hover {
  color: var(--white);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  align-self: center;
  margin: 0 auto;
  padding: 46px 0 82px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--mist);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.racine-note h2,
.quiz-entry h2 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 760;
}

.hero__copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(245, 246, 253, 0.88);
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.86;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__note {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(225, 229, 238, 0.76);
  font-size: 14px;
  line-height: 1.72;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.35;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--mist);
  color: var(--ink);
  box-shadow: 0 18px 38px rgba(12, 22, 33, 0.28);
}

.button--dark {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 18px 38px rgba(44, 62, 80, 0.18);
}

.daily-section,
.racine-note,
.quiz-entry {
  padding: clamp(62px, 9vw, 108px) 20px;
}

.section-heading,
.daily-grid,
.racine-note__card,
.quiz-entry__content,
.footer {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.section-heading--center {
  max-width: 760px;
  text-align: center;
}

.section-heading h2,
.racine-note h2,
.quiz-entry h2 {
  font-size: clamp(30px, 5vw, 52px);
}

.section-heading p:not(.eyebrow),
.racine-note p:not(.eyebrow),
.quiz-entry p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--deep);
  font-size: 18px;
  line-height: 1.9;
}

.daily-section {
  background:
    radial-gradient(circle at 16% 12%, rgba(179, 184, 200, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(245, 246, 253, 0.96), rgba(255, 255, 255, 0.84));
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}

.daily-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(179, 184, 200, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 54px rgba(44, 62, 80, 0.07);
}

.daily-card span {
  color: var(--mist);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.daily-card p {
  margin: 28px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.68;
}

.racine-note {
  background:
    linear-gradient(135deg, rgba(23, 35, 49, 0.96), rgba(44, 62, 80, 0.92)),
    var(--night);
  color: var(--white);
}

.racine-note__card {
  max-width: 820px;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(225, 229, 238, 0.2);
  border-radius: 18px;
  background: rgba(245, 246, 253, 0.08);
  box-shadow: 0 28px 70px rgba(12, 22, 33, 0.26);
}

.racine-note p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(245, 246, 253, 0.82);
}

.quiz-entry {
  background:
    radial-gradient(circle at 80% 18%, rgba(217, 199, 178, 0.36), transparent 26%),
    linear-gradient(180deg, #ffffff, var(--paper));
  text-align: center;
}

.quiz-entry__content {
  max-width: 820px;
}

.quiz-entry .button {
  margin-top: 28px;
}

.footer {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
  color: var(--deep);
}

.footer p {
  margin: 0;
  font-weight: 850;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 90svh;
  }

  .hero__image {
    background:
      linear-gradient(90deg, rgba(23, 35, 49, 0.92), rgba(44, 62, 80, 0.58)),
      linear-gradient(0deg, rgba(23, 35, 49, 0.74), rgba(23, 35, 49, 0.26)),
      url("./assets/home-hero-bg.png") 66% center / cover no-repeat;
  }

  .hero::after {
    opacity: 0.28;
  }

  .nav {
    width: min(100% - 32px, 1040px);
  }

  .nav__link {
    display: none;
  }

  .hero__content {
    width: min(100% - 32px, 760px);
    align-self: end;
    padding: 34px 0 44px;
  }

  .hero h1 {
    font-size: clamp(34px, 11vw, 44px);
  }

  .hero__copy {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.78;
  }

  .hero__actions {
    margin-top: 24px;
  }

  .hero__note {
    font-size: 13px;
  }

  .button {
    width: 100%;
  }

  .daily-section,
  .racine-note,
  .quiz-entry {
    padding: 56px 16px;
  }

  .daily-grid {
    grid-template-columns: 1fr;
  }

  .daily-card {
    min-height: 150px;
  }

  .footer,
  .footer__links {
    align-items: stretch;
    flex-direction: column;
  }
}
