/* ============================================================
   gad.studio · Design selv — stylesheet
   Warm, minimal craft aesthetic matching gad.studio
   ============================================================ */

:root {
  --paper: #f6f1e8;
  --panel: #fffdf8;
  --ink: #221c13;
  --ink-soft: #3d3526;
  --muted: #6f6553;
  --line: #e5dcc9;
  --line-soft: #eee6d6;
  --accent: #a87b2f;
  --accent-bright: #c9a227;
  --accent-ink: #7c5a20;
  --danger: #a03a2a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(60, 45, 20, 0.10), 0 2px 8px rgba(60, 45, 20, 0.06);
  --shadow-soft: 0 4px 16px rgba(60, 45, 20, 0.08);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, white);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand .logo {
  font-family: var(--display);
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em;
}
.brand .sub {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 600;
  border-left: 1px solid var(--line); padding-left: 10px;
}
.header-links { display: flex; gap: 18px; align-items: center; }
.header-links a {
  color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 500;
}
.header-links a:hover { color: var(--ink); }

/* ---------- Views ---------- */

.view { display: none; }
.view.active { display: block; }

/* ---------- Hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; padding: 64px 0 48px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.08; font-weight: 700;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic; color: var(--accent-ink);
}
.hero .lede {
  margin-top: 18px; font-size: 1.08rem; color: var(--muted); max-width: 46ch;
}
.hero .hero-cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 100%; display: block; border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}
.hero-photo .photo-tag {
  position: absolute; left: 18px; bottom: 16px;
  background: rgba(20, 15, 6, 0.72); color: #f3edde;
  font-size: 0.75rem; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---------- Product grid ---------- */

.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: 1.7rem; margin-bottom: 6px;
}
.section-sub { color: var(--muted); margin-bottom: 26px; }

