@font-face {
  font-family: "Raine";
  src: local("Raine&HorneLight"), local("Helvetica Neue");
  font-weight: 300;
}

:root {
  --gold: #ffb200;
  --charcoal: #2b2b2b;
  --ink: #101820;
  --body: #424243;
  --muted: #868686;
  --line: #d8d8d5;
  --paper: #f4f3ef;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--body);
  font-family: Inter, "Helvetica Neue", sans-serif;
}

.site-header {
  height: 84px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--charcoal);
  border-bottom: 4px solid var(--gold);
}
.brand img { width: 164px; height: auto; display: block; }
.office { color: #fff; font-size: 11px; letter-spacing: .26em; }
main { min-height: calc(100vh - 150px); }
.picker, .title-block, form { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.picker { padding: clamp(70px, 12vw, 140px) 0; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { color: var(--ink); font-family: Raine, "Helvetica Neue", sans-serif; font-weight: 300; }
h1 { max-width: 780px; margin: 16px 0 10px; font-size: clamp(48px, 8vw, 92px); line-height: .96; letter-spacing: -.045em; }
.picker > p { font-size: 18px; }
.agent-links { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--charcoal); }
.agent-links a {
  padding: 24px 4px; display: flex; justify-content: space-between; color: var(--ink);
  text-decoration: none; font-size: 24px; border-bottom: 1px solid var(--charcoal);
}
.agent-links a:hover { color: #000; background: var(--gold); padding-inline: 18px; transition: .2s ease; }
.order-page { padding: 66px 0 100px; }
.title-block { margin-bottom: 54px; }
.back-link { display: inline-block; margin-bottom: 52px; color: var(--body); font-size: 13px; text-decoration: none; }
.back-link:hover { color: #000; }
.title-block h1 { font-size: clamp(44px, 7vw, 78px); }
.agent-line { margin: 16px 0 0; font-size: 15px; }
.agent-line strong { color: var(--ink); }
.project-bar {
  width: min(1080px, calc(100% - 40px));
  margin: -20px auto 54px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 22px;
  background: var(--charcoal);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}
.project-bar > div:first-child { display: flex; align-items: center; gap: 15px; min-width: 0; }
.project-label { flex: 0 0 auto; color: #bdbdbd; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.project-bar select {
  width: min(430px, 100%); padding: 10px 34px 10px 12px; border: 1px solid #777; border-radius: 0;
  background: #363636; color: #fff; font: inherit;
}
.project-actions { display: flex; gap: 8px; }
.project-actions button {
  padding: 10px 13px; border: 1px solid #777; border-radius: 0; background: transparent; color: #fff; cursor: pointer;
}
.project-actions button:last-child { border-color: var(--gold); }
.project-actions button:hover { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.project-bar small { grid-column: 1 / -1; color: #aaa; }
.form-section {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(220px, 300px) 1fr;
  gap: 28px;
  padding: 48px 0;
  border-top: 1px solid var(--charcoal);
}
.form-section > * { min-width: 0; }
.step { color: var(--muted); font-size: 12px; padding-top: 7px; }
h2 { margin: 0 0 10px; font-size: 31px; letter-spacing: -.02em; }
.form-section > div > p { margin: 0; line-height: 1.55; color: var(--muted); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.form-section > .field.full { grid-column: 3; }
.field span { color: var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.field em { color: var(--muted); font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; }
input, textarea { font: inherit; }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid #999;
  border-radius: 0; padding: 14px 0; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.field textarea { resize: vertical; }
.brochure-group { grid-column: 2 / -1; padding: 0; margin: 24px 0 8px; border: 0; }
.brochure-group legend { width: 100%; margin-bottom: 18px; color: var(--ink); font: 300 24px Raine, sans-serif; }
.layout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.layout-option { cursor: pointer; }
.layout-option input { position: absolute; opacity: 0; pointer-events: none; }
.layout-card {
  min-height: 210px; padding: 18px; display: grid; grid-template-columns: 1fr; gap: 12px;
  background: #fff; border: 1px solid var(--line);
}
.layout-card:hover { border-color: #888; }
.layout-option input:checked + .layout-card { border: 2px solid var(--charcoal); box-shadow: inset 0 -5px 0 var(--gold); padding: 17px; }
.layout-option input:focus-visible + .layout-card { outline: 3px solid var(--gold); outline-offset: 3px; }
.layout-card strong { color: var(--ink); font-size: 15px; }
.layout-card small { color: var(--muted); }
.mini { height: 125px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #999; padding: 12px; color: #555; background: #fafafa; }
.mini i { display: flex; align-items: center; justify-content: center; height: 66px; border: 1px solid #aaa; font-style: normal; font-size: 9px; text-align: center; }
.spread i { width: 31%; }
.spread .brand-panel { font-size: 7px; border: 0; }
.split { background: linear-gradient(to bottom, transparent 49%, #aaa 50%, transparent 51%); }
.postcard .landscape { width: 45%; }
.postcard .portrait { width: 30%; }
.postcard .copy { width: 42%; border: 0; line-height: 1.4; }
.upload-slots { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.upload-slot {
  min-height: 190px; position: relative; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px dashed #999; overflow: hidden; cursor: pointer;
}
.upload-slot:hover { border-color: var(--charcoal); }
.upload-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-prompt { text-align: center; padding: 20px; }
.upload-prompt b { display: block; color: var(--ink); margin-bottom: 7px; }
.upload-prompt span { color: var(--muted); font-size: 12px; }
.upload-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-slot.has-image .upload-prompt { z-index: 1; align-self: end; width: 100%; padding: 34px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; }
.upload-slot.has-image .upload-prompt b, .upload-slot.has-image .upload-prompt span { color: #fff; }
.upload-note { grid-column: 2 / -1; display: flex; gap: 18px; padding: 18px; border-left: 3px solid var(--gold); background: #e9e8e3; font-size: 13px; line-height: 1.5; }
.upload-note strong { color: var(--ink); flex: 0 0 auto; }
.confirm { grid-column: 2 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer; }
.confirm input { accent-color: var(--gold); width: 18px; height: 18px; flex: 0 0 auto; }
.submit-button {
  grid-column: 2 / -1; height: 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: transparent; border: 1px solid var(--charcoal); border-radius: 0;
  color: var(--ink); font-weight: 700; cursor: pointer;
}
.submit-button:hover { background: var(--charcoal); color: #fff; }
.submit-button b { color: var(--gold); font-size: 20px; }
.submit-help { grid-column: 2 / -1; margin: -14px 0 0; color: var(--muted); font-size: 11px; }
.brochure-stage {
  grid-column: 1 / -1;
  padding: clamp(12px, 3vw, 32px);
  overflow: auto;
  background: #deddd8;
}
.brochure-preview {
  width: 1120px;
  height: 792px;
  margin: auto;
  display: grid;
  overflow: hidden;
  background: #fff;
  color: #2b2b2b;
  box-shadow: 0 12px 38px rgba(0,0,0,.14);
  font-family: Arial, Helvetica, sans-serif;
}
.brochure-preview.postcard-output { width: 1120px; height: 792px; grid-template-columns: 58% 42%; }
.brochure-preview.fold-output { grid-template-columns: repeat(3, 1fr); }
.brochure-panel { position: relative; min-width: 0; overflow: hidden; border-right: 1px dashed #c6c6c6; }
.brochure-panel:last-child { border: 0; }
.brochure-photo-grid { height: 100%; display: grid; grid-template-rows: 1fr 1fr; gap: 5px; padding: 5px; background: #fff; }
.brochure-photo {
  position: relative; min-height: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #e6e6e6; color: #777; font-size: 13px; text-align: center;
}
.brochure-photo.editable-photo { cursor: pointer; outline: 0; }
.brochure-photo.editable-photo:hover { box-shadow: inset 0 0 0 4px var(--gold); }
.box-controls {
  position: absolute; z-index: 5; right: 8px; top: 8px; display: flex; gap: 5px;
}
.box-controls button {
  width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid #fff;
  border-radius: 0; background: rgba(43,43,43,.86); color: #fff; font-size: 17px; cursor: pointer;
}
.box-controls button.add { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.box-controls button:hover { transform: scale(1.08); }
.editable-copy { outline: 1px dashed transparent; }
.editable-copy:hover, .editable-copy:focus { outline-color: var(--gold); outline-offset: 5px; }
.editable-copy:empty::before { content: attr(data-placeholder); color: #999; }
.brochure-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brochure-photo.floor img { object-fit: contain; background: #fff; }
.brochure-copy-panel { height: 100%; padding: 58px 44px 40px; display: flex; flex-direction: column; background: #fff; }
.brochure-logo { width: 180px; height: auto; margin-bottom: auto; }
.brochure-kicker { margin-bottom: 16px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.brochure-address { margin: 0 0 26px; color: #101820; font-size: 35px; line-height: 1.06; font-weight: 400; overflow-wrap: anywhere; }
.brochure-body { color: #666; font-size: 15px; line-height: 1.55; white-space: pre-line; }
.brochure-agent { margin-top: auto; padding-top: 28px; border-top: 7px solid var(--gold); font-size: 14px; font-weight: 700; }
.hero-photo { height: 100%; }
.dynamic-photo-column { display: grid; grid-auto-rows: 1fr; gap: 5px; padding: 5px; background: #fff; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo.agent-image img { object-position: center top; }
.headline-panel { height: 100%; display: flex; flex-direction: column; padding: 66px 54px 46px; background: var(--charcoal); color: #fff; }
.headline-panel .brochure-logo { filter: brightness(0) invert(1); }
.brochure-headline { margin: auto 0 24px; color: #fff; font-size: 70px; line-height: .92; font-weight: 300; letter-spacing: -.045em; }
.brochure-headline em { display: block; color: var(--gold); font-style: normal; }
.headline-panel .brochure-address { color: #fff; font-size: 30px; }
.headline-panel .brochure-body { color: #d5d5d5; }
.headline-panel .brochure-agent { color: #fff; }
.save-loading { opacity: .55; pointer-events: none; }
.email-delivery { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.email-delivery .submit-button { grid-column: auto; }
.error { grid-column: 2 / -1; color: #8a4a00; border-left: 3px solid var(--gold); padding-left: 12px; }
.hidden { display: none; }
footer { min-height: 66px; padding: 0 clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: var(--charcoal); color: #aaa; font-size: 11px; }

@media (max-width: 760px) {
  .site-header { height: 72px; }
  .brand img { width: 132px; }
  .agent-links { grid-template-columns: 1fr; }
  .order-page { padding-top: 38px; }
  .title-block h1 { max-width: 330px; font-size: clamp(38px, 11vw, 48px); line-height: 1.02; }
  .back-link { margin-bottom: 38px; }
  .form-section { grid-template-columns: 36px 1fr; gap: 16px; padding: 38px 0; }
  .project-bar { grid-template-columns: 1fr; margin-top: -14px; }
  .project-bar > div:first-child { align-items: stretch; flex-direction: column; gap: 8px; }
  .project-bar select { width: 100%; }
  .project-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .project-actions button:last-child { grid-column: 1 / -1; }
  .form-section > .full, .brochure-group, .upload-slots, .upload-note, .confirm, .submit-button, .submit-help, .error { grid-column: 1 / -1; }
  .form-section > .field.full { grid-column: 1 / -1; }
  .layout-grid { grid-template-columns: 1fr; }
  .layout-card { min-height: 190px; }
  .upload-slots { grid-template-columns: 1fr; }
  .upload-note { flex-direction: column; gap: 5px; }
  .brochure-stage { margin-inline: -20px; overflow: hidden; }
  .brochure-preview { zoom: .285; }
  .email-delivery { grid-column: 1 / -1; grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}
