:root {
  --navy: #132c35;
  --navy-dark: #0a1e25;
  --paper: #f3efe4;
  --white: #fffdf7;
  --acid: #d7ed52;
  --coral: #ff765f;
  --blue: #4878ff;
  --line: rgba(19, 44, 53, 0.2);
  --serif: "Noto Serif TC", serif;
  --sans: "Noto Sans TC", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--navy); background: var(--paper); font-family: var(--sans); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .09; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.quote-header {
  min-height: 6rem; padding: 0 4vw; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  color: var(--white); background: var(--navy-dark); border-bottom: 1px solid rgba(255,255,255,.16);
}
.quote-brand { display: flex; align-items: center; gap: .75rem; }
.quote-brand > span { display: grid; place-items: center; width: 2.3rem; aspect-ratio: 1; color: var(--navy-dark); background: var(--acid); border-radius: 50%; font: 900 1rem var(--serif); }
.quote-brand strong { font-size: .62rem; line-height: 1.35; letter-spacing: .17em; }
.quote-brand strong small { color: rgba(255,255,255,.52); font-size: .48rem; font-weight: 600; letter-spacing: .12em; }
.quote-header > p { margin: 0; font-size: .75rem; letter-spacing: .12em; }
.quote-header > p i { display: inline-block; width: .45rem; aspect-ratio: 1; margin-right: .45rem; background: var(--acid); border-radius: 50%; box-shadow: 0 0 0 .3rem rgba(215,237,82,.15); }
.quote-header > a:last-child { justify-self: end; font-size: .78rem; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: .35rem; }
.quote-header > a span { margin-left: 1rem; }

.quote-hero { min-height: 38rem; padding: 8rem 6vw 4rem; color: var(--white); background: var(--navy-dark); position: relative; overflow: hidden; }
.quote-hero::before { content: ""; position: absolute; width: 34rem; aspect-ratio: 1; right: -7rem; top: -15rem; border: 1px solid rgba(215,237,82,.45); border-radius: 50%; box-shadow: 0 0 0 7rem rgba(215,237,82,.04), 0 0 0 14rem rgba(215,237,82,.025); }
.quote-hero::after { content: "＋"; position: absolute; right: 7vw; top: 44%; color: var(--coral); font-size: 6rem; font-weight: 200; transform: rotate(12deg); }
.overline { margin: 0; font-size: .66rem; font-weight: 700; letter-spacing: .22em; }
.quote-hero h1 { max-width: 1050px; margin: 2rem 0 3.5rem; font: 700 clamp(3rem, 7.5vw, 7.8rem)/1.08 var(--serif); letter-spacing: -.06em; }
.quote-hero h1 em { color: var(--acid); font-style: normal; }
.hero-bottom { max-width: 1050px; display: flex; justify-content: space-between; align-items: end; }
.hero-bottom > p { max-width: 36rem; margin: 0; color: rgba(255,255,255,.68); line-height: 1.9; }
.scroll-stamp { display: grid; place-items: center; width: 7rem; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-size: .61rem; line-height: 1.65; text-align: center; letter-spacing: .13em; transform: rotate(8deg); }

.base-plan { display: grid; grid-template-columns: .75fr 1.15fr .72fr; gap: 5vw; padding: 5rem 6vw; align-items: center; color: var(--navy-dark); background: var(--acid); }
.section-number { font: 700 .75rem var(--sans); opacity: .55; }
.base-plan h2, .feature-heading h2, .estimate-top h2 { margin: .55rem 0 0; font: 700 clamp(1.9rem, 3vw, 3.4rem) var(--serif); letter-spacing: -.04em; }
.base-plan ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.base-plan li span { margin-right: .5rem; }
.base-price { padding-left: 2rem; border-left: 1px solid rgba(19,44,53,.3); }
.base-price small, .base-price span { display: block; }
.base-price strong { display: block; margin: .35rem 0; font: 700 clamp(2rem, 3vw, 3.5rem) var(--serif); white-space: nowrap; }
.base-price span { font-size: .75rem; }

.estimator-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 28rem); align-items: start; max-width: 1600px; margin: 0 auto; }
.feature-builder { min-width: 0; padding: 2rem 4vw 7rem 6vw; }
.feature-section, .maintenance-section { padding-top: 5rem; }
.feature-heading { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2.2rem; }
.feature-heading .overline { color: var(--blue); }
.feature-heading h2 { font-size: clamp(2rem, 3vw, 3rem); }

