/* Heritage Cabinets — Crisp Modern (design system v3). Tokens + components for the
   Design Studio, catalog and start pages. One accent (persimmon) and it means one
   thing: get a quote. Nothing on the page is smaller than 15px. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #ffffff;
  --surface: #f6f5f2;
  --tint: #edebe6;
  --ink: #141414;
  --ink-muted: #57534e;
  --on-ink: #ffffff;
  --on-ink-muted: #d6d3d1;
  --accent: #c2410c;
  --accent-deep: #9a3412;
  --on-accent: #ffffff;
  --line: #e7e5e4;
  --line-strong: #8a857d;
  --focus: var(--accent);
  --success: #3f6a48;
  --danger: #b42318;
  --swatch-edge: #1414142e;
  --scrim: #1414148c;
  --shadow-frame: 0 18px 50px -24px rgba(20, 20, 20, 0.35);
  --shadow-cta: 0 10px 22px -10px rgba(194, 65, 12, 0.55);
  --shadow-sheet: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 8px; --radius-md: 10px; --radius-lg: 16px; --radius-pill: 999px;
  --control-lg: 60px; --control-md: 52px;
  --header-h: 76px; --panel-w: 400px; --content-max: 1280px;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (max-width: 640px) { :root { --header-h: 64px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-sans); font-size: 18px; line-height: 28px; -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3, p, ol, ul) { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hc-arrow { display: inline-block; transition: transform .15s ease; }
.hc-eyebrow { font: 800 14px/20px var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.hc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Button — primary is the quote action, and nothing else */
.hc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--control-md); padding: 0 24px; border-radius: var(--radius-md); border: 2px solid transparent; font: 700 18px/24px var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease; }
.hc-btn:hover .hc-arrow { transform: translateX(3px); }
.hc-btn:active { transform: translateY(1px); }
.hc-btn:disabled { opacity: .7; cursor: progress; }
.hc-btn-lg { min-height: var(--control-lg); padding: 0 32px; font-size: 19px; }
.hc-btn-block { display: flex; width: 100%; }
.hc-btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-cta); }
.hc-btn-primary:hover { background: var(--accent-deep); color: var(--on-accent); }
.hc-btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.hc-btn-secondary:hover { background: var(--ink); color: var(--on-ink); }

/* Header — sticky, the quote button always in reach */
.hc-header { position: sticky; top: 0; z-index: 40; background: var(--ground); border-bottom: 1px solid var(--line); }
.hc-header-in { max-width: var(--content-max); margin: 0 auto; height: var(--header-h); padding: 0 var(--space-5); display: flex; align-items: center; gap: var(--space-5); }
.hc-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 800 22px/1 var(--font-sans); letter-spacing: -0.015em; white-space: nowrap; }
.hc-brand:hover { color: var(--ink); }
.hc-brand img { width: 52px; height: 52px; }
.hc-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.hc-nav a { color: var(--ink); text-decoration: none; font: 500 17px/24px var(--font-sans); white-space: nowrap; border-bottom: 2px solid transparent; padding: 4px 0; }
.hc-nav a:hover, .hc-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.hc-nav .hc-phone { font-weight: 600; }
.hc-header .hc-btn { margin-left: 4px; }
.hc-cta-short { display: none; }
@media (max-width: 860px) { .hc-nav a:not(.hc-phone) { display: none; } }
@media (max-width: 640px) {
  .hc-header-in { padding: 0 16px; gap: 10px; }
  .hc-brand { font-size: 17px; gap: 8px; min-width: 0; }
  .hc-brand img { width: 40px; height: 40px; }
  .hc-nav .hc-phone { display: none; }
  .hc-header .hc-btn { min-height: 48px; padding: 0 16px; font-size: 17px; }
  .hc-cta-long { display: none; }
  .hc-cta-short { display: inline; }
}

/* Page frame */
.hc-wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 640px) { .hc-wrap { padding: 0 16px; } }

