/* ============================================================
   Components (components.css)
   Shared UI: nav, footer, buttons, cards, forms, modals,
   lightbox, estimator wizard. Used across all pages.
   ============================================================ */

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg { transition: transform var(--dur) var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--dark:hover { background: var(--accent); border-color: var(--accent); }

.btn--outline { background: transparent; color: var(--text); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg { padding: 20px 36px; }
.btn--block { width: 100%; }

/* Text link with animated underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--text); position: relative; padding-bottom: 4px;
}
.link-arrow::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow svg { transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-5);
  padding-block: var(--s-5);
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
}

.nav__logo {
    display: block;
    width: 180px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

@media (max-width: 920px) {
    .nav__logo {
        width: 150px;
        max-height: 42px;
    }
}

@media (max-width: 480px) {
    .nav__logo {
        width: 130px;
    }
}

.nav__menu {
  display: flex; gap: var(--s-7);
  justify-self: center;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.nav__menu a { position: relative; padding-block: 4px; transition: color var(--dur) var(--ease); }
.nav__menu a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--accent);
  transition: width var(--dur) var(--ease-out);
}
.nav__menu a:hover, .nav__menu a[aria-current="page"] { color: var(--accent); }
.nav__menu a:hover::after, .nav__menu a[aria-current="page"]::after { width: 100%; }

.nav__actions { justify-self: end; display: flex; align-items: center; gap: var(--s-4); }
.nav__estimate {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); transition: color var(--dur) var(--ease); padding: 6px 0; position: relative;
}
.nav__estimate::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--accent); transition: width var(--dur) var(--ease); }
.nav__estimate:hover { color: var(--accent); }
.nav__estimate:hover::after { width: 100%; }
@media (max-width: 920px) { .nav__estimate { display: none; } }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  place-items: center;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__toggle span + span { margin-top: 4px; }

/* Mobile drawer */
.nav__drawer {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--paper);
  padding: var(--s-8) var(--gutter);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease-in-out);
  visibility: hidden;
}
.nav__drawer.is-open { transform: translateX(0); visibility: visible; }
.nav__drawer-close { align-self: flex-end; width: 44px; height: 44px; display: grid; place-items: center; font-size: 28px; }
.nav__drawer-menu {
  display: flex; flex-direction: column; gap: var(--s-5);
  margin-top: var(--s-8);
  font-family: var(--font-display); font-size: 2rem;
}
.nav__drawer-menu a { transition: color var(--dur) var(--ease); }
.nav__drawer-menu a:hover { color: var(--accent); }
.nav__drawer-footer { margin-top: auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--paper); padding-block: var(--s-9) var(--s-6); }
.footer__top {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--s-7); padding-bottom: var(--s-8);
  border-bottom: 1px solid rgba(242, 240, 233, 0.12);
}
.footer__brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.footer__logo {
    display: block;
    width: 180px;
    height: auto;
    max-height: 55px;
    object-fit: contain;
}
@media (max-width: 920px) {
    .footer__logo {
        width: 160px;
    }
}

@media (max-width: 480px) {
    .footer__logo {
        width: 145px;
    }
}
.footer__tagline { font-family: var(--font-accent); font-style: italic; color: rgba(242, 240, 233, 0.6); margin-top: var(--s-3); max-width: 320px; font-size: 1.05rem; line-height: 1.5; }
.footer__col-title { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: rgba(242, 240, 233, 0.45); margin-bottom: var(--s-5); }
.footer__list { display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--fs-small); color: rgba(242, 240, 233, 0.78); }
.footer__list a { transition: color var(--dur) var(--ease); }
.footer__list a:hover { color: var(--accent); }
.footer__variants { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid rgba(242, 240, 233, 0.1); }
.footer__variants a {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242, 240, 233, 0.5);
  padding: 6px 14px; border: 1px solid rgba(242, 240, 233, 0.15);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer__variants a:hover { color: var(--paper); border-color: var(--accent); }
.footer__variants a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-3); padding-top: var(--s-5);
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(242, 240, 233, 0.45);
}

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--rule-soft); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card:hover { box-shadow: var(--shadow-md); }

