:root {
  color-scheme: light;
  --canvas: #fffdfa;
  --paper: #ffffff;
  --warm: #f8f1eb;
  --ink: #111111;
  --muted: #625f5b;
  --line: #ded9d4;
  --accent: #ff5b3d;
  --accent-dark: #e9482d;
  --error: #a72d25;
  --display: Georgia, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 28px 65px rgba(38, 29, 24, .16), 0 4px 14px rgba(38, 29, 24, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--ink); background: var(--canvas); font-family: var(--body); }
button, input { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  min-height: 76px; padding: 10px clamp(24px, 4vw, 64px); display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 34px;
  position: sticky; top: 0; z-index: 30; background: rgba(255,253,250,.94); border-bottom: 1px solid rgba(17,17,17,.08); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; flex-direction: column; width: max-content; color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: .05em; line-height: .9; }
.brand__top { font-size: 22px; }
.brand i { color: var(--accent); font-style: normal; }
.brand__bottom { margin-top: 5px; font-size: 11px; letter-spacing: .16em; }
.main-nav { display: flex; justify-content: center; gap: clamp(24px, 3vw, 48px); }
.main-nav a { text-decoration: none; font-size: 14px; font-weight: 750; white-space: nowrap; transition: color .2s ease; }
.main-nav a:hover { color: var(--accent); }
.chevron { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); }
.header-controls { display: flex; align-items: center; gap: 20px; }
.language-switch { display: flex; align-items: center; gap: 5px; color: #aaa29b; }
.language-switch button { min-width: 28px; min-height: 36px; border: 0; padding: 0; color: #aaa29b; background: transparent; font-size: 13px; font-weight: 850; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--ink); }
.header-action, .calculate-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 5px; color: white; background: var(--accent); text-decoration: none; font-weight: 800; box-shadow: 0 8px 20px rgba(255,91,61,.2); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.header-action { min-height: 46px; padding: 0 20px; font-size: 14px; }
.header-action:hover, .calculate-button:hover { transform: translateY(-2px); background: var(--accent-dark); box-shadow: 0 12px 28px rgba(255,91,61,.27); }

.hero { position: relative; min-height: 1060px; padding-bottom: 530px; display: grid; grid-template-columns: 46% 54%; background: var(--canvas); }
.hero__copy { position: relative; z-index: 2; padding: clamp(58px, 7vw, 100px) 4vw 70px clamp(34px, 5vw, 76px); align-self: start; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.hero h1 { margin: 0; max-width: 670px; font: 700 clamp(56px, 5.2vw, 84px)/.96 var(--display); letter-spacing: -.055em; }
.accent-rule { display: block; width: 68px; height: 6px; margin: 24px 0 18px; border-radius: 5px; background: var(--accent); }
.hero__lede { max-width: 650px; margin: 0; font-size: clamp(18px, 1.55vw, 24px); line-height: 1.45; }
.trust-list { display: flex; flex-wrap: wrap; gap: 18px 30px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.trust-list li::before { content: "✓"; margin-right: 9px; color: var(--accent); font-weight: 950; }
.hero__photo { height: 490px; margin: 0; overflow: hidden; clip-path: polygon(12% 0,100% 0,100% 100%,0 100%); background: #e8ded3; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; animation: hero-settle 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hero-settle { from { opacity: .72; transform: scale(1.045); } to { opacity: 1; transform: scale(1); } }

.calculator { position: absolute; z-index: 6; left: clamp(24px, 5vw, 76px); right: clamp(24px, 5vw, 76px); bottom: 36px; margin: 0 auto; max-width: 1320px; padding: 25px 30px 30px; border: 1px solid #e6e0da; border-radius: 10px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
.calculator__title { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.calculator__title svg { display: none; }
.calculator__title .eyebrow { margin-bottom: 5px; color: var(--accent); }
.calculator__title h2 { margin: 0 0 15px; font: 700 clamp(28px, 2.5vw, 40px)/1 var(--display); letter-spacing: -.025em; }
.reset-button { border: 0; padding: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.reset-button span:first-child { display: inline-block; font-size: 22px; transition: transform .35s ease; }
.reset-button:hover span:first-child { transform: rotate(-120deg); }
.calculator__body { display: grid; grid-template-columns: 1fr 1.05fr; gap: 0; }
.fields { padding: 18px 30px 0 0; border-right: 1px solid var(--line); }
.field { min-height: 58px; display: grid; grid-template-columns: minmax(145px, .85fr) minmax(180px, 1.15fr); align-items: center; gap: 15px; position: relative; }
.field label { font-size: 14px; font-weight: 750; }
.input-shell { min-height: 42px; display: grid; grid-template-columns: 1fr 54px; align-items: center; overflow: hidden; border: 1px solid #cfc9c3; border-radius: 5px; background: #fff; transition: border .2s ease, box-shadow .2s ease, transform .2s ease; }
.input-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,91,61,.12); transform: translateY(-1px); }
.input-shell input { width: 100%; min-width: 0; height: 40px; border: 0; outline: 0; padding: 0 13px; color: var(--ink); background: transparent; font-size: 16px; font-weight: 700; -moz-appearance: textfield; }
.input-shell input::-webkit-inner-spin-button { opacity: 0; }
.input-shell span { height: 100%; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--muted); background: #faf8f5; font-size: 13px; }
.field__error { position: absolute; top: 50px; left: calc(42.5% + 12px); color: var(--error); font-size: 10px; }
.field[data-invalid="true"] .input-shell { border-color: var(--error); box-shadow: 0 0 0 3px rgba(167,45,37,.1); }
.calculate-button { width: 100%; min-height: 50px; margin-top: 15px; cursor: pointer; }
.calculate-button svg { display: none; }
.calculate-button::after { content: "→"; font-size: 22px; transition: transform .2s ease; }
.calculate-button:hover::after { transform: translateX(4px); }
.result { min-width: 0; margin: 18px 0 0 30px; padding: 22px 28px; display: grid; grid-template-columns: 1fr auto; align-content: center; color: var(--ink); background: var(--warm); border-radius: 5px; }
.result__icon { display: none; }
.result p { margin: 0; align-self: end; color: var(--muted); font-size: 14px; }
.result__cost { grid-row: span 2; align-self: center; font: 700 clamp(46px, 5vw, 72px)/1 var(--display); letter-spacing: -.045em; overflow-wrap: anywhere; }
.result__divider { grid-column: 1/-1; height: 1px; margin: 18px 0; background: var(--line); }
.result__quantity { font: 700 clamp(26px, 2.4vw, 38px)/1 var(--display); }
.result__note { align-self: end; max-width: 230px; color: var(--muted); font-size: 12px; text-align: right; }
.result__bar { grid-column: 1/-1; height: 11px; margin-top: 20px; overflow: hidden; border-radius: 10px; background: #d9d5d1; }
.result__bar span { display: block; width: 88%; height: 100%; background: var(--accent); transform-origin: left; }
.result[data-updated="true"] .result__bar span { animation: fill-bar .55s cubic-bezier(.2,.8,.2,1); }
@keyframes fill-bar { from { transform: scaleX(.15); } to { transform: scaleX(1); } }

.toast { position: fixed; z-index: 50; top: 92px; right: 24px; min-width: 290px; min-height: 50px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px; color: white; background: #171717; border-radius: 6px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: .22s ease; }
.toast[data-visible="true"] { opacity: 1; transform: none; pointer-events: auto; }
.toast__check { color: var(--accent); }
.toast button { margin-left: auto; border: 0; color: white; background: transparent; font-size: 24px; cursor: pointer; }

.tool-section, .guide-section, .content-section { padding: 28px clamp(24px, 5vw, 76px) 76px; }
.ad-slot { position: relative; min-width: 0; margin: 0 0 36px; padding-top: 18px; color: #85807b; }
.ad-slot--page { margin: 34px clamp(24px, 5vw, 76px) 44px; }
.ad-slot__label { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
.ad-slot__frame { min-height: clamp(88px, 8vw, 118px); padding: 16px; display: grid; place-content: center; gap: 3px; overflow: hidden; border: 1px solid #e4dfda; background: repeating-linear-gradient(135deg,#faf8f5 0,#faf8f5 10px,#f6f3ef 10px,#f6f3ef 20px); text-align: center; }
.ad-slot__frame span { color: #77716b; font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.ad-slot__frame small { color: #aaa39d; font-size: 10px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-title-row h2, .section-heading h2 { margin: 0 0 14px; font: 700 clamp(34px, 3.3vw, 48px)/1.05 var(--display); letter-spacing: -.035em; }
.section-title-row > a { margin-bottom: 18px; color: var(--accent); text-decoration: none; font-weight: 800; }
.section-title-row > a span { display: inline-block; transition: transform .2s ease; }
.section-title-row > a:hover span { transform: translateX(5px); }
.tool-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-card { min-height: 98px; padding: 18px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; position: relative; overflow: hidden; border-right: 1px solid var(--line); text-decoration: none; transition: color .2s ease, background .2s ease; }
.tool-card::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.tool-card:hover::after, .tool-card--active::after { transform: scaleX(1); }
.tool-card:last-child { border-right: 0; }
.tool-card:hover, .tool-card--active { color: var(--accent); background: #fff8f5; }
.tool-card svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-card span { font-size: 14px; font-weight: 800; }
.tool-card b { transition: transform .2s ease; }
.tool-card:hover b { transform: translateX(4px); }

.how-section { margin: 0 clamp(24px, 5vw, 76px) 48px; padding: 50px clamp(28px, 4vw, 56px); display: grid; grid-template-columns: .65fr 1.2fr 1fr; gap: 44px; color: white; background: #141414; }
.how-section .eyebrow { color: #bfb9b3; }
.how-section h2 { margin: 0 0 16px; font: 700 clamp(32px, 3vw, 44px)/1.05 var(--display); }
.how-section p { margin: 0; color: #c9c5c0; line-height: 1.7; }
.how-section ol { margin: 0; padding: 0; list-style: none; }
.how-section li { padding: 13px 0; display: flex; align-items: center; gap: 17px; border-bottom: 1px solid #3a3938; }
.how-section li b { color: var(--accent); font: 700 20px/1 var(--display); }

.content-section { background: #f7f3ef; }
.section-heading > span { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.section-heading p { color: var(--muted); }
.project-list { margin-top: 28px; }
.project-empty, .project-card { min-height: 104px; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--line); background: white; }
.project-empty { flex-direction: column; justify-content: center; align-items: start; color: var(--muted); }
.project-empty strong { color: var(--ink); }
.project-card + .project-card { border-top: 0; }
.project-card h3, .project-card p { margin: 4px 0; }
.project-card span { color: var(--muted); font-size: 12px; }
.project-card__actions { display: flex; gap: 8px; }
.project-card button { min-height: 42px; border: 1px solid var(--line); padding: 0 16px; background: white; cursor: pointer; }
.project-card__load { color: white; border-color: var(--accent) !important; background: var(--accent) !important; }

.guide-section { padding-top: 78px; }
.guide-section .section-title-row { align-items: center; }
.guide-section .eyebrow { margin-bottom: 9px; color: var(--accent); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card { overflow: hidden; border-bottom: 1px solid var(--line); background: white; }
.guide-card a { display: block; text-decoration: none; }
.guide-card img { width: 100%; height: 230px; object-fit: cover; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.guide-card:nth-child(1) img { object-position: center 74%; }
.guide-card:nth-child(2) img { object-position: center 55%; }
.guide-card:hover img { transform: scale(1.03); }
.guide-card div { padding: 18px 2px 22px; }
.guide-card p { margin: 0 0 10px; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.guide-card h3 { min-height: 76px; margin: 0 0 16px; font: 700 clamp(20px, 1.7vw, 26px)/1.12 var(--display); }
.guide-card span { font-size: 13px; font-weight: 800; }

footer { padding: 50px clamp(24px, 5vw, 76px); display: grid; grid-template-columns: 1fr 1fr; gap: 22px 50px; color: white; background: #111; }
.brand--footer { color: white; }
footer p { margin: 0; color: #bcb7b2; }
footer nav { grid-column: 2; grid-row: 1 / span 2; display: flex; justify-content: end; gap: 28px; }
footer nav a { color: white; text-decoration: none; }
footer small { color: #85817e; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
.site-header[data-reveal] { transform: translateY(-12px); }

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 160px 1fr auto; }
  .main-nav a:nth-child(3), .main-nav a:nth-child(4) { display: none; }
  .hero { grid-template-columns: 1fr 1fr; min-height: 840px; padding-bottom: 360px; }
  .hero h1 { font-size: clamp(50px, 6.5vw, 70px); }
  .calculator__body { grid-template-columns: 1fr 1fr; }
  .field { grid-template-columns: 1fr; gap: 5px; padding: 5px 0; }
  .field__error { position: static; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-card:nth-child(3) { border-right: 0; }
  .tool-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .how-section { grid-template-columns: 1fr 1.4fr; }
  .how-section > ol { grid-column: 1/-1; }
}

@media (max-width: 760px) {
  .site-header { min-height: 68px; grid-template-columns: 1fr auto; padding: 9px 18px; }
  .main-nav, .header-action { display: none; }
  .header-controls { gap: 8px; }
  .hero { display: block; min-height: auto; padding-bottom: 0; }
  .hero__copy { padding: 48px 22px 36px; }
  .hero h1 { font-size: clamp(44px, 13vw, 62px); }
  .hero__lede { font-size: 18px; }
  .trust-list { gap: 12px 18px; }
  .hero__photo { height: 310px; clip-path: none; }
  .calculator { position: relative; left: auto; right: auto; bottom: auto; width: calc(100% - 28px); margin: -42px auto 34px; padding: 20px 18px 22px; }
  .calculator__title h2 { font-size: 27px; }
  .calculator__body { grid-template-columns: 1fr; }
  .fields { padding: 12px 0 0; border-right: 0; }
  .field { grid-template-columns: 1fr 1.15fr; gap: 10px; }
  .result { margin: 24px 0 0; padding: 22px; }
  .result__cost { font-size: 50px; }
  .tool-section, .guide-section, .content-section { padding-left: 18px; padding-right: 18px; }
  .ad-slot--page { margin-inline: 18px; }
  .ad-slot__frame { min-height: 100px; }
  .section-title-row { align-items: start; }
  .section-title-row > a { display: none; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-card { min-height: 84px; grid-template-columns: 34px 1fr auto; padding: 12px; border-bottom: 1px solid var(--line); }
  .tool-card:nth-child(odd) { border-right: 1px solid var(--line); }
  .tool-card:nth-child(even) { border-right: 0; }
  .tool-card:nth-last-child(-n+2) { border-bottom: 0; }
  .how-section { margin: 0 18px 38px; padding: 34px 24px; grid-template-columns: 1fr; gap: 18px; }
  .how-section > ol { grid-column: auto; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card h3 { min-height: auto; }
  footer { grid-template-columns: 1fr; }
  footer nav { grid-column: auto; grid-row: auto; justify-content: start; flex-wrap: wrap; }
}

@media (max-width: 430px) {
  .field { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr; gap: 7px; }
  .result__cost { grid-row: auto; }
  .result__note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
