/* Where Rooms Begin - Style Survey ("style journey").
   Palette/typography match the main site: cream #eeeae6, charcoal #353535, gold #b1b6c0,
   Poppins (UI), EB Garamond (supporting text), Moontime (script). */

@font-face { font-family: "Moontime"; src: url("/fonts/moontime.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Ebgaramond"; src: url("/fonts/ebgaramond.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --cream: #eeeae6;
  --paper: #ffffff;
  --ink: #353535;
  --ink-soft: #6b6660;
  --gold: #b1b6c0;
  --gold-dark: #4c5b61;   /* gold text on cream needs more contrast */
  --line: #d9d2c9;
  --dark: #2f2f2f;
  --error: #a33a2c;
  --radius: 6px;
  --header-h: 64px;
  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--cream);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.sv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

/* ---------- Header + progress ---------- */
.sv-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(238, 234, 230, .94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sv-logo {
  text-decoration: none; text-transform: uppercase;
  font-weight: 400; font-size: 12px; letter-spacing: .22em;
}
.sv-stepcount { display: none; } /* the gold "Step n of 5" above each question already shows this */
.sv-portal-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: .04em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px; white-space: nowrap;
}
@media (max-width: 479px) {
  .sv-portal-back__text { display: none; }             /* just the arrow, so it never crowds the logo */
  .sv-portal-back { font-size: 16px; padding: 8px; margin: -8px; }   /* comfortable tap target */
}

.sv-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.sv-progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .35s ease; }

/* ---------- Layout ---------- */
.sv-main {
  max-width: 880px; margin: 0 auto;
  padding: calc(var(--header-h) + 36px) clamp(20px, 4vw, 40px) calc(var(--nav-h) + 40px);
}
.sv-step { border: 0; margin: 0 0 56px; padding: 0; min-width: 0; }
.js .sv-step { margin-bottom: 0; }

.sv-eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 14px; }
.sv-q {
  font-weight: 300; font-size: clamp(26px, 4.4vw, 38px); line-height: 1.2; letter-spacing: -.005em;
  margin-bottom: 10px; outline: none;
}
.sv-hint { font-family: "Ebgaramond", Georgia, serif; font-size: 18px; color: var(--ink-soft); margin-bottom: 26px; }
.sv-lede { font-family: "Ebgaramond", Georgia, serif; font-size: clamp(19px, 2.4vw, 22px); line-height: 1.5; }
.sv-lede--dark { margin: 8px 0 32px; max-width: 34em; }