/* Project card (image + meta) */
.project-card { display: block; position: relative; overflow: hidden; }
.project-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--ash); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__tag {
  position: absolute; top: var(--s-4); left: var(--s-4); z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  padding: 6px 12px;
  transform: translateZ(0);
}
.project-card__body { padding-top: var(--s-4); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.project-card__title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 500; line-height: 1.15; }
.project-card__meta { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
.field__label .req { color: var(--accent); }
.field__input, .field__textarea, .field__select {
  width: 100%; padding: 14px 0;
  background: transparent; border: none; border-bottom: 1px solid var(--rule);
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  transition: border-color var(--dur) var(--ease);
}
.field__input::placeholder, .field__textarea::placeholder { color: var(--text-faint); }
.field__input:focus, .field__textarea:focus, .field__select:focus { outline: none; border-bottom-color: var(--accent); }
.field__textarea { resize: vertical; min-height: 96px; }
.field__select { appearance: none; cursor: pointer; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23807c72' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; }

.field-error { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #b1473f; display: none; margin-top: 4px; }
.field.has-error .field__input,
.field.has-error .field__textarea { border-bottom-color: #b1473f; }
.field.has-error .choice__box { border-color: #b1473f; }
.field.has-error .field-error { display: block; }

/* Checkbox + radio (custom) */
.choice { display: inline-flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; font-size: var(--fs-small); color: var(--text-muted); line-height: 1.5; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box { width: 18px; height: 18px; border: 1px solid var(--rule); display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; transition: all var(--dur-fast) var(--ease); }
.choice input:checked + .choice__box { background: var(--accent); border-color: var(--accent); }
.choice__box svg { opacity: 0; transition: opacity var(--dur-fast) var(--ease); stroke: #ffffff; }
.choice input:checked + .choice__box svg { opacity: 1; }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice__text { font-size: var(--fs-small); color: var(--text-muted); }
.choice__text a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; transition: color var(--dur-fast) var(--ease); }
.choice__text a:hover { color: var(--accent); }

/* Toast (form success feedback) */
.toast {
  position: fixed; bottom: var(--s-6); left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--paper);
  padding: var(--s-4) var(--s-6); z-index: var(--z-modal);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: var(--s-3);
  transition: transform var(--dur) var(--ease-out); box-shadow: var(--shadow-lg);
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ============================================================
   MODAL (generic — used for estimator popup, project quick view, etc.)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(38, 37, 31, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur) var(--ease); }
.modal.is-open .modal__overlay { opacity: 1; }
.modal__panel {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -48%); opacity: 0;
  width: min(720px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - 2 * var(--s-7));
  overflow-y: auto; background: var(--paper);
  padding: clamp(28px, 4vw, 56px);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.modal.is-open .modal__panel { transform: translate(-50%, -50%); opacity: 1; }
.modal__close {
  position: absolute; top: var(--s-4); right: var(--s-4);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--rule); transition: all var(--dur) var(--ease);
}
.modal__close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ============================================================
   LIGHTBOX (project galleries)
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: none; background: rgba(38, 37, 31, 0.94); }
.lightbox.is-open { display: grid; place-items: center; }
.lightbox__img { max-width: 90vw; max-height: 86vh; object-fit: contain; box-shadow: var(--shadow-lg); }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 1px solid rgba(242,240,233,0.25);
  color: var(--paper); width: 52px; height: 52px; display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.lightbox__close { top: var(--s-6); right: var(--s-6); }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--accent); border-color: var(--accent); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: var(--s-6); }
.lightbox__nav--next { right: var(--s-6); }
.lightbox__counter {
  position: absolute; bottom: var(--s-6); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.16em;
  color: rgba(242,240,233,0.7);
}

/* ============================================================
   ESTIMATOR WIZARD (flagship — used on estimate.html + popup)
   ============================================================ */
.estimator { --step-gap: var(--s-6); }
.estimator__progress { display: flex; gap: var(--s-2); margin-bottom: var(--s-7); }
.estimator__pip { flex: 1; height: 3px; background: var(--rule); transition: background var(--dur) var(--ease); }
.estimator__pip.is-done { background: var(--accent); }
.estimator__pip.is-active { background: var(--accent); }

.estimator__step { display: none; animation: stepIn var(--dur) var(--ease-out); }
.estimator__step.is-active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.estimator__step-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s-2); }
.estimator__step-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 500; margin-bottom: var(--s-6); }
.estimator__step-title em { font-family: var(--font-accent); font-style: italic; color: var(--accent); }

/* Option cards (project type, scope, finish level) */
.opt-grid { display: grid; gap: var(--s-3); }
.opt-grid--2 { grid-template-columns: 1fr 1fr; }
.opt-grid--3 { grid-template-columns: repeat(3, 1fr); }
.opt {
  position: relative; padding: var(--s-5); border: 1px solid var(--rule);
  cursor: pointer; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  display: flex; flex-direction: column; gap: 6px;
}
.opt:hover { border-color: var(--stone); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.opt__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.opt__desc { font-size: var(--fs-small); color: var(--text-muted); line-height: 1.45; }
.opt__price { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }

/* Room/space multi-select chips */
.chip-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  position: relative; padding: 10px 18px; border: 1px solid var(--rule); cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  transition: all var(--dur) var(--ease);
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--stone); }
.chip.is-selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Range / area input */
.range-row { display: flex; align-items: center; gap: var(--s-5); }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-val { font-family: var(--font-display); font-size: 1.6rem; min-width: 120px; }
.range-val span { font-size: 0.9rem; color: var(--text-muted); }