/* Intro row: title on the left, catalog card on the right — both above the fold */
.hc-intro { display: flex; align-items: center; gap: var(--space-6); padding: 28px 0 24px; }
.hc-intro-text { flex: 1 1 auto; min-width: 0; }
.hc-intro h1 { font: 800 48px/52px var(--font-sans); letter-spacing: -0.025em; color: var(--ink); }
.hc-lead { margin-top: 8px; font: 400 21px/30px var(--font-sans); color: var(--ink-muted); }

/* Catalog card — compact; its button is an outline so it never competes with the quote button */
.hc-catalog { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 18px 10px 10px; background: var(--surface); border: 1.5px solid transparent; border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color .15s ease; }
.hc-catalog:hover { border-color: var(--line-strong); color: var(--ink); }
.hc-catalog:hover .hc-arrow { transform: translateX(3px); }
.hc-catalog img { flex: none; width: 136px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); }
.hc-catalog-text { flex: 1 1 auto; min-width: 0; }
.hc-catalog h2 { font: 800 22px/28px var(--font-sans); letter-spacing: -0.015em; color: var(--ink); }
.hc-catalog p { margin-top: 2px; font: 500 16px/22px var(--font-sans); color: var(--ink-muted); }
.hc-catalog-go { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid var(--ink); border-radius: var(--radius-md); font: 600 17px/24px var(--font-sans); white-space: nowrap; }
.hc-catalog:hover .hc-catalog-go { background: var(--ink); color: var(--on-ink); }

/* Studio: render + quote bar on the left, configurator on the right */
.hc-studio { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); gap: var(--space-6); align-items: start; }
.hc-scene { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: var(--space-4); }
.hc-scene-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-frame); }
.hc-scene-frame canvas { display: block; width: 100%; aspect-ratio: 16 / 9; touch-action: pan-y; cursor: grab; }
.hc-scene-tag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(20, 20, 20, 0.78); color: #ffffff; font: 600 15px/20px var(--font-sans); pointer-events: none; transition: opacity .3s ease; }
.hc-scene-tag svg { width: 18px; height: 18px; }
.hc-scene-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; font: 600 17px/24px var(--font-sans); color: var(--ink-muted); background: var(--surface); transition: opacity .3s ease; }
.hc-scene-status[hidden] { display: none; }
.hc-spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: hc-spin 0.9s linear infinite; }
@keyframes hc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hc-spin { animation-duration: 2.4s; } }

/* Quote bar — the one dark block on the page, directly under the render */
.hc-quotebar { display: flex; align-items: center; gap: var(--space-5); padding: 20px 20px 20px 28px; border-radius: var(--radius-lg); background: var(--ink); color: var(--on-ink); }
.hc-quotebar-text { min-width: 0; }
.hc-quotebar h2 { font: 800 26px/32px var(--font-sans); letter-spacing: -0.02em; color: var(--on-ink); }
.hc-quotebar p { margin-top: 4px; font: 400 17px/24px var(--font-sans); color: var(--on-ink-muted); }
.hc-quotebar .hc-btn { margin-left: auto; flex: none; }

