:root {
  --ivory: #f7f4ec;
  --paper: #fffdf8;
  --forest: #173d32;
  --forest-soft: #2d594b;
  --ink: #27342f;
  --muted: #63716a;
  --sage: #a8bba7;
  --sage-light: #e6eee4;
  --sand: #dccdb8;
  --sand-light: #f3ece2;
  --lavender: #e9e2f0;
  --lavender-deep: #9e83b3;
  --terracotta: #b97862;
  --line: #ded2c0;
  --shadow: 0 24px 60px rgba(23, 61, 50, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 3% 8%, rgba(168, 187, 167, 0.22), transparent 24rem),
    radial-gradient(circle at 97% 16%, rgba(233, 226, 240, 0.46), transparent 24rem),
    var(--ivory);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 20;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: min(100% - 80px, 1420px);
  margin: 0 auto;
  border-bottom: 1px solid rgba(222, 210, 192, 0.78);
}

.brand {
  flex: 0 0 auto;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.5vw, 2.45rem);
  letter-spacing: -0.055em;
}

.brand span {
  color: var(--terracotta);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 46px);
}

.main-nav a,
.main-nav button {
  position: relative;
  border: 0;
  padding: 14px 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-weight: 560;
}

.main-nav a::after,
.main-nav button::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  background: var(--terracotta);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease-out;
}

.main-nav a:hover::after,
.main-nav button:hover::after,
.main-nav a:focus-visible::after,
.main-nav button:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.72);
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--forest);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(560px, 1.07fr);
  gap: clamp(42px, 6vw, 94px);
  align-items: center;
  width: min(100% - 80px, 1420px);
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 68px 0 76px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.how-it-works h2,
.guide-dialog h2,
.result h2 {
  margin: 0;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(3.35rem, 5.35vw, 5.75rem);
  line-height: 0.99;
}

.hero-intro {
  max-width: 650px;
  margin: 28px 0 0;
  color: #3f4e47;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  padding: 13px 25px;
  cursor: pointer;
  font-weight: 680;
  transition:
    transform 180ms ease-out,
    background 180ms ease-out,
    box-shadow 180ms ease-out;
}

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

.button:focus-visible,
.option-card:focus-visible,
.starter-card:focus-visible,
.guide-close:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid rgba(185, 120, 98, 0.45);
  outline-offset: 3px;
}

.button-primary {
  background: var(--forest);
  color: white;
  box-shadow: 0 12px 28px rgba(23, 61, 50, 0.18);
}

.button-primary:hover {
  background: var(--forest-soft);
  box-shadow: 0 16px 34px rgba(23, 61, 50, 0.23);
}

.button-primary:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.button-secondary {
  background: rgba(255, 253, 248, 0.58);
  color: var(--forest);
}

.button-secondary:hover {
  background: var(--paper);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 38px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-list li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  content: "";
}

.hero-experience {
  position: relative;
  min-height: 650px;
}

.hero-experience::before {
  position: absolute;
  top: -90px;
  right: -36px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(233, 226, 240, 0.72);
  content: "";
  filter: blur(0.2px);
}

.hero-photo {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: -120px;
  width: min(58%, 440px);
  height: 330px;
  border: 1px solid rgba(222, 210, 192, 0.72);
  border-radius: 36px;
  background:
    linear-gradient(to top, rgba(23, 61, 50, 0.08), transparent 48%),
    url("/assets/images/hero-aromasalon.png") center / cover no-repeat,
    var(--sand-light);
  box-shadow: 0 24px 50px rgba(23, 61, 50, 0.12);
}

.profile-card {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 0;
  width: min(100%, 670px);
  min-height: 560px;
  padding: clamp(26px, 3.2vw, 46px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 253, 248, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-head div {
  display: grid;
  gap: 8px;
}

.profile-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-head strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.1vw, 2.15rem);
  font-weight: 500;
}

.profile-head .step-count {
  color: var(--forest);
  font-size: 1rem;
}

.progress,
.guide-progress {
  overflow: hidden;
  height: 5px;
  margin: 24px 0 30px;
  border-radius: 99px;
  background: #e9e1d5;
}