/* Live estimate readout */
.estimate-readout {
  background: #16181c; color: #f3eee6;
  padding: var(--s-5) var(--s-6); margin-top: var(--s-6);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
}
.estimate-readout__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(243, 238, 230, 0.7); }
.estimate-readout__value { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; color: #f3eee6; }
.estimate-readout__value .accent { color: var(--accent); }

.estimator__nav { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-7); }

/* Estimator success */
.estimator__success { display: none; text-align: center; padding: var(--s-7) 0; }
.estimator__success.is-visible { display: block; animation: stepIn var(--dur) var(--ease-out); }
.estimator__success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--paper); display: grid; place-items: center; margin: 0 auto var(--s-5); }

/* ============================================================
   SHARED RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
@media (max-width: 768px) {
  .nav__menu { display: none; }
  .nav__actions .btn { display: none; }
  .nav__toggle { display: grid; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .opt-grid--2, .opt-grid--3 { grid-template-columns: 1fr; }
}

/* ============================================================
   CUSTOMIZER PANEL (demo feature — live accent + dark mode)
   ============================================================ */
.customizer { position: fixed; right: 0; top: 90px; max-height: calc(100vh - 110px); transform: none; z-index: 200; display: flex; align-items: flex-start; }
.customizer__toggle {
  width: 52px; height: 52px; background: var(--accent); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55); border-right: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 10px 0 0 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
  transition: filter 0.2s var(--ease); animation: none;
}
.customizer__toggle:hover { filter: brightness(1.06); }
.customizer__toggle svg { animation: none; transition: transform 0.5s var(--ease); }
.customizer__toggle:hover svg { transform: rotate(90deg); }
.customizer__body {
  width: 0; max-height: calc(100vh - 110px); overflow-y: auto; overflow-x: hidden; background: var(--paper-warm);
  border-radius: 8px 0 0 8px; box-shadow: var(--shadow-lg);
  transition: width 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease), opacity 0.35s var(--ease);
  padding: 0; border: 1px solid transparent; border-right: none;
  order: -1; opacity: 0; pointer-events: none;
}
.customizer.is-open .customizer__body { width: 230px; padding: var(--s-5); border-color: var(--rule); opacity: 1; pointer-events: auto; }
.customizer__title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-4); white-space: nowrap; }
.customizer__row { margin-bottom: var(--s-5); }
.customizer__swatches { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.cz-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform var(--dur) var(--ease); position: relative; }
.cz-swatch:hover { transform: scale(1.12); }
.cz-swatch.is-active { border-color: var(--text); }
.cz-swatch.is-active::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; }
.customizer__dark {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 10px 14px; background: var(--surface-alt); border: 1px solid var(--rule); border-radius: 6px;
  cursor: pointer; font-family: var(--font-body); font-size: var(--fs-small); color: var(--text);
}
.customizer__dark.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.customizer__note { font-size: 11px; color: var(--text-faint); line-height: 1.4; margin-top: var(--s-3); }
/* non-sticky header option */
body.nav-static .nav { position: relative; }
@media (max-width: 600px) { .customizer { display: none; } }

/* ============================================================
   IMAGE SWAP (demo — preview your own images)
   ============================================================ */
.imgswap-btn { display: none; }
body.imgswap-active .imgswap-holder { outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -2px; }
body.imgswap-active .imgswap-btn {
  display: inline-flex; align-items: center; gap: 6px;
  position: absolute; top: 10px; right: 10px; z-index: 5;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 4px; box-shadow: var(--shadow-md);
  transition: background var(--dur) var(--ease);
}
.imgswap-btn:hover { background: var(--accent); }
.imgswap-btn svg { display: block; }
/* master toggle reuses customizer__dark styling */

/* ============================================================
   THEME TOGGLE BUTTON (Light / Dark mode)
   ============================================================ */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(181, 98, 47, 0.1);
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle__icon {
  width: 19px;
  height: 19px;
  position: absolute;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.theme-toggle__sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
  color: #f59e0b;
}
.theme-toggle__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--ink);
}

/* Logo dark/light swap */
.nav__logo--dark {
  display: none;
}
body.theme-dark .nav__logo--light {
  display: none;
}
body.theme-dark .nav__logo--dark {
  display: block;
}

body.theme-dark .theme-toggle {
  border-color: rgba(243, 238, 230, 0.2);
  color: #f3eee6;
}
body.theme-dark .theme-toggle__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
body.theme-dark .theme-toggle__moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}
body.theme-dark .theme-toggle:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.drawer-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-theme-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  position: relative;
}

.drawer-theme-btn__moon,
.drawer-theme-btn__sun {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.drawer-theme-btn__sun {
  display: none;
  color: #f59e0b;
}

.drawer-theme-btn__moon {
  display: inline-block;
}

body.theme-dark .drawer-theme-btn__moon {
  display: none;
}

body.theme-dark .drawer-theme-btn__sun {
  display: inline-block;
}

/* Cloudflare Turnstile responsive container */
.cf-turnstile {
  width: 100% !important;
}
.cf-turnstile iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* Button Loading State */
.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btnSpin 0.75s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}