/* Configurator panel */
.hc-panel { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: 22px; }
.hc-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.hc-step-head { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: var(--space-3); padding: 0; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.hc-step-n { flex: none; display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font: 700 15px/28px var(--font-sans); text-align: center; }
.hc-step-v { margin-left: auto; font-weight: 500; color: var(--ink-muted); text-align: right; }
.hc-hint { font: 500 15px/22px var(--font-sans); color: var(--ink-muted); padding-top: 18px; border-top: 1px solid var(--line); }
.hc-note { margin-top: 10px; font: 500 15px/22px var(--font-sans); color: var(--ink-muted); }

/* Layout cards — plan drawings, counter runs in accent */
.hc-layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.hc-layout { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--ground); color: var(--ink); font: 600 17px/24px var(--font-sans); text-align: left; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.hc-layout:hover { border-color: var(--ink); }
.hc-layout svg { flex: none; width: 44px; height: 38px; }
.hc-layout .plan-wall { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.hc-layout .plan-run { fill: var(--accent); }
.hc-layout[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }

/* Option chips */
.hc-chips { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-md); padding: 0 22px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--ground); color: var(--ink); font: 600 17px/24px var(--font-sans); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.hc-chip:hover { border-color: var(--ink); }
.hc-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hc-chip .hc-check { display: none; width: 16px; height: 16px; }
.hc-chip[aria-pressed="true"] .hc-check { display: block; }
.hc-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.hc-chip:disabled:hover { border-color: var(--line-strong); }
.hc-chip[aria-pressed="true"]:disabled:hover { border-color: var(--ink); }

/* Finish swatches — photos of the real Sollid samples */
.hc-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 12px; }
.hc-swatch { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: none; cursor: pointer; font: 500 15px/20px var(--font-sans); color: var(--ink-muted); text-align: center; }
.hc-swatch img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--swatch-edge); transition: transform .14s ease, box-shadow .14s ease; }
.hc-swatch:hover img { transform: translateY(-2px); }
.hc-swatch[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.hc-swatch[aria-pressed="true"] img { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px var(--ink); }

/* "+ Show more colors" and the groups it opens */
.hc-expand { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--accent); font: 700 17px/24px var(--font-sans); cursor: pointer; }
.hc-expand::before { content: "+"; display: inline-block; width: 16px; font-size: 22px; line-height: 1; font-weight: 700; transform: translateY(-1px); }
.hc-expand[aria-expanded="true"]::before { content: "−"; }
.hc-expand:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hc-subhead { margin: 14px 0 10px; font: 600 17px/24px var(--font-sans); color: var(--ink); }
#moreColors .hc-subhead:first-child { margin-top: 4px; }

/* Partner referrals in the quote sheet: one checkbox per trade */
.hc-refer { margin: 4px 0 16px; padding: 0; border: 0; min-width: 0; }
.hc-refer legend { padding: 0; margin-bottom: 4px; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.hc-refer legend span { font-weight: 400; color: var(--ink-muted); }
.hc-refer-opts { display: flex; flex-wrap: wrap; gap: 0 24px; }
.hc-check-row { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 500 17px/24px var(--font-sans); color: var(--ink); cursor: pointer; }
.hc-check-row input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); cursor: pointer; }

/* How it works */
.hc-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-8); padding-top: var(--space-7); border-top: 1px solid var(--line); list-style: none; }
.hc-how b { display: block; font: 800 24px/30px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); }
.hc-how-d { display: block; margin-top: 6px; font: 400 18px/28px var(--font-sans); color: var(--ink-muted); }
.hc-how .hc-step-n { display: block; margin-bottom: 12px; }

/* Footer */
.hc-footer { margin-top: var(--space-8); background: var(--tint); }
.hc-footer-in { max-width: var(--content-max); margin: 0 auto; padding: 28px var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font: 500 15px/22px var(--font-sans); color: var(--ink-muted); }
.hc-footer-in a:not(.hc-btn) { color: var(--ink); font-weight: 600; text-decoration: none; }
.hc-footer-in a:not(.hc-btn):hover { text-decoration: underline; }
.hc-footer-in .hc-btn { margin-left: auto; }

