:root {
  --bg: #f4f5f4;
  --ink: #17201f;
  --muted: #5d6966;
  --paper: #fff;
  --accent: #c7443c;
  --line: rgba(23, 32, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Noto Sans", "PingFang TC", "Microsoft JhengHei", "Noto Sans Arabic", "Noto Sans Hebrew", sans-serif;
  overflow-x: hidden;
}

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

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 20;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
}

.brand small {
  font-size: 0.61rem;
  letter-spacing: 0.15em;
  margin-left: 8px;
}

.lang {
  position: relative;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
  font-size: 16px;
  cursor: pointer;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  width: 304px;
  max-height: min(430px, 65dvh);
  overflow: auto;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(23, 32, 31, 0.14);
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.lang.open .lang-menu {
  display: grid;
}

.lang-menu button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}

.lang-menu button:hover,
.lang-menu button.active {
  background: #e7ebea;
}

.hero {
  min-height: calc(100dvh - 72px);
  position: relative;
  display: flex;
  align-items: center;
  background: #dfe3e2;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background: url("assets/hero.webp") 62% center / cover no-repeat;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 249, 248, 0.96) 0%, rgba(247, 249, 248, 0.83) 28%, rgba(247, 249, 248, 0.08) 58%);
}

.hero-copy {
  position: relative;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 850;
}

.hero h1 {
  font-size: clamp(3.7rem, 7.4vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.075em;
  max-width: 12ch;
  margin: 0.18em 0;
}

.hero-copy > p:not(.eyebrow) {
  font-size: 1.07rem;
  line-height: 1.6;
  color: #3f4b49;
  max-width: 440px;
}

.hero a,
.final a,
footer a {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 15px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s;
}

.hero a {
  color: var(--bg);
}

.hero a:hover,
.final a:hover {
  transform: translateY(-2px);
}

.hero a:active,
.final a:active {
  transform: translateY(1px);
}

.fold-note {
  padding: 105px 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.big-number {
  font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.75;
  color: var(--accent);
}

.big-number span {
  font-size: 0.32em;
  vertical-align: top;
  letter-spacing: -0.03em;
}

.fold-note h2,
.finder h2,
.measure h2,
.final h2 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 0;
}

.fold-note p,
.section-head p,
.measure p,
.final p {
  color: var(--muted);
  line-height: 1.68;
  max-width: 620px;
}

.finder {
  padding: 0 0 110px;
}

.section-head {
  max-width: 760px;
}

.choice-tabs {
  display: flex;
  gap: 10px;
  margin: 34px 0 18px;
  overflow: auto;
  padding-bottom: 4px;
}

.choice-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}

.choice-tabs button.active {
  background: var(--ink);
  color: var(--bg);
}

.choice-result {
  min-height: 320px;
  background: var(--paper);
  border-radius: 30px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.choice-result::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -48%;
  width: 44%;
  aspect-ratio: 1;
  border: 52px solid #e5e8e7;
  border-radius: 50%;
  z-index: 0;
}

.choice-result > * {
  position: relative;
  z-index: 1;
}

.choice-result span {
  color: var(--accent);
  font-weight: 850;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.choice-result h3 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.045em;
  margin: 8px 0;
  max-width: 650px;
}

.choice-result p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 650px;
}

.measure {
  padding: 0 0 110px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}

.measure-list {
  border-top: 1px solid var(--line);
}

.measure-list p {
  margin: 0;
  padding: 22px 0 22px 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.measure-list p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 24px;
  width: 7px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.final {
  background: #dde2e0;
  padding: 100px 0;
}

.final .shell {
  max-width: 900px;
}

.final a {
  background: var(--accent);
}

footer {
  background: #17201f;
  color: #c8d0ce;
  padding: 28px 0;
  font-size: 0.75rem;
}

footer .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

footer p {
  margin: 0;
  line-height: 1.5;
  max-width: 800px;
}

footer a {
  margin-top: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  white-space: nowrap;
  border-radius: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-menu button {
  text-align: right;
}

[dir="rtl"] .measure-list p {
  padding-left: 0;
  padding-right: 34px;
}

[dir="rtl"] .measure-list p::before {
  left: auto;
  right: 2px;
}

[dir="rtl"] .hero-photo::after {
  background: linear-gradient(270deg, rgba(247, 249, 248, 0.96) 0%, rgba(247, 249, 248, 0.83) 28%, rgba(247, 249, 248, 0.08) 58%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121817;
    --ink: #edf1f0;
    --muted: #aab7b3;
    --paper: #1c2422;
    --line: rgba(237, 241, 240, 0.16);
  }

  .lang-menu button:hover,
  .lang-menu button.active {
    background: #27322f;
  }

  .hero-photo::after {
    background: linear-gradient(90deg, rgba(15, 22, 20, 0.96), rgba(15, 22, 20, 0.78) 34%, rgba(15, 22, 20, 0.12) 64%);
  }

  [dir="rtl"] .hero-photo::after {
    background: linear-gradient(270deg, rgba(15, 22, 20, 0.96), rgba(15, 22, 20, 0.78) 34%, rgba(15, 22, 20, 0.12) 64%);
  }

  .hero-copy > p:not(.eyebrow) {
    color: #c2cbc8;
  }

  .choice-result::after {
    border-color: #26302d;
  }

  .final {
    background: #1b2522;
  }

  footer {
    background: #0a0f0e;
  }
}

@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  .shell {
    width: min(100% - 28px, 620px);
  }

  .nav {
    height: 68px;
  }

  .brand small {
    display: none;
  }

  .lang-trigger {
    padding: 9px 11px;
  }

  .lang-label {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lang-menu {
    width: min(290px, calc(100vw - 28px));
  }

  .hero {
    min-height: calc(100dvh - 68px);
    align-items: flex-end;
    padding-bottom: 44px;
  }

  .hero-photo {
    background-position: 68% center;
  }

  .hero-photo::after {
    background: linear-gradient(0deg, rgba(244, 247, 246, 0.97), rgba(244, 247, 246, 0.76) 42%, rgba(244, 247, 246, 0.04) 75%);
  }

  .hero h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
    max-width: 8ch;
  }

  .fold-note {
    padding: 78px 0;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .big-number {
    font-size: 8rem;
  }

  .finder {
    padding-bottom: 80px;
  }

  .choice-result {
    padding: 28px;
    min-height: 360px;
  }

  .choice-result::after {
    width: 80%;
    right: -35%;
    top: -28%;
  }

  .measure {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 80px;
  }

  .final {
    padding: 78px 0;
  }

  footer .shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 1100px) and (prefers-color-scheme: dark),
  (hover: none) and (pointer: coarse) and (prefers-color-scheme: dark) {
  .hero-photo::after {
    background: linear-gradient(0deg, rgba(15, 22, 20, 0.98), rgba(15, 22, 20, 0.72) 43%, rgba(15, 22, 20, 0.08) 76%);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero a,
  .final a {
    transition: none;
  }
}