.quantity-card { display: grid; grid-template-columns: 1fr auto auto; gap: 2rem; align-items: center; min-height: 7.5rem; padding: 1.3rem 1.5rem; margin-bottom: 1rem; background: var(--white); border: 1px solid var(--line); }
.quantity-card > div:first-child { display: flex; align-items: center; gap: 1rem; }
.quantity-card h3 { margin: 0 0 .25rem; font: 700 1.15rem var(--serif); }
.quantity-card p { margin: 0; color: rgba(19,44,53,.58); font-size: .75rem; }
.quantity-card > strong { font-size: 1rem; }
.quantity-card > strong small { font-size: .65rem; }
.feature-icon { flex: none; display: grid; place-items: center; width: 2.7rem; aspect-ratio: 1; color: var(--navy); background: var(--acid); border-radius: 50%; font: 700 .9rem var(--serif); }
.quantity-control { display: flex; align-items: center; border: 1px solid var(--line); background: var(--paper); }
.quantity-control button { width: 2.6rem; height: 2.6rem; color: var(--navy); background: transparent; border: 0; cursor: pointer; }
.quantity-control output { display: grid; place-items: center; min-width: 2.4rem; font-weight: 700; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feature-card { position: relative; min-height: 9rem; padding: 1.45rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; background: rgba(255,253,247,.55); border: 1px solid var(--line); cursor: pointer; transition: transform .25s var(--ease), background .25s, border-color .25s; }
.feature-card:hover { transform: translateY(-3px); background: var(--white); }
.feature-card:has(input:checked) { color: var(--white); background: var(--navy); border-color: var(--navy); }
.feature-card:has(input:checked) .feature-icon { color: var(--navy); background: var(--acid); }
.feature-card input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { position: absolute; right: 1rem; top: 1rem; width: 1.3rem; aspect-ratio: 1; border: 1px solid currentColor; }
.checkmark::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; color: var(--navy); background: var(--acid); font-size: .75rem; }
.feature-card input:checked + .checkmark::after { opacity: 1; }
.feature-card input:focus-visible + .checkmark { outline: 3px solid var(--blue); outline-offset: 2px; }
.card-copy { padding-right: 1.4rem; }
.card-copy strong { display: block; margin: .15rem 0 .45rem; font: 700 1.08rem var(--serif); }
.card-copy small { color: rgba(19,44,53,.58); font-size: .72rem; line-height: 1.6; }
.feature-card:has(input:checked) .card-copy small { color: rgba(255,255,255,.58); }
.price-tag { align-self: end; grid-column: 2 / -1; font-size: .78rem; font-weight: 700; text-align: right; }
.price-tag b { color: var(--coral); font-size: .67rem; }
.feature-highlight::before { content: "THIS FUNCTION"; position: absolute; right: 3rem; top: -.55rem; padding: .25rem .55rem; color: var(--navy-dark); background: var(--coral); font-size: .52rem; font-weight: 700; letter-spacing: .1em; }
.wide-card { grid-column: 1 / -1; }

.care-plans { display: grid; gap: .75rem; }
.care-plans label { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: .9rem 1rem; padding: 1.5rem; background: rgba(255,253,247,.55); border: 1px solid var(--line); cursor: pointer; }
.care-plans label:has(input:checked) { color: var(--white); background: var(--blue); border-color: var(--blue); }
.care-plans input { position: absolute; opacity: 0; }
.radio-dot { width: 1.15rem; aspect-ratio: 1; margin-top: .25rem; border: 1px solid currentColor; border-radius: 50%; }
.care-plans input:checked + .radio-dot { border: .32rem solid var(--acid); }
.care-plans label > strong { font: 700 1.2rem var(--serif); }
.care-plans label > b { font-size: 1.2rem; }
.care-plans label > b small { font-size: .65rem; }
.care-plans p { grid-column: 2 / -1; margin: 0; color: rgba(19,44,53,.56); font-size: .74rem; }
.care-plans label:has(input:checked) p { color: rgba(255,255,255,.7); }