.products {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding-bottom: 24px;
}
.product-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .thumb {
  background: #efe9dc; border-bottom: 1px solid var(--line-soft);
}
.product-card .thumb svg { display: block; width: 100%; height: auto; }
.product-card .card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-family: var(--display); font-size: 1.18rem; font-weight: 600; }
.product-card .card-desc { color: var(--muted); font-size: 0.9rem; margin-top: 6px; flex: 1; }
.product-card .card-foot {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between;
}
.product-card .price-from { font-weight: 600; font-size: 0.95rem; color: var(--accent-ink); }
.product-card .go {
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.product-card:hover .go { color: var(--accent-ink); }

/* ---------- Steps ---------- */

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 40px 0 72px;
}
.step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.step .num {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #fffbe9; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.step h4 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Configurator ---------- */

.config-top {
  display: flex; align-items: center; gap: 16px;
  padding: 26px 0 4px;
}
.back-link {
  text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.back-link:hover { color: var(--ink); }

.config-head { padding: 6px 0 20px; }
.config-head h1 {
  font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700;
}
.config-head .tagline { color: var(--muted); margin-top: 4px; }

.configurator {
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 30px;
  align-items: start; padding-bottom: 80px;
}

.preview-col { position: sticky; top: 88px; }
.preview-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft);
}
.preview-card svg { display: block; width: 100%; height: auto; }
.preview-actions {
  display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.preview-note {
  font-size: 0.78rem; color: var(--muted); padding: 0 16px 14px;
}

/* ---------- Controls ---------- */

.controls { display: flex; flex-direction: column; gap: 14px; }

.field {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.field.hidden { display: none; }
.field-label-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 9px;
}
.field-label { font-weight: 600; font-size: 0.9rem; }
.field-value {
  font-size: 0.82rem; color: var(--accent-ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.field-help { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 0.95rem; color: var(--ink);
  background: #fffef9;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 62px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fffef9;
  border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--ink-soft);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.chip .sw {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--sw, #ccc); border: 1px solid rgba(0,0,0,0.18);
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--ink); color: #f6f0e2; border-color: var(--ink);
}
.chip[aria-pressed="true"] .sw { border-color: rgba(255,255,255,0.5); }

/* range */
input[type="range"] {
  width: 100%; accent-color: var(--accent); cursor: pointer;
}

/* toggle */
.switch {
  width: 46px; height: 26px; border-radius: 999px;
  border: 1px solid var(--line); background: #e8e0cf;
  position: relative; cursor: pointer; transition: background 0.15s ease;
  flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fffdf6; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: left 0.15s ease;
}
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent-ink); }
.switch[aria-checked="true"]::after { left: 22px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle-row .field-label { margin: 0; }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button {
  width: 38px; height: 38px; border: none; background: #fffef9;
  font-size: 1.1rem; cursor: pointer; color: var(--ink);
}
.stepper button:hover { background: var(--line-soft); }
.stepper .qty {
  width: 52px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  height: 38px; display: flex; align-items: center; justify-content: center;
}

/* upload */
.upload-zone {
  border: 1.5px dashed var(--line); border-radius: 10px;
  padding: 18px; text-align: center; cursor: pointer;
  color: var(--muted); font-size: 0.88rem; background: #fffef9;
  transition: border-color 0.15s ease;
  display: block;
}
.upload-zone:hover { border-color: var(--accent); color: var(--ink); }
.upload-zone input { display: none; }
.upload-preview {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
}
.upload-preview img {
  width: 52px; height: 52px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}
.upload-preview .fname { font-size: 0.82rem; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview .rm {
  border: none; background: none; color: var(--danger); cursor: pointer;
  font-size: 0.82rem; font-weight: 600;
}

/* ---------- Price panel ---------- */

.price-panel {
  background: linear-gradient(160deg, #2a2214, #1c1710);
  color: #f3edde; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-soft);
}
.price-row { display: flex; justify-content: space-between; align-items: baseline; }
.price-row .lbl { font-size: 0.85rem; color: #bfb49c; }
.price-row .amount {
  font-family: var(--display); font-size: 1.9rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.price-note { font-size: 0.78rem; color: #bfb49c; margin-top: 4px; min-height: 1em; }
.price-disclaimer { font-size: 0.72rem; color: #8d8368; margin-top: 10px; }
.price-panel .cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px;
  font: inherit; font-size: 0.93rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #241a06;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(168, 123, 47, 0.4); }
.btn-dark { background: var(--ink); color: #f6f0e2; }
.btn-dark:hover { background: #3a3122; }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Modal ---------- */

dialog.order-modal {
  border: none; border-radius: var(--radius);
  padding: 0; max-width: 560px; width: calc(100vw - 40px);
  box-shadow: 0 30px 80px rgba(20, 12, 0, 0.35);
  background: var(--panel); color: var(--ink);
}
dialog.order-modal::backdrop { background: rgba(24, 18, 8, 0.5); backdrop-filter: blur(3px); }
.modal-inner { padding: 28px; }
.modal-inner h2 { font-family: var(--display); font-size: 1.4rem; margin-bottom: 4px; }
.modal-inner .modal-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }
.summary-list {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 16px;
}
.summary-list .row {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 14px; font-size: 0.88rem;
  border-bottom: 1px solid var(--line-soft);
}
.summary-list .row:last-child { border-bottom: none; }
.summary-list .row .k { color: var(--muted); flex: none; }
.summary-list .row .v { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.summary-list .row.total { background: #f4eee0; font-weight: 700; }
.modal-inner textarea { margin-bottom: 16px; }
.order-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.order-fields .ofield:first-child { grid-column: 1 / -1; }
.ofield label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; }
#order-website { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field-error { color: var(--danger); font-size: 0.85rem; margin: -6px 0 12px; font-weight: 500; }
.order-fallback {
  margin-top: 16px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #f8f2e4; font-size: 0.88rem;
}
.order-fallback p { margin-bottom: 10px; color: var(--ink-soft); }
#order-success { text-align: center; padding: 12px 0 4px; }
.success-mark {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #241a06; font-size: 1.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
#order-success h3 { font-family: var(--display); font-size: 1.3rem; margin-bottom: 6px; }
.order-ref { font-weight: 700; color: var(--accent-ink); margin-bottom: 8px; font-size: 1.05rem; }
#order-success .modal-actions { justify-content: center; margin-top: 14px; }
@media (max-width: 520px) { .order-fields { grid-template-columns: 1fr; } }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.modal-hint { font-size: 0.76rem; color: var(--muted); margin-top: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  border: none; background: none; font-size: 1.3rem; color: var(--muted);
  cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--ink); }

/* ---------- Toast ---------- */

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #f6f0e2;
  padding: 11px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */

.site-footer {
  background: #241d12; color: #cfc4ab; margin-top: 40px;
}
.site-footer .wrap {
  padding: 40px 24px; display: flex; justify-content: space-between;
  gap: 30px; flex-wrap: wrap; align-items: flex-start;
}
.site-footer .f-brand { font-family: var(--display); font-size: 1.2rem; color: #f3edde; font-weight: 700; }
.site-footer .f-tag { font-size: 0.85rem; margin-top: 6px; color: #9a8f74; }
.site-footer .f-contact { font-size: 0.88rem; line-height: 1.9; text-align: right; }
.site-footer a { color: #e4d5ae; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .products { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .configurator { grid-template-columns: 1fr; }
  .preview-col { position: static; }
}
@media (max-width: 620px) {
  .products { grid-template-columns: 1fr; }
  .site-footer .f-contact { text-align: left; }
  .hero h1 { font-size: 2rem; }
}