.progress span,
.guide-progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
}

.starter-card {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 13px;
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 17px 20px;
  color: var(--forest);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease-out,
    border 180ms ease-out,
    box-shadow 180ms ease-out;
}

.starter-card:hover {
  border-color: rgba(23, 61, 50, 0.18);
  box-shadow: 0 12px 26px rgba(23, 61, 50, 0.09);
  transform: translateY(-2px);
}

.room-card {
  background: var(--sage-light);
}

.mood-card {
  background: var(--lavender);
}

.scent-card {
  background: var(--sand-light);
}

.starter-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  font-family: Georgia, serif;
  font-size: 1.65rem;
}

.starter-card > span:last-child {
  display: grid;
  gap: 4px;
}

.starter-card strong {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.starter-card small {
  color: var(--muted);
  font-size: 0.88rem;
}

.how-it-works {
  width: min(100% - 80px, 1420px);
  margin: 0 auto;
  padding: 110px 0 120px;
  border-top: 1px solid rgba(222, 210, 192, 0.78);
}

.how-it-works > .eyebrow,
.how-it-works > h2 {
  text-align: center;
}

.how-it-works h2 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(2.7rem, 4vw, 4.5rem);
  line-height: 1.05;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.feature-grid article {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  background: rgba(255, 253, 248, 0.72);
}

.feature-grid article:nth-child(2) {
  background: rgba(230, 238, 228, 0.82);
}

.feature-grid article:nth-child(3) {
  background: rgba(233, 226, 240, 0.7);
}

.feature-grid span {
  color: var(--terracotta);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.feature-grid h3 {
  margin: 54px 0 14px;
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(100% - 80px, 1420px);
  margin: 0 auto;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  font-size: 1.65rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 38, 31, 0.62);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease-out both;
}

.guide-overlay[hidden] {
  display: none;
}

.guide-dialog {
  position: relative;
  width: min(100%, 1120px);
  max-height: min(900px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(222, 210, 192, 0.9);
  border-radius: 34px;
  padding: clamp(28px, 4vw, 54px);
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 226, 240, 0.7), transparent 18rem),
    var(--paper);
  box-shadow: 0 38px 90px rgba(12, 34, 27, 0.28);
  animation: dialog-in 280ms ease-out both;
}

.guide-close {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  color: var(--forest);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  gap: 44px;
  padding-right: 38px;
}

.guide-header h2 {
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: 1.02;
}

.guide-header p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.guide-step {
  flex: 0 0 auto;
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

.guide-progress {
  margin: 30px 0 34px;
}

.guide-progress span {
  transition: width 300ms ease-out;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.option-grid.is-wide {
  grid-template-columns: repeat(3, 1fr);
}

.option-card {
  position: relative;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 25px;
  background: var(--ivory);
  color: var(--forest);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease-out,
    border-color 180ms ease-out,
    background 180ms ease-out,
    box-shadow 180ms ease-out;
}

.option-card:nth-child(2) {
  background: #f4eff7;
}

.option-card:nth-child(3) {
  background: var(--sand-light);
}

.option-card:hover {
  border-color: var(--sage);
  box-shadow: 0 14px 30px rgba(23, 61, 50, 0.1);
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest), 0 16px 34px rgba(23, 61, 50, 0.12);
}

.option-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 1.85rem;
}

.option-card strong {
  font-family: Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.option-card small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.option-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: transparent;
  font-size: 0.8rem;
}

.selected .option-check {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
}

.text-button {
  border: 0;
  padding: 12px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
}

.text-button:hover {
  color: var(--forest);
}

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 8% 4px;
  text-align: center;
}

.result-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 8px 0 26px;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--forest);
  font-size: 2rem;
}

.result h2 {
  font-size: clamp(3rem, 6vw, 5rem);
}

.result > p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px auto 12px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.result > strong {
  color: var(--terracotta);
}

.result-summary {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-note {
  max-width: 650px;
  margin-top: 34px;
  border-radius: 20px;
  padding: 20px 24px;
  background: var(--sand-light);
  color: #5f615a;
  line-height: 1.6;
}

.result-actions {
  width: 100%;
  margin-top: 32px;
}

.guide-loading {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.guide-loading h2,
.result-head h2 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1.05;
}

.guide-loading > p:not(.eyebrow),
.result-head > p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.65;
}

