:root {
  --background: #f9f6f1;
  --foreground: #54473f;
  --muted: #8a7c72;
  --primary: #c9a25f;
  --primary-foreground: #fffaf2;
  --secondary: #efe5d7;
  --accent: #f1e8dc;
  --accent-strong: #e9dccb;
  --card: rgba(255, 251, 246, 0.9);
  --border: rgba(138, 124, 114, 0.18);
  --chat-assistant: rgba(241, 232, 220, 0.92);
  --chat-user: rgba(227, 234, 249, 0.96);
  --nav-blur: rgba(249, 246, 241, 0.82);
  --shadow-soft: 0 18px 44px rgba(110, 88, 66, 0.08);
  --shadow-card: 0 24px 60px rgba(83, 60, 36, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand,
.footer-brand {
  font-family: "DM Serif Display", serif;
  color: var(--foreground);
  font-weight: 400;
}

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

img {
  display: block;
  max-width: 100%;
}

main {
  min-height: 100vh;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--nav-blur);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(138, 124, 114, 0.1);
}

.nav-inner,
.ages-section,
.chat-layout,
.reassurance-grid,
.footer-inner {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand,
.footer-brand {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.brand span,
.footer-brand span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--muted);
  transition: color 160ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--foreground);
}

.nav-cta,
.button-primary,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-cta,
.button-primary {
  padding: 14px 30px;
}

.send-button,
.voice-button {
  width: 46px;
  height: 46px;
  padding: 0;
}

.nav-cta:hover,
.button-primary:hover,
.send-button:hover,
.voice-button:hover,
.end-chat-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border: 1px solid rgba(138, 124, 114, 0.25);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 300;
  background: rgba(255, 255, 255, 0.28);
  transition: background 160ms ease;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.58);
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(249, 246, 241, 0.94) 0%, rgba(249, 246, 241, 0.68) 45%, rgba(249, 246, 241, 0.24) 100%),
    linear-gradient(180deg, rgba(249, 246, 241, 0.62) 0%, rgba(249, 246, 241, 0) 36%, rgba(249, 246, 241, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding-top: 72px;
}

.hero-content > * {
  max-width: 560px;
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 300;
}

.hero-content h1 {
  font-size: clamp(3.4rem, 8vw, 5.9rem);
  line-height: 1.08;
  margin: 0 0 22px;
}

.hero-copy {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 34px;
  border: 1.5px solid rgba(138, 124, 114, 0.48);
  border-radius: 999px;
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: rgba(138, 124, 114, 0.58);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(9px); opacity: 0.35; }
}

.ages-section {
  padding: 112px 0 126px;
}

.section-heading {
  margin-bottom: 52px;
}

.section-heading.center {
  text-align: center;
}

.section-heading h2,
.chat-copy h2,
.reassurance-copy h2 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin: 0;
}

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

.age-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  cursor: default;
  box-shadow: var(--shadow-soft);
}

.age-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 700ms ease;
}

.age-card:hover img {
  transform: scale(1.05);
}

.age-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(84, 71, 63, 0.03) 20%, rgba(84, 71, 63, 0.74) 100%);
}

.age-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #fffaf2;
}

.age-card-copy span {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.age-card-copy h3 {
  color: #fffaf2;
  font-size: 2rem;
  margin: 0 0 4px;
}

.age-card-copy p {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 300;
  opacity: 0.78;
}

.chat-section {
  position: relative;
  overflow: hidden;
  padding: 118px 0 128px;
}

.chat-background,
.chat-background img,
.chat-background-overlay {
  position: absolute;
  inset: 0;
}

.chat-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-background-overlay {
  background: rgba(249, 246, 241, 0.86);
  backdrop-filter: blur(5px);
}

.chat-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1fr);
  gap: 72px;
  align-items: center;
}

.chat-copy p:not(.section-kicker) {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.age-spotlight {
  position: relative;
  margin-top: 34px;
  padding: 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(201, 162, 95, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 251, 246, 0.82), rgba(241, 232, 220, 0.54));
  border: 1px solid rgba(138, 124, 114, 0.14);
  box-shadow: 0 24px 52px rgba(91, 70, 49, 0.08);
  overflow: hidden;
}

.age-spotlight-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.age-spotlight-kicker {
  margin: 0 0 8px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.age-spotlight-header h3 {
  margin: 0;
  font-size: 1.55rem;
}

.age-spotlight-orbit {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 95, 0.28);
  background: rgba(255, 255, 255, 0.46);
  flex-shrink: 0;
}

.age-spotlight-orbit span {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 95, 0.46), rgba(201, 162, 95, 0.08));
}

.age-selector-shell {
  display: grid;
  gap: 0;
}

.age-selector-toolbar {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.age-selector-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: fit-content;
}

.age-selector-label {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.age-selector-input {
  appearance: none;
  width: min(240px, 100%);
  padding: 11px 38px 11px 14px;
  border: 1px solid rgba(138, 124, 114, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 236, 222, 0.84)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a7c72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--foreground);
  font: inherit;
  font-size: 0.94rem;
  cursor: pointer;
}

.age-selector-input:focus {
  outline: none;
  border-color: rgba(201, 162, 95, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 162, 95, 0.12);
}

.age-spotlight-panel {
  margin-top: 18px;
  display: grid;
  gap: 20px;
  padding: 24px 24px 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.76), rgba(239, 230, 217, 0.36));
  border: 1px solid rgba(138, 124, 114, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 42px rgba(94, 72, 47, 0.05);
}

