/* ==========================================================================
   Homekeep landing page

   Design direction: the hearth. A warm plaster wall, a dark wooden shelf
   over the fireplace, and one fire as the only bright thing on the page. Headings are a
   quiet serif, body text a plain sans. System fonts only: the page makes no
   requests to anyone but its own server.

   ========================================================================== */

:root {
  --bg: #f5efe6;
  --bg-tint: #ece3d6;
  --surface: #fffaf3;
  --ink: #2a211c;
  --ink-soft: #5d5048;
  --line: #d9ccbc;
  --wood: #4a342a;
  --wood-dark: #35241d;
  --accent: #a8431f;
  --accent-hover: #8c3616;
  --on-accent: #ffffff;
  --ember: #f0a24a;
  --ember-soft: #f8d9a0;
  --ok: #2c6a4a;
  --error: #a3271f;
  --leaf: #4f7f5f;
  --leaf-2: #7fa98a;
  --led: #3f9a6b;
  --glow-opacity: 0.35;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "DejaVu Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Liberation Sans", Arial, sans-serif;

  --s-1: 0.9rem;
  --s0: 1.0625rem;
  --s1: 1.25rem;
  --s2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --s3: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem);

  --r-lg: 28px;
  --r-md: 16px;
  --r-sm: 10px;
  --gutter: clamp(16px, 4vw, 36px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1613;
    --bg-tint: #241c18;
    --surface: #2a211c;
    --ink: #f1e8dc;
    --ink-soft: #c2b3a4;
    --line: #43362e;
    --wood: #5b4133;
    --wood-dark: #130e0c;
    --accent: #f0a24a;
    --accent-hover: #f6b769;
    --on-accent: #23160c;
    --ok: #7fcf9f;
    --error: #ff9a8c;
    --glow-opacity: 0.5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--s0)/1.6 var(--sans);
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--s3); }
h2 { font-size: var(--s2); }
h3 { font-size: var(--s1); font-weight: 600; line-height: 1.3; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 720px; }
/* On a desktop the content fills the screen, leaving 8% on each side (16% in
   total). Long text keeps a readable line length through its own max-width. */
@media (min-width: 900px) {
  .container, .container.narrow { --gutter: 8vw; max-width: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--bg);
}
.skip-link:focus { top: 10px; }

/* ---- header -------------------------------------------------------------- */

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0.01em; }
.mark-shelf { fill: var(--ink); }
.mark-wall { fill: var(--wood); }
.mark-fire { fill: var(--ember); }

.header-tools { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch a {
  padding: 6px 9px; border-radius: 999px;
  color: var(--ink-soft); font-size: var(--s-1); font-weight: 600;
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { background: var(--bg-tint); color: var(--ink); }

/* ---- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 var(--s0)/1.2 var(--sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: var(--s-1); }

/* ---- hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(24px, 5vw, 64px) clamp(48px, 7vw, 96px); }
.hero-inner { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

.badge {
  display: inline-block; margin-bottom: 22px; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); font-size: var(--s-1);
}
.eyebrow {
  margin-bottom: 12px;
  color: var(--accent); font-size: var(--s-1); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.lead { margin-top: 20px; max-width: 34em; color: var(--ink-soft); font-size: var(--s1); line-height: 1.5; }

.hero-art svg { display: block; width: 100%; height: auto; max-width: 520px; margin-inline: auto; }
.art-wall { fill: var(--bg-tint); }
.art-glow { fill: var(--ember); opacity: var(--glow-opacity); filter: blur(40px); }
.art-surround { fill: var(--wood); }
.art-hearth { fill: var(--wood-dark); }
.art-flame-outer { fill: var(--ember); }
.art-flame-inner { fill: var(--ember-soft); }
.art-shelf { fill: var(--wood-dark); }
.art-shelf-under { fill: var(--wood); }
.art-frame { fill: var(--wood); }
.art-photo { fill: var(--ember-soft); }
.art-figure { fill: var(--wood); opacity: 0.75; }
.art-box { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.art-bay { fill: var(--bg-tint); stroke: var(--line); stroke-width: 1.5; }
.art-led { fill: var(--led); }
.art-led-halo { fill: var(--led); opacity: 0.22; }
.art-leaf { fill: var(--leaf); }
.art-leaf-2 { fill: var(--leaf-2); }
.art-pot { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .art-flame-outer, .art-flame-inner { transform-origin: 240px 400px; animation: flicker 3.2s ease-in-out infinite; }
  .art-flame-inner { animation-duration: 2.3s; }
  .art-led-halo { transform-origin: 316px 188px; animation: pulse 3s ease-in-out infinite; }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes flicker {
  0%, 100% { transform: scale(1, 1); }
  40% { transform: scale(0.97, 1.05); }
  70% { transform: scale(1.03, 0.96); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.22; }
  50% { transform: scale(1.5); opacity: 0.08; }
}

/* ---- waitlist form ------------------------------------------------------- */

.waitlist { margin-top: 30px; max-width: 520px; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 10px; }
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 20px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: var(--s0)/1.2 var(--sans);
}
.waitlist input[type="email"]::placeholder { color: var(--ink-soft); opacity: 0.7; }
.waitlist input[type="email"]:focus-visible { outline-offset: 1px; border-color: var(--ink); border-radius: 999px; }
.waitlist input[aria-invalid="true"] { border-color: var(--error); }
.waitlist .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
  .waitlist .btn { flex: 1 1 100%; }
}