.loading-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--forest);
  font-size: 2rem;
  animation: aroma-pulse 1.2s ease-in-out infinite alternate;
}

.result-head {
  padding-right: 50px;
}

.recommendation-grid {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.recommendation-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--ivory);
}

.recommendation-media {
  position: relative;
  min-height: 250px;
  background: var(--sage-light);
}

.recommendation-media img,
.recommendation-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: var(--forest);
  font-size: 3rem;
}

.match-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(23, 61, 50, 0.92);
  color: white;
  font-size: 0.76rem;
  font-weight: 750;
}

.recommendation-copy {
  padding: 24px 26px;
}

.recommendation-rank {
  color: var(--terracotta);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recommendation-copy h3 {
  margin: 7px 0 0;
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.product-brand {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.recommendation-copy > p {
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.recommendation-reason,
.safety-note {
  margin-top: 14px;
  border-radius: 13px;
  padding: 11px 13px;
  background: white;
  color: #4e5a54;
  font-size: 0.86rem;
  line-height: 1.55;
}

.safety-note {
  background: #f6eee2;
  color: #69594a;
}

.recommendation-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.recommendation-bottom > span {
  display: grid;
  gap: 4px;
}

.recommendation-bottom strong {
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.recommendation-bottom small {
  color: var(--muted);
}

.recommendation-bottom .button {
  min-height: 46px;
  padding: 10px 18px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.affiliate-note {
  margin: 20px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

@keyframes aroma-pulse {
  to {
    transform: scale(1.08);
    background: var(--lavender);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }

  .hero-copy {
    max-width: 800px;
  }

  .hero-experience {
    min-height: 610px;
  }

  .hero-photo {
    left: 0;
    width: 40%;
  }

  .profile-card {
    width: 76%;
  }

  .option-grid,
  .option-grid.is-wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 780px) {
  .site-header,
  .hero,
  .how-it-works,
  .site-footer {
    width: min(100% - 36px, 1420px);
  }

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 67px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 20px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a,
  .main-nav button {
    padding: 14px 4px;
    text-align: left;
  }

  .hero {
    gap: 30px;
    min-height: 0;
    padding: 54px 0 64px;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.9rem);
  }

  .hero-intro {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .trust-list {
    gap: 10px 18px;
  }

  .hero-experience {
    min-height: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 18px;
  }

  .profile-card,
  .hero-photo {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .profile-card {
    min-height: 0;
    padding: 24px;
    border-radius: 26px;
  }

  .hero-photo {
    height: 290px;
    border-radius: 26px;
  }

  .starter-card {
    grid-template-columns: 48px 1fr;
  }

  .starter-icon {
    width: 46px;
    height: 46px;
  }

  .how-it-works {
    padding: 78px 0 82px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .feature-grid article {
    min-height: 220px;
  }

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

  .option-grid.is-wide {
    grid-template-columns: 1fr;
  }

  .option-card {
    min-height: 175px;
  }

  .option-icon {
    margin-bottom: 22px;
  }

  .guide-dialog {
    max-height: calc(100vh - 20px);
    border-radius: 25px;
    padding: 26px 20px 22px;
  }

  .guide-header {
    display: block;
    padding-right: 30px;
  }

  .guide-step {
    display: inline-block;
    margin-top: 14px;
  }

  .guide-actions {
    position: sticky;
    bottom: -22px;
    margin: 24px -20px -22px;
    padding: 16px 20px 18px;
    background: rgba(255, 253, 248, 0.96);
    backdrop-filter: blur(12px);
  }

  .result {
    padding: 10px 0 0;
  }

  .result-actions {
    width: calc(100% + 40px);
  }

  .result-head {
    padding-right: 28px;
  }

  .recommendation-card {
    grid-template-columns: 1fr;
  }

  .recommendation-media {
    min-height: 210px;
    max-height: 290px;
  }

  .recommendation-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .recommendation-bottom .button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