.age-spotlight-label {
  margin: 0 0 10px;
  color: #8b6424;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.age-spotlight-copy h4 {
  margin: 0 0 10px;
  max-width: 420px;
  font-size: 1.4rem;
  line-height: 1.18;
}

.age-spotlight-description {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.72;
}

.prompt-cluster {
  display: grid;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid rgba(138, 124, 114, 0.12);
}

.prompt-cluster-label {
  margin: 0;
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prompt-chip {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(138, 124, 114, 0.14);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.prompt-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.prompt-chip:hover {
  background: white;
  border-color: rgba(201, 162, 95, 0.46);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(94, 72, 47, 0.06);
}

.chat-panel {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  background: rgba(255, 251, 246, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(138, 124, 114, 0.14);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(138, 124, 114, 0.12);
}

.chat-header-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 162, 95, 0.2);
  color: var(--primary);
  font-family: "DM Serif Display", serif;
  font-size: 1.2rem;
}

.chat-header-title {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 500;
}

.chat-header-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.messages {
  max-height: 500px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
  margin-bottom: 18px;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(138, 124, 114, 0.22);
  border-radius: 999px;
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.end-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(138, 124, 114, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.end-chat-button:disabled,
.voice-button:disabled,
.send-button:disabled,
.button-primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.chat-status {
  margin: 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.message {
  width: fit-content;
  max-width: 88%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(138, 124, 114, 0.12);
}

.message.assistant {
  background: var(--chat-assistant);
  border-top-left-radius: 6px;
}

.message.user {
  align-self: flex-end;
  background: var(--chat-user);
  border-top-right-radius: 6px;
}

.message-role {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground);
}

.message-body {
  font-size: 0.98rem;
  line-height: 1.72;
}

.message-body p {
  margin: 0 0 12px;
}

.message-body p:last-child {
  margin-bottom: 0;
}

.message-body ul {
  margin: 10px 0 12px 18px;
  padding: 0;
}

.message-body li {
  margin-bottom: 8px;
}

.message-citations {
  display: none;
  margin-top: 12px;
}

.message-citations.has-citations {
  display: block;
}

.message-citations-label {
  margin-bottom: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.citation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.citation-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(138, 124, 114, 0.14);
  font-size: 0.8rem;
  color: var(--muted);
}

.citation-chip[href] {
  text-decoration: none;
}

.citation-chip[href]:hover {
  color: var(--foreground);
  border-color: rgba(201, 162, 95, 0.38);
}

.composer {
  display: grid;
  gap: 12px;
}

textarea {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(138, 124, 114, 0.14);
  background: rgba(241, 237, 231, 0.56);
  color: var(--foreground);
  font: inherit;
  line-height: 1.6;
}

textarea:focus {
  outline: none;
  border-color: rgba(201, 162, 95, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 162, 95, 0.12);
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-button {
  border: 1px solid rgba(138, 124, 114, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--foreground);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.voice-button.recording {
  background: rgba(201, 162, 95, 0.2);
  border-color: rgba(201, 162, 95, 0.52);
  color: #8b6424;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.send-button svg {
  width: 16px;
  height: 16px;
}

.feedback-panel {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(138, 124, 114, 0.14);
  background: rgba(241, 232, 220, 0.58);
}

.feedback-header h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.feedback-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.feedback-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.feedback-form {
  display: grid;
  gap: 16px;
}

.feedback-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 10px;
}

.feedback-fieldset legend,
.feedback-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--foreground);
}

.feedback-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  color: var(--foreground);
  font-size: 0.92rem;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 6px;
}

.star-option {
  position: relative;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  color: rgba(138, 124, 114, 0.32);
}

.star-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-option span {
  display: inline-block;
  transition: color 120ms ease, transform 120ms ease;
}

.star-option:hover span,
.star-option:hover ~ .star-option span,
.star-option.selected span {
  color: #c9a25f;
}

.star-option:hover span {
  transform: scale(1.04);
}

.feedback-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reassurance-section {
  padding: 112px 0 122px;
}

.reassurance-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 72px;
  align-items: center;
}

.reassurance-media {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.reassurance-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.reassurance-copy p:not(.section-kicker) {
  margin: 0 0 28px;
  max-width: 440px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.8;
}

.site-footer {
  border-top: 1px solid rgba(138, 124, 114, 0.12);
  padding: 44px 0;
}

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

.footer-inner p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
}

.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;
}

@media (max-width: 1024px) {
  .age-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .age-selector-toolbar {
    display: block;
  }

  .chat-layout,
  .reassurance-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .chat-panel {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 780px) {
  .nav-inner,
  .ages-section,
  .chat-layout,
  .reassurance-grid,
  .footer-inner,
  .hero-content {
    width: min(100vw - 24px, 1120px);
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    padding: 12px 18px;
    font-size: 0.88rem;
  }

  .hero-content {
    padding-top: 94px;
  }

  .hero-content > * {
    max-width: 100%;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .composer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .composer-actions,
  .feedback-actions,
  .chat-actions {
    width: 100%;
  }

  .age-spotlight {
    padding: 20px;
  }

  .age-spotlight-header {
    flex-direction: column;
  }

  .age-selector-field {
    width: 100%;
  }

  .age-selector-input {
    width: 100%;
  }

  .chat-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-status {
    text-align: left;
  }

  .send-button,
  .voice-button {
    width: 100%;
    height: 48px;
    border-radius: 999px;
  }
}
