/*
 * ESTAVOLUME website — the panel's "drawing set" world (panel: frontend/DESIGN.md).
 * Palette: Graphite #2F3338 · Champagne #C9B38C · Off-white #F5F2EC.
 * Champagne is the annotation pen: lines, ticks, markers. Champagne text is always --gold-700.
 * Tokens mirror panel/frontend/src/index.css; keep both in step when the brand changes.
 */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f5f2ec; /* drafting table */
  --paper-100: #eeeae2;
  --paper-200: #e5e0d6;
  --sheet: #fcfbf8;
  --ink: #2f3338; /* graphite, 11.4:1 on paper */
  --ink-soft: #474c53;
  --stone: #5c6168; /* secondary, 5.6:1 */
  --line: #e2ddd3;
  --line-strong: #cbc4b6;
  --gold-200: #e6dac4;
  --gold-300: #d8c7a7;
  --gold-400: #cfbc99;
  --gold: #c9b38c; /* the pen */
  --gold-600: #9a8358; /* icons, 3.3:1 */
  --gold-700: #7a6643; /* champagne text, 4.9:1 */
  --offwhite: #f5f2ec;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --drafting: 125%;
  --sheet-width: 112%;

  --radius: 5px;
  --radius-sheet: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(72px, 10vw, 128px);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  /* the drafting table: a faint 24 px plan grid */
  background-image:
    linear-gradient(rgb(47 51 56 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(47 51 56 / 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  caret-color: var(--gold-600);
}

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

a {
  color: inherit;
}

::selection {
  background: var(--gold-200);
  color: var(--ink);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

/* page title: drafting lettering, wide caps */
h1 {
  font-stretch: var(--drafting);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  font-size: clamp(30px, 5.1vw, 62px);
  line-height: 1.02;
}

/* sheet headings: wide, sentence case */
h2 {
  font-stretch: var(--sheet-width);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h3 {
  font-stretch: var(--sheet-width);
  font-size: 18px;
  line-height: 1.3;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--offwhite);
  border-radius: var(--radius);
}
.skip:focus {
  top: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform 120ms var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
/* the one champagne-filled control: the key action (graphite text, 6.2:1) */
.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--gold-300);
}
.btn-primary {
  background: var(--ink);
  color: var(--offwhite);
}
.btn-primary:hover {
  background: var(--ink-soft);
}
.btn-outline {
  border-color: var(--line-strong);
  background: var(--sheet);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: rgb(47 51 56 / 0.4);
}
.btn-sm {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(245 242 236 / 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.top.is-stuck {
  border-bottom-color: var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
}
.brand {
  flex: none;
  display: block;
  padding: 6px 0;
}
.brand img {
  width: 172px;
  height: auto;
}
.nav {
  display: flex;
  gap: 28px;
  margin-right: auto;
  font-size: 15px;
}
.nav a,
.login,
.lang {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}
.nav a:hover,
.login:hover,
.lang:hover {
  color: var(--ink);
}
/* a pen tick under the hovered link */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--ease);
}
.nav a:hover::after {
  transform: scaleX(1);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 15px;
}
.lang {
  font-size: 13px;
  font-weight: 600;
  font-stretch: var(--drafting);
  letter-spacing: 0.08em;
  padding: 6px 2px;
}

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

.hero {
  padding-top: clamp(40px, 7vw, 96px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.hero-copy h1 {
  max-width: 11ch;
}
.lead {
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--ink-soft);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.aside {
  margin-top: 18px;
  font-size: 15px;
}
.aside a {
  color: var(--gold-700);
  text-underline-offset: 4px;
  text-decoration-color: var(--gold-400);
}
.aside a:hover {
  text-decoration-color: currentColor;
}

/* the gold dimension line under the page title */
.dim {
  position: relative;
  height: 12px;
  margin: 26px 0 22px;
  max-width: 420px;
}
.dim-line,
.dim::before,
.dim::after {
  position: absolute;
  top: 50%;
}
.dim-line {
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold-400);
  transform-origin: left;
}
.dim::before,
.dim::after {
  content: "";
  width: 1px;
  height: 11px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
}
.dim::before {
  left: 0;
}
.dim::after {
  right: 0;
}

.hero-figure {
  margin: 0;
}
.drawing {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* drawing styles */
.d-floor {
  fill: var(--paper-100);
  stroke: var(--line-strong);
  stroke-width: 0.75;
}
.d-plan {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: square;
}
.d-wall {
  fill: rgb(47 51 56 / 0.07);
  stroke: rgb(47 51 56 / 0.55);
  stroke-width: 0.6;
  stroke-linejoin: round;
}
.d-cut {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: square;
}
.d-furn-top {
  fill: var(--sheet);
  stroke: var(--stone);
  stroke-width: 0.7;
  stroke-linejoin: round;
}
.d-furn-side {
  fill: var(--paper-200);
  stroke: var(--stone);
  stroke-width: 0.7;
  stroke-linejoin: round;
}
.d-furn-end {
  fill: #d8d2c6;
  stroke: var(--stone);
  stroke-width: 0.7;
  stroke-linejoin: round;
}
.d-ext {
  stroke: var(--gold);
  stroke-width: 0.75;
}
.d-dimline {
  stroke: var(--gold);
  stroke-width: 1;
}
.d-tick {
  stroke: var(--gold-600);
  stroke-width: 1.2;
}
.d-value,
.d-area {
  fill: var(--gold-700);
  font-size: 12px;
  font-weight: 600;
  font-stretch: var(--drafting);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.d-area {
  font-size: 13px;
}
.d-room {
  fill: var(--ink-soft);
  stroke: var(--paper-100);
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke;
  font-size: 11px;
  font-weight: 500;
  font-stretch: var(--sheet-width);
}

/* load sequence (only when main.js runs and motion is allowed) */
.is-drawing .d-plan {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.is-drawing .d-notes,
.is-drawing .d-solids {
  opacity: 0;
}
.is-drawing.is-drawn .d-plan {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 900ms var(--ease);
}
.is-drawing.is-rising .d-solids {
  opacity: 1;
  transition: opacity 200ms linear;
}
.is-drawing.is-noted .d-notes {
  opacity: 1;
  transition: opacity 500ms var(--ease);
}
.js-motion .dim-line {
  transform: scaleX(0);
}
.js-motion.is-ready .dim-line {
  transform: scaleX(1);
  transition: transform 900ms var(--ease) 150ms;
}
.js-motion .dim::before,
.js-motion .dim::after {
  opacity: 0;
}
.js-motion.is-ready .dim::before,
.js-motion.is-ready .dim::after {
  opacity: 1;
  transition: opacity 300ms linear 900ms;
}

/* the drawing's title block: what goes in, what comes out */
.title-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(40px, 6vw, 72px) 0 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sheet);
  background: var(--sheet);
}
.title-block > div {
  padding: 18px 20px 20px;
  border-left: 1px solid var(--line);
}
.title-block > div:first-child {
  border-left: 0;
}
.title-block dt,
.legend figcaption,
.schedule thead th {
  font-size: 11px;
  font-weight: 600;
  font-stretch: var(--drafting);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.title-block dd {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 500;
  font-stretch: var(--sheet-width);
}

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

.section {
  padding-top: var(--section);
}
.section-head {
  max-width: 640px;
}
.section-head p {
  margin-top: 16px;
  color: var(--ink-soft);
}

/* the process as a dimension chain: one line, a tick between each stage */
.chain {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 56px 0 0;
  padding: 0;
  position: relative;
}
.chain-step {
  position: relative;
  padding: 36px 28px 0 0;
}
.chain-step::before,
.chain-step:last-child::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1px;
  height: 15px;
  background: var(--gold-600);
  transform: translateY(-50%) rotate(45deg);
}
.chain-step::before {
  left: 0;
}
.chain-step:last-child::after {
  right: 0;
}
.chain::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--gold);
}
.chain-step p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 30ch;
}

/* panel: heading + legend on the left, a drawing legend of features on the right */
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.legend {
  margin: 40px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  background: var(--sheet);
  max-width: 420px;
}
.legend ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 14px 0 0;
  padding: 0;
  font-size: 15px;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.symbol .s-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.symbol .s-fill {
  fill: var(--ink);
}
.symbol .s-gold {
  fill: var(--gold);
  stroke: var(--gold-600);
  stroke-width: 1;
}
.spec {
  margin: 0;
  border-top: 1px solid var(--ink);
}
.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}
.spec dt {
  font-weight: 500;
  font-stretch: var(--sheet-width);
}
.spec dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* pricing: a schedule, the price drawn as a dimension to scale */
.sheet {
  margin-top: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sheet);
  background: var(--sheet);
  overflow: hidden;
}
.schedule {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.schedule th,
.schedule td {
  padding: 20px 24px;
  text-align: left;
  vertical-align: middle;
}
.schedule thead th {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}
.schedule tbody tr + tr {
  border-top: 1px solid var(--line);
}
.schedule tbody th {
  font-size: 20px;
  font-weight: 500;
  font-stretch: var(--sheet-width);
  width: 22%;
}
.schedule .scope {
  color: var(--ink-soft);
  width: 30%;
}
.schedule .price {
  display: flex;
  align-items: center;
  gap: 16px;
}
.price-head {
  width: 48%;
}
.measure {
  position: relative;
  flex: none;
  width: calc(var(--run) * (100% - 120px));
  height: 12px;
}
.measure::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--gold);
}
.measure::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--gold-600), var(--gold-600)) left center / 1px 13px no-repeat,
    linear-gradient(var(--gold-600), var(--gold-600)) right center / 1px 13px no-repeat;
  transform: skewX(-45deg);
}
.amount {
  flex: none;
  font-size: 20px;
  font-weight: 500;
  font-stretch: var(--sheet-width);
  white-space: nowrap;
}
.after {
  margin-top: 28px;
}