.estimate-panel { position: sticky; top: 1rem; min-height: calc(100vh - 2rem); margin: 2rem 2rem 2rem 0; padding: 2rem; color: var(--white); background: var(--navy-dark); box-shadow: 0 1.5rem 4rem rgba(19,44,53,.18); }
.estimate-top { position: relative; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.16); }
.estimate-top .overline { color: var(--acid); }
.estimate-top h2 { font-size: 2rem; }
.estimate-badge { position: absolute; right: 0; top: 0; padding: .35rem .55rem; color: var(--navy); background: var(--acid); font-size: .57rem; font-weight: 700; }
.main-total { padding: 2.2rem 0 1.7rem; }
.main-total small { display: block; margin-bottom: .5rem; color: rgba(255,255,255,.58); }
.main-total strong { display: block; color: var(--acid); font: 700 clamp(2.5rem, 4vw, 4.2rem)/1 var(--serif); white-space: nowrap; transition: transform .2s var(--ease); }
.main-total strong.bump, .monthly-total strong.bump { transform: scale(1.035); }
.monthly-total, .year-total { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.14); font-size: .78rem; }
.monthly-total strong { color: var(--coral); font-size: 1rem; transition: transform .2s var(--ease); }
.year-total strong { color: rgba(255,255,255,.74); }
.selected-features { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); }
.selected-title { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.selected-title button { padding: 0; color: rgba(255,255,255,.5); background: transparent; border: 0; cursor: pointer; font-size: .67rem; }
.selected-features ul { max-height: 14rem; overflow: auto; margin: 1rem 0 0; padding: 0; list-style: none; scrollbar-color: var(--acid) transparent; }
.selected-features li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; color: rgba(255,255,255,.7); font-size: .72rem; }
.selected-features li strong { color: white; white-space: nowrap; }
.estimate-note { margin: 1.4rem 0; color: rgba(255,255,255,.48); font-size: .65rem; line-height: 1.65; }
.copy-button { width: 100%; min-height: 3.6rem; padding: 0 1.1rem; display: flex; justify-content: space-between; align-items: center; color: var(--navy); background: var(--acid); border: 0; cursor: pointer; font-weight: 700; }
.copy-button:hover b { transform: translate(3px, -3px); }
.copy-button b { transition: transform .25s; }
.copy-status { min-height: 1rem; margin: .65rem 0 0; color: var(--acid); font-size: .68rem; text-align: center; }

.quote-footer { display: flex; justify-content: space-between; align-items: center; padding: 4rem 6vw; color: var(--white); background: var(--coral); }
.quote-footer p { margin: 0; font: 700 clamp(1.7rem, 3vw, 3rem) var(--serif); }
.quote-footer span { font-size: .65rem; font-weight: 700; letter-spacing: .15em; }

@media (max-width: 1080px) {
  .base-plan { grid-template-columns: 1fr 1fr; }
  .base-price { grid-column: 1 / -1; padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid rgba(19,44,53,.3); }
  .estimator-layout { grid-template-columns: 1fr 22rem; }
  .feature-builder { padding-left: 4vw; }
  .estimate-panel { margin-right: 1rem; padding: 1.4rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: auto; }
}

@media (max-width: 780px) {
  .quote-header { grid-template-columns: 1fr auto; padding: 0 5vw; }
  .quote-header > p { display: none; }
  .quote-hero { min-height: 35rem; padding: 6rem 5vw 3.5rem; }
  .quote-hero h1 { font-size: clamp(2.8rem, 12vw, 5rem); }
  .quote-hero::after { right: -1rem; top: 8%; opacity: .6; }
  .hero-bottom { align-items: flex-start; gap: 1.5rem; }
  .scroll-stamp { display: none; }
  .base-plan { grid-template-columns: 1fr; padding: 4rem 5vw; }
  .base-plan ul { grid-template-columns: 1fr; }
  .base-price { grid-column: auto; }
  .estimator-layout { display: flex; flex-direction: column; }
  .feature-builder { order: 1; width: 100%; padding: 1rem 5vw 5rem; }
  .estimate-panel { z-index: 10; order: 0; position: sticky; top: 0; width: 100%; min-height: auto; margin: 0; padding: 1rem 5vw; box-shadow: 0 .8rem 2rem rgba(10,30,37,.25); }
  .estimate-top, .selected-features, .estimate-note, .copy-button, .copy-status, .year-total { display: none; }
  .main-total { display: flex; justify-content: space-between; align-items: center; padding: 0; }
  .main-total small { margin: 0; }
  .main-total strong { font-size: 2rem; }
  .monthly-total { padding: .55rem 0 0; border: 0; }
  .quantity-card { grid-template-columns: 1fr auto; gap: 1rem; }
  .quantity-card > strong { grid-column: 1 / -1; text-align: right; }
  .feature-section, .maintenance-section { padding-top: 4rem; }
  .feature-card { grid-template-columns: auto 1fr; }
  .price-tag { grid-column: 2; }
  .quote-footer { align-items: flex-start; flex-direction: column; gap: 2rem; }
}

@media (max-width: 440px) {
  .quote-brand strong { display: none; }
  .quote-header > a:last-child { font-size: .68rem; }
  .quote-hero h1 { font-size: 11.3vw; }
  .hero-bottom > p { font-size: .88rem; }
  .feature-card { min-height: 10rem; padding: 1.2rem; }
  .feature-icon { width: 2.35rem; }
  .main-total strong { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