.waitlist-status { min-height: 1.6em; margin-top: 10px; font-weight: 600; }
.waitlist-status:empty { min-height: 0; margin-top: 0; }
.waitlist-status.is-ok { color: var(--ok); }
.waitlist-status.is-error { color: var(--error); }
.waitlist-note { margin-top: 10px; color: var(--ink-soft); font-size: var(--s-1); }
.waitlist.is-done .waitlist-row, .waitlist.is-done .waitlist-note { display: none; }
.waitlist.is-done .waitlist-status { font-size: var(--s1); }

/* Honeypot: off-screen for people, still in the markup for bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- sections ------------------------------------------------------------ */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section-tint { background: var(--bg-tint); }
.section-title { margin-bottom: clamp(24px, 3vw, 40px); }

.points, .steps, .features { display: grid; gap: 20px; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

.point, .feature {
  padding: 26px 24px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.point { border-top: 5px solid var(--wood); }
.point p, .feature p, .step p { margin-top: 8px; color: var(--ink-soft); }

.steps { counter-reset: step; }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--wood); color: #fff7ea;
  font: 500 1.3rem/1 var(--serif);
}

.faq { border-bottom: 1px solid var(--line); }
.faq:first-of-type { border-top: 1px solid var(--line); }
.faq summary { padding: 18px 0; font-size: var(--s1); font-weight: 600; cursor: pointer; }
.faq p { padding-bottom: 20px; color: var(--ink-soft); }

.closing { text-align: center; }
.closing .lead { margin-inline: auto; }
.closing .waitlist { margin-inline: auto; }
.closing .waitlist-row { justify-content: center; }

/* ---- footer -------------------------------------------------------------- */

.site-footer {
  padding-block: 32px 44px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: var(--s-1);
}
.site-footer p + p { margin-top: 6px; }

/* ---- small screens ------------------------------------------------------- */

/* On a phone the form sits right under the headline, so the header button
   is redundant and would push the header wider than the screen. */
@media (max-width: 560px) {
  .site-header .btn-small { display: none; }
}

/* Long words (Bulgarian especially) must wrap rather than widen the page. */
h1, h2, h3, p, summary { overflow-wrap: break-word; }
.point, .feature, .step, .hero-copy { min-width: 0; }

/* ---- before the copy loads ------------------------------------------------ */

/* The text is filled in by i18n.js. Until then (or when JavaScript is off)
   the empty page stays hidden and only the noscript note can show. */
html:not(.ready) .site-header,
html:not(.ready) main,
html:not(.ready) .site-footer { visibility: hidden; }