/* questions */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
}
.faq {
  border-top: 1px solid var(--ink);
}
.faq details {
  border-bottom: 1px solid var(--line-strong);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-weight: 500;
  font-stretch: var(--sheet-width);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq details p {
  padding: 0 48px 22px 0;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 60ch;
}
.plus {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--gold-600);
  transition: transform 260ms var(--ease);
}
.plus::after {
  transform: rotate(90deg);
}
details[open] .plus::after {
  transform: rotate(0deg);
}

/* the closing sheet: graphite, the brand's dark ground */
.end {
  margin-top: var(--section);
  background: var(--ink);
  color: var(--offwhite);
}
.end-inner {
  display: grid;
  justify-items: start;
  gap: 28px;
  padding-block: clamp(64px, 9vw, 112px);
}
.end h2 {
  max-width: 20ch;
  color: var(--offwhite);
  font-size: clamp(28px, 3.6vw, 44px);
}
.end p {
  color: #c9c6bf;
  font-size: 16px;
}
.end p a {
  color: var(--gold);
  text-underline-offset: 4px;
}
.end .btn-gold:hover {
  background: var(--gold-300);
}
.end-mark {
  width: 56px;
  height: 56px;
}

/* footer */
.foot {
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--stone);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  padding-block: 32px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 auto 0 0;
  padding: 0;
  list-style: none;
}
.foot a {
  color: var(--ink-soft);
  text-underline-offset: 4px;
}