/* ---------- Welcome panel ---------- */
.sv-intro {
  background: var(--dark); color: #fff; border-radius: var(--radius);
  min-height: calc(100svh - var(--header-h) - 76px); min-height: calc(100vh - var(--header-h) - 76px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px;
}
.sv-wordmark { text-transform: uppercase; letter-spacing: .2em; font-weight: 300; font-size: clamp(20px, 3.6vw, 30px); }
.sv-script {
  font-family: "Moontime", "Snell Roundhand", cursive; font-weight: 400;
  font-size: clamp(38px, 7vw, 60px); color: var(--gold); margin: 6px 0 26px; line-height: 1.1; outline: none;
}
.sv-intro .sv-lede { font-family: "Poppins", sans-serif; font-weight: 300; font-size: 15px; max-width: 24em; margin-bottom: 34px; color: #e9e4dd; }
.sv-intro .sv-lede strong { font-weight: 500; color: #fff; }

/* ---------- Text fields ---------- */
/* display:block is explicit because .sv-field is sometimes a <div> (already block) and sometimes applied
   directly to a <label> (portal forms, e.g. overlay/js/account.js) - a bare label defaults to display:inline,
   which silently drops this margin-bottom and left "Save" buttons sitting flush against the field above. */
.sv-field { display: block; margin-bottom: 26px; max-width: 520px; }
.sv-field label { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; color: var(--ink-soft); }
.sv-field input, .sv-other input {
  width: 100%; height: 54px; padding: 0 16px;
  font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */ font-weight: 400; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
.sv-field input:focus, .sv-other input:focus { border-color: var(--ink); outline: 2px solid var(--gold); outline-offset: 0; }
.sv-field input[aria-invalid="true"] { border-color: var(--error); }
.sv-error { color: var(--error); font-size: 14px; margin-top: 8px; font-weight: 400; }
.sv-error--form { margin-bottom: 18px; }

/* ---------- Checkbox options ---------- */
.sv-options { display: grid; gap: 12px; }
.sv-options--after { margin-top: 12px; }
.sv-option {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 14px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: 16px; font-weight: 400;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.sv-option:hover { border-color: var(--ink); }
.sv-option input, .sv-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sv-option::before {
  content: ""; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--ink-soft); border-radius: 4px; background: #fff;
  transition: background-color .15s, border-color .15s;
}
.sv-option.is-selected { border-color: var(--ink); background: #fbfaf8; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.sv-option.is-selected::before {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--ink);
}
.sv-option:focus-within, .sv-card:focus-within { outline: 2px solid var(--gold-dark); outline-offset: 3px; }
.sv-other { margin-top: 12px; }
.sv-other, .sv-other input, .sv-field input { scroll-margin-bottom: calc(var(--nav-h) + 24px); scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- Style photo cards ---------- */
.sv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sv-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; font-weight: 400;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sv-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.sv-card span { display: block; padding: 12px 14px 14px; }
.sv-card:hover { border-color: var(--ink); }
.sv-card.is-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 6px 18px rgba(0, 0, 0, .1); }
.sv-card::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); border: 1.5px solid var(--ink-soft);
}
.sv-card.is-selected::after {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--ink);
}
@media (min-width: 720px) { .sv-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* ---------- Buttons + nav ---------- */
.sv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; height: 52px; padding: 0 28px;
  background: #353535; color: #fff; border: 1px solid #000; border-radius: 4px;
  font: inherit; font-size: 12px; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; text-indent: .3em;
  cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background-color .15s, transform .1s;
}
.sv-btn:hover { background: #000; }
.sv-btn:active { transform: translateY(1px); }
.sv-btn--light { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.sv-btn--light:hover { background: #fff; }
.sv-btn[disabled] { opacity: .55; cursor: progress; }
.sv-fine { margin-top: 20px; font-size: 13px; color: var(--ink-soft); max-width: 34em; }

.sv-nav { display: none; }
.js .sv-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(20px, 4vw, 48px) calc(14px + env(safe-area-inset-bottom));
  background: rgba(238, 234, 230, .96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sv-back {
  background: none; border: 0; padding: 12px 4px; font: inherit; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 5px;
}
.sv-nav .sv-next { min-width: 180px; }
@media (max-width: 520px) { .sv-nav .sv-next { flex: 1; min-width: 0; } }

/* JS enhancement: one step at a time */
.js .sv-step { display: none; }
.js .sv-step.is-active { display: block; animation: sv-in .32s ease both; }
.js .sv-intro.is-active { display: flex; }
@keyframes sv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Without JS everything shows as one long form and the progress UI is hidden */
html:not(.js) .sv-progress, html:not(.js) .sv-stepcount, html:not(.js) .sv-begin { display: none; }

/* ---------- Thank-you page ---------- */
.sv-thanks { text-align: left; }
.sv-thanks .sv-q { margin-bottom: 18px; }
.sv-links { display: grid; gap: 12px; margin: 30px 0 8px; max-width: 520px; }
.sv-link-card {
  display: block; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; font-size: 16px; font-weight: 400;
}
.sv-link-card small { display: block; color: var(--ink-soft); font-weight: 300; font-size: 14px; margin-top: 2px; }
.sv-link-card:hover { border-color: var(--ink); }

/* safety net: one stray over-wide element must never make a page scroll sideways on a phone (the actual causes are fixed where they are found) */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