.noscript { margin: 0; padding: 16px var(--gutter); background: var(--bg-tint); text-align: center; }
.contact { margin-top: 20px; color: var(--ink-soft); font-size: var(--s-1); }

/* ---- questionnaire --------------------------------------------------------- */

.survey {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  overflow-y: auto;
}
.survey::backdrop { background: rgba(20, 14, 10, 0.55); }
.survey-form { padding: clamp(20px, 5vw, 32px); }
.survey-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.survey-close {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; margin: -8px -8px 0 0;
  border: 0; border-radius: 50%;
  background: none; color: var(--ink-soft); cursor: pointer;
}
.survey-close:hover { background: var(--bg-tint); color: var(--ink); }
.survey-close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.survey-intro { margin-top: 8px; color: var(--ink-soft); }

.survey-q { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.survey-q legend { padding: 0; margin-bottom: 10px; font-weight: 600; line-height: 1.35; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: var(--s-1); line-height: 1.3;
}
.chip:hover span { border-color: var(--ink-soft); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.survey .waitlist-status { margin-top: 18px; }

.survey-step { margin-top: 18px; color: var(--ink-soft); font-size: var(--s-1); font-weight: 600; }
.survey-progress { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--bg-tint); overflow: hidden; }
.survey-progress span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.25s ease; }
.survey-section h3 { margin-top: 22px; font-family: var(--serif); font-size: var(--s2); font-weight: 500; }
.survey-section .survey-q:first-of-type { margin-top: 16px; }

.survey-nav { display: flex; gap: 10px; margin-top: 24px; }
.survey-nav .btn { flex: 1 1 0; }
.survey-nav .btn-quiet { flex: 0 0 auto; }
.btn-quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { background: var(--bg-tint); color: var(--ink); }
.survey-skip {
  display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 8px;
  border: 0; background: none; color: var(--ink-soft);
  font: var(--s-1)/1.3 var(--sans); text-decoration: underline; cursor: pointer;
}
.survey-skip:hover { color: var(--ink); }
.survey [hidden] { display: none; }

/* ---- interactive sections ---------------------------------------------------- */

.section-lead { margin-top: 10px; margin-bottom: clamp(20px, 3vw, 32px); color: var(--ink-soft); font-size: var(--s1); }

/* cost calculator */
.cost {
  display: grid; gap: 24px; padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.cost-controls { display: grid; gap: 22px; }
.cost-field { display: grid; gap: 10px; }
.cost-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.cost-label output { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.cost-result { padding-top: 22px; border-top: 1px solid var(--line); }
.cost-total { font: 500 var(--s3)/1.1 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.cost-after { margin-top: 10px; color: var(--ink-soft); }

/* "what lives on your box": version 1, then the future */
.box-group + .box-group { margin-top: clamp(32px, 5vw, 56px); }
.box-label {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--wood); color: #fff7ea;
  font-size: var(--s-1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.box-note { margin: 12px 0 18px; color: var(--ink-soft); }




/* Long button labels (Bulgarian especially) wrap instead of widening the page. */
.btn { padding-block: 10px; white-space: normal; text-align: center; }
.btn-small { white-space: nowrap; }
.waitlist .btn { flex: 0 1 auto; max-width: 100%; }

/* ---- icons ------------------------------------------------------------------- */

.icon-badge {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg-tint); color: var(--accent);
}
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- "what lives on your box": roomy cards -------------------------------------- */

.features { gap: 24px; }
.feature { padding: clamp(24px, 3vw, 36px); }
.feature h3 { font-size: var(--s1); }
.feature p { margin-top: 10px; max-width: 34em; font-size: var(--s0); line-height: 1.7; }
@media (min-width: 760px) {
  .features, .features.features-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .features.features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- wide-screen layouts for the sections that used to be a narrow column ------- */

.faq p, .section-lead, .cost-after, .box-note { max-width: 46em; }
@media (min-width: 900px) {
  .cost { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
  .cost-result { padding-top: 0; padding-left: clamp(32px, 5vw, 72px); border-top: 0; border-left: 1px solid var(--line); }
  .closing .lead { max-width: 34em; }
}