/* 404 */
.lost {
  padding-block: clamp(72px, 12vw, 160px);
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .nav {
    display: none;
  }
  .hero-grid,
  .panel-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy h1 {
    max-width: 14ch;
  }
  .title-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .title-block > div:nth-child(3) {
    border-left: 0;
  }
  .title-block > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .chain {
    grid-template-columns: minmax(0, 1fr);
    margin-left: 6px;
  }
  .chain::before {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .chain-step {
    padding: 0 0 36px 28px;
  }
  .chain-step:last-child {
    padding-bottom: 0;
  }
  .chain-step::before,
  .chain-step:last-child::after {
    left: 0;
    right: auto;
    transform: translate(-50%, 0) rotate(45deg);
    top: 4px;
  }
  .chain-step:last-child::after {
    top: auto;
    bottom: -8px;
  }
  .spec-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .schedule thead {
    display: none;
  }
  .schedule,
  .schedule tbody,
  .schedule tr,
  .schedule th,
  .schedule td {
    display: block;
    width: auto;
  }
  .schedule tbody th {
    width: auto;
    padding: 20px 20px 2px;
  }
  .schedule .scope {
    width: auto;
    padding: 0 20px 10px;
  }
  .schedule .price {
    padding: 0 20px 20px;
  }
  .measure {
    width: calc(var(--run) * (100% - 110px));
  }
}

@media (max-width: 520px) {
  .d-room {
    display: none;
  }
  .login {
    display: none;
  }
  .top-inner {
    gap: 12px;
    min-height: 64px;
  }
  .top-actions {
    gap: 14px;
  }
  .brand img {
    width: 136px;
  }
  .title-block {
    grid-template-columns: minmax(0, 1fr);
  }
  .title-block > div {
    border-left: 0;
  }
  .title-block > div + div {
    border-top: 1px solid var(--line);
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .faq details p {
    padding-right: 0;
  }
}

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

.measure.p-basic{--run:0.400}
.measure.p-standard{--run:0.667}
.measure.p-premium{--run:1.000}
