@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #0c0c0c;
  --panel: #161616;
  --gold: #b68235;
  --text: #f3f2f2;
  --muted: #9a9a9a;
  --border: #2a2a2a;
  --paper: #f7f5f0;
  --ink: #1c1a17;
  --ink-muted: #706a5c;
  --divider: #e2ddd0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.viewer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.viewer h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 4px;
}

.viewer .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.header-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 6px;
  filter: invert(1);
}

.slideshow {
  width: 100%;
  max-width: 1180px;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.slideshow .slides {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
}

.slideshow .slide.active { display: block; }

.slideshow .slide.img-slide { display: none; align-items: center; justify-content: center; }
.slideshow .slide.img-slide.active { display: flex; }

.slideshow .slide img.slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slideshow .slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--text);
  font-size: 14px;
  text-align: left;
}

/* ---- deck slide types ---- */

.deck { width: 100%; min-height: 100%; padding: clamp(24px, 4vw, 64px) clamp(28px, 5.5vw, 88px); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display: flex; flex-direction: column; text-align: left; }
.deck-dark { background: #000; color: var(--text); }
.deck-light { background: var(--paper); color: var(--ink); }

.deck .kicker { font-size: clamp(11px, 1.1vw, 15px); letter-spacing: .3em; text-transform: uppercase; }
.deck-dark .kicker { color: #c9a668; }
.deck-light .kicker { color: #8a7a54; }

.deck h2.deck-h { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-size: clamp(28px, 4.2vw, 50px); margin: 10px 0 0; line-height: 1.05; }
.deck-hr { height: 1px; background: currentColor; opacity: .25; margin: 16px 0 0; }

.logo { width: clamp(200px, 30vw, 340px); height: auto; display: block; margin: 0; }
.deck-dark .logo { filter: invert(1); }

.deck-cover { justify-content: space-between; }
.deck-cover.has-cover-image { flex-direction: row; align-items: stretch; gap: clamp(20px, 4vw, 48px); }
.cover-left { display: flex; flex-direction: column; justify-content: space-between; flex: 1.2; min-width: 0; }
.cover-logo { width: clamp(220px, 34vw, 420px); margin: 0; }
.deck-cover .cover-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: clamp(30px, 6.5vw, 74px); line-height: 1; margin: 0; letter-spacing: -.01em; }
.deck-cover .cover-meta { font-size: clamp(13px, 1.4vw, 17px); color: var(--muted); line-height: 1.5; }
.deck-cover .cover-rule { width: 100px; height: 1px; background: var(--gold); margin: 6px 0; }
.deck-cover.has-cover-image .cover-title { font-size: clamp(20px, 3vw, 38px); }
.deck-cover.has-cover-image .kicker { font-size: clamp(10px, 1vw, 13px); }
.deck-cover.has-cover-image .cover-meta { font-size: clamp(11px, 1.1vw, 14px); }
.cover-image { flex: 1; position: relative; border-radius: 8px; overflow: hidden; background: #111; min-height: 0; }
.cover-image .slot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-image.is-empty { border: 1px dashed #444; }

.deck-divider { justify-content: flex-end; align-items: flex-end; flex-direction: row; }
.deck-divider .divider-left { display: flex; flex-direction: column; gap: 12px; }
.deck-divider .divider-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: clamp(28px, 5.5vw, 62px); margin: 0; line-height: 1; }
.deck-divider .divider-sub { color: var(--muted); font-size: clamp(12px, 1.3vw, 16px); }
.deck-divider .divider-num { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(70px, 14vw, 180px); font-weight: 300; line-height: .8; color: transparent; -webkit-text-stroke: 1px #6b5327; }

.team-cards { display: flex; gap: clamp(16px, 4vw, 56px); padding-top: clamp(16px, 3vw, 36px); flex: 1; flex-wrap: wrap; }
.team-card { flex: 1; min-width: 200px; border-left: 1px solid var(--divider); padding-left: 20px; }
.team-card .role { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.team-card .name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; display: block; margin-top: 6px; }
.team-card .row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.team-card .row .label { width: 90px; flex: none; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-size: 11px; }

.drawing-frame { flex: 1; margin-top: 16px; padding: 10px; background: #fff; border: 1px solid var(--divider); border-radius: 8px; position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.drawing-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }

.group-slide-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.group-slide-count { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.group-body { display: flex; gap: clamp(16px, 3vw, 48px); padding-top: 20px; flex: 1; flex-wrap: wrap; }
.group-photos { width: min(320px, 100%); flex: none; display: flex; flex-direction: column; gap: 14px; }
.group-photos .door-photo { aspect-ratio: 4/3; background: #fff; border: 1px solid var(--divider); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.group-photos .door-photo img { max-width: 100%; max-height: 100%; object-fit: cover; width: 100%; height: 100%; }
.group-photos .swatch-row { display: flex; gap: 14px; align-items: center; }
.group-photos .swatch { width: 90px; height: 66px; flex: none; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid var(--divider); }
.group-photos .swatch img { width: 100%; height: 100%; object-fit: cover; }
.group-photos .door-meta { display: flex; flex-direction: column; gap: 4px; }
.group-photos .door-meta .style-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 500; }
.group-photos .door-meta .finish-line { font-size: 13px; color: var(--ink-muted); }
.spec-list { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
.spec-list .spec-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.spec-list .spec-row .label { width: 150px; flex: none; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); font-size: 11px; }
.spec-list .spec-row-brand { align-items: center; }
.spec-list .brand-value { display: flex; align-items: center; gap: 10px; }
.spec-list .brand-logo { height: 26px; max-width: 130px; object-fit: contain; }

.total-summary { width: 100%; max-width: 460px; align-self: center; margin: 36px auto 0; display: flex; flex-direction: column; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 13px 2px; border-bottom: 1px solid var(--divider); }
.total-row .total-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.total-row .total-amt { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 600; }
.total-row.grand { border-bottom: none; border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 22px; }
.total-row.grand .total-label { font-size: 14px; letter-spacing: .1em; color: var(--ink); }
.total-row.grand .total-amt { font-size: clamp(28px, 3.4vw, 38px); }
.payment-heading { text-align: center; font-size: clamp(18px,2.2vw,24px); margin: 44px 0 4px; font-family: 'Cormorant Garamond', Georgia, serif; }
.payment-list { width: 100%; max-width: 460px; align-self: center; margin: 16px auto 0; display: flex; flex-direction: column; gap: 4px; }
.payment-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 11px 2px; border-bottom: 1px solid var(--divider); font-size: 14px; }
.payment-row .payment-amt { font-weight: 600; white-space: nowrap; }

.attachments-list { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.attachment-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border: 1px solid var(--divider); border-radius: 8px; background: #fff; }
.attachment-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; }

.schedule-cols { display: flex; gap: clamp(16px, 3vw, 48px); padding-top: 18px; flex: 1; flex-wrap: wrap; }
.schedule-col { flex: 1; min-width: 240px; }
.schedule-col .col-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--gold); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #8a6d1f; }
.schedule-col .item-row { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--divider); font-size: 12px; }
.schedule-col .item-row .qty { width: 26px; flex: none; color: var(--ink-muted); }
.schedule-col .item-row .code { width: 90px; flex: none; }
.schedule-col .item-row .desc { flex: 1; min-width: 0; color: var(--ink-muted); }
.schedule-col .item-row .ext { width: 70px; flex: none; text-align: right; }

.ct-row { display: flex; gap: clamp(6px, 1.5vw, 14px); align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: clamp(10px, 1.6vw, 12px); }
.ct-row.ct-head { border-bottom: 1px solid var(--gold); font-size: clamp(9px, 1.3vw, 11px); letter-spacing: .06em; text-transform: uppercase; color: #8a6d1f; }
.ct-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-row .ct-area { width: clamp(56px, 14vw, 130px); flex: none; }
.ct-row .ct-material { flex: 1; min-width: 0; color: var(--ink-muted); }
.ct-row.ct-head .ct-material { color: inherit; }
.ct-row .ct-edge { width: clamp(46px, 12vw, 120px); flex: none; color: var(--ink-muted); }
.ct-row.ct-head .ct-edge { color: inherit; }
.ct-row .ct-sqft { width: clamp(32px, 6vw, 60px); flex: none; }
.ct-row .ct-price { width: clamp(48px, 9vw, 80px); flex: none; text-align: right; }
.schedule-total { display: flex; align-items: baseline; gap: 12px; padding-bottom: 6px; }
.schedule-total .amt { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; color: var(--gold); }

.notes-cols { columns: 2; column-gap: 40px; padding-top: 18px; flex: 1; }
.notes-cols p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; text-align: justify; break-inside: avoid; }

.scope-cols { display: flex; gap: clamp(20px, 4vw, 56px); padding-top: 20px; flex: 1; }
.scope-col { flex: 1; }
.scope-col .head { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.scope-col.muted-col .head { border-color: var(--ink-muted); color: var(--ink-muted); }
.scope-col .item { padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 13px; line-height: 1.35; }

.timeline-phases { display: flex; flex-direction: column; gap: 24px; padding-top: 20px; flex: 1; justify-content: center; }
.timeline-phase .phase-head { display: flex; align-items: baseline; justify-content: space-between; }
.timeline-phase .phase-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 500; }
.timeline-phase .phase-span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a6d1f; }
.timeline-steps { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.timeline-steps .step { flex: 1; min-width: 110px; border-top: 1px solid var(--gold); padding-top: 8px; }
.timeline-steps .step .sname { font-size: 12px; display: block; }
.timeline-steps .step .sdur { font-size: 11px; color: var(--ink-muted); }

.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding-top: 22px; flex: 1; }
.next-grid .step { border-top: 1px solid var(--gold); padding-top: 12px; }
.next-grid .no { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 12px; letter-spacing: .12em; color: #8a6d1f; }
.next-grid .title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 500; display: block; margin-top: 6px; }
.next-grid .body { font-size: 12px; color: var(--ink-muted); margin-top: 6px; line-height: 1.4; }

.deck-thanks .thanks-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: clamp(26px, 5.5vw, 58px); margin: 0; }
.deck-thanks p { max-width: 640px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.deck-thanks .contact-row { display: flex; gap: 24px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

.timeline-disclaimer { margin-top: 16px; font-size: 12px; color: var(--ink-muted); font-style: italic; }

.sign-block { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--divider); }
.sign-form { max-width: 480px; }
.sign-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.sign-tab { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--divider); background: #fff; font-size: 12px; cursor: pointer; }
.sign-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.sign-name-input { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid var(--divider); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; box-sizing: border-box; }
.sign-canvas-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sign-canvas { width: 100%; max-width: 480px; height: 140px; border: 1px solid var(--divider); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.sign-form .btn { margin-top: 10px; margin-right: 8px; }
.sign-status { font-size: 12px; color: #1e7d33; margin-left: 4px; }
.signed-confirm { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.signed-confirm .sign-preview { max-width: 260px; max-height: 90px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.signed-confirm .signed-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; }

.slideshow .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.slideshow .nav.prev { left: 12px; }
.slideshow .nav.next { right: 12px; }
.slideshow .nav:hover { background: var(--gold); color: #111; }

.fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}
.fullscreen-btn:hover { background: var(--gold); color: #111; }

/* Fullscreen: keep the deck at a fixed 16:10 design size and scale the
   whole thing up via transform, so text/images/layout stay in proportion
   instead of reflowing against the (unchanged) viewport-width units. */
.slideshow:fullscreen { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 0; }
.slideshow:-webkit-full-screen { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 0; }
.slideshow:fullscreen .slides,
.slideshow:-webkit-full-screen .slides {
  aspect-ratio: unset;
  width: 1600px;
  height: 1000px;
  flex: none;
  transform-origin: center center;
}
.slideshow:fullscreen .dots { display: none; }
.slideshow:-webkit-full-screen .dots { display: none; }

.slideshow .counter {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 12px;
  color: var(--text);
  background: rgba(0,0,0,0.6);
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 5;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 5px 14px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 5;
  white-space: nowrap;
  animation: scrollHintBob 1.6s ease-in-out infinite;
}
.slideshow.show-scroll-hint .scroll-hint { opacity: 1; }
@keyframes scrollHintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

.pdf-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  flex-direction: column;
}
.pdf-modal.open { display: flex; }
.pdf-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #111;
  color: #eee;
  flex: none;
}
.pdf-modal-title { font-size: 14px; }
.pdf-modal-close { cursor: pointer; font-size: 26px; line-height: 1; padding: 0 6px; color: #eee; }
.pdf-modal-close:hover { color: var(--gold); }
.pdf-modal-frame { flex: 1; width: 100%; border: none; background: #fff; }

.rotate-hint {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text);
}
.rotate-hint .icon { font-size: 40px; display: inline-block; animation: rotateHintSpin 1.8s ease-in-out infinite; }
.rotate-hint p { margin: 0; font-size: 15px; color: var(--text); }
.rotate-hint .muted { font-size: 13px; }
@keyframes rotateHintSpin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

@media (max-width: 900px) and (orientation: portrait) {
  .slideshow, .dots { display: none !important; }
  .rotate-hint { display: flex; }
}

@media (max-width: 900px) and (orientation: landscape) {
  .viewer { padding: 6px; justify-content: flex-start; }
  .viewer > .logo, .viewer > .sub { display: none; }
  .slideshow { max-width: 100%; border-radius: 4px; }
}

@media print {
  .builder-toolbar, .nav, .fullscreen-btn, .counter, .dots, .scroll-hint, .viewer > .sub, .viewer > .logo { display: none !important; }
  .slideshow { border: none; max-width: none; overflow: visible; }
  .slideshow .slides { aspect-ratio: auto; background: none; }
  .slideshow .slide {
    display: block !important;
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    inset: auto !important;
    page-break-after: always;
    break-after: page;
  }
  .deck { height: auto; }
}

.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 14px;
  flex-wrap: wrap;
}

.dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a3a3a;
  cursor: pointer;
}

.dots .dot.active { background: var(--gold); }

.actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.btn-gold {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.btn-muted {
  color: var(--muted);
  cursor: default;
}

.unavailable {
  max-width: 420px;
}

.unavailable p { color: var(--muted); }