/* Sticky quote bar — phones and small tablets only */
.hc-stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(26, 26, 26, 0.45); }
.hc-stickybar-text { min-width: 0; font: 500 15px/20px var(--font-sans); color: var(--ink-muted); }
.hc-stickybar-text b { display: block; font: 600 17px/22px var(--font-sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-stickybar .hc-btn { margin-left: auto; flex: none; }
@media (min-width: 861px) { .hc-stickybar { display: none; } }

/* Quote sheet — the lead form */
.hc-sheet-bg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); }
.hc-sheet-bg[hidden] { display: none; }
.hc-sheet { position: relative; width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--ground); box-shadow: var(--shadow-sheet); }
.hc-sheet h2 { padding-right: 48px; font: 800 34px/40px var(--font-sans); letter-spacing: -0.02em; }
.hc-sheet-sub { margin-top: 6px; font: 400 18px/26px var(--font-sans); color: var(--ink-muted); }
.hc-sheet-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font: 600 26px/44px var(--font-sans); cursor: pointer; }
.hc-sheet-close:hover { background: var(--tint); }
.hc-design { display: flex; align-items: center; gap: 14px; margin: 20px 0 22px; padding: 10px; border-radius: var(--radius-md); background: var(--surface); }
.hc-design img { flex: none; width: 84px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--swatch-edge); }
.hc-design b { display: block; font: 600 15px/20px var(--font-sans); color: var(--ink-muted); }
.hc-design span { font: 600 17px/24px var(--font-sans); color: var(--ink); }
.hc-field { display: block; margin-bottom: 14px; }
.hc-field > span { display: block; margin-bottom: 6px; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.hc-input, .hc-select { width: 100%; min-height: var(--control-md); padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--ground); color: var(--ink); font: 400 18px/24px var(--font-sans); }
.hc-input::placeholder { color: var(--ink-muted); opacity: 1; }
.hc-input:focus, .hc-select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.hc-input[aria-invalid="true"] { border-color: var(--danger); }
.hc-error { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fdeceb; color: var(--danger); font: 600 16px/22px var(--font-sans); }
.hc-error[hidden] { display: none; }
.hc-error a { color: inherit; }
.hc-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 14px; font: 500 15px/22px var(--font-sans); color: var(--ink-muted); }
.hc-trust span::before { content: "✓"; margin-right: 6px; color: var(--success); font-weight: 700; }
.hc-sent { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 16px; border-radius: var(--radius-md); background: var(--surface); font: 500 18px/26px var(--font-sans); color: var(--ink); }
.hc-sent svg { flex: none; width: 26px; height: 26px; color: var(--success); }
.hc-sent b { color: var(--success); }
body.hc-lock { overflow: hidden; }

/* Responsive */
@media (max-width: 1100px) {
  .hc-intro { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 0 16px; }
}
@media (max-width: 860px) {
  .hc-studio { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* Phones: the render pins under the header while the picks scroll, so every
     choice shows up on screen without scrolling back. */
  .hc-scene { display: contents; }
  .hc-scene-pin { position: sticky; top: var(--header-h); z-index: 20; margin: -8px 0; padding: 8px 0; background: var(--ground); }
  .hc-scene-frame canvas { max-height: 46vh; }
  .hc-how { grid-template-columns: 1fr; }
  .hc-footer-in { padding-bottom: 110px; }
}
@media (max-width: 640px) {
  .hc-intro h1 { font-size: 36px; line-height: 40px; }
  .hc-lead { font-size: 19px; line-height: 27px; }
  .hc-catalog { gap: 12px; padding: 8px 12px 8px 8px; }
  .hc-catalog img { width: 88px; height: 64px; }
  .hc-catalog h2 { font-size: 19px; line-height: 24px; }
  .hc-catalog p { display: none; }
  .hc-catalog-go { border: 0; padding: 0 4px; }
  .hc-catalog-go .hc-go-label { display: none; }
  .hc-quotebar { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
  .hc-quotebar .hc-btn { margin-left: 0; }
  .hc-panel { padding: 18px 16px; }
  .hc-layout { gap: 8px; padding: 8px 10px; }
  .hc-layout svg { width: 36px; height: 31px; }
  .hc-scene-tag { padding: 4px 10px; }
  .hc-how b { font-size: 22px; line-height: 28px; }
}
@media (max-width: 520px) {
  .hc-sheet-bg { align-items: flex-end; padding: 0; }
  .hc-sheet { max-width: 100%; border-radius: 16px 16px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .hc-sheet h2 { font-size: 28px; line-height: 34px; }
}
@media (max-width: 380px) {
  .hc-layout { white-space: normal; }
  .hc-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
}
