/* =====================================================================
   VANTAGE POINT CREATIVE — public site shell
   Real brand colours sampled from the actual logo files (navy + grey),
   not invented. Plain and restrained on purpose — this is a framework
   to build on, not a finished design; every placeholder is labelled.
   ===================================================================== */

:root {
  --navy:   #1c2c58;
  --navy-2: #16234a;
  --grey:   #6f6f6f;
  --bg:     #fbfaf7;
  --surface:#ffffff;
  --border: #e2e0da;
  --text:   #1c1c1c;
  --text-muted: #666666;
  --font-head: 'Lora', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0 0 10px; color: var(--navy); }
p { margin: 0 0 14px; }

/* --- placeholder marker, used everywhere content isn't real yet ----- */
.placeholder {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #a05a00; background: #fff2df;
  border: 1px solid #f0d3a3; padding: 2px 9px; border-radius: 3px; margin-bottom: 8px;
}

/* --- header ---------------------------------------------------------- */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; gap: 20px; }
.logo img { height: 42px; width: auto; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text);
  padding: 8px 14px; border-radius: 3px;
}
.main-nav a[aria-current], .main-nav a:hover { color: var(--navy); background: #f1efe9; }
.nav-toggle {
  display: none; width: 38px; height: 38px; border: 1px solid var(--border); background: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--navy); }
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 6px;
    max-height: 0; overflow: hidden;
  }
  .main-nav.open { max-height: 300px; }
  .main-nav a { padding: 12px 14px; }
}

/* --- hero / page head ------------------------------------------------- */
.hero {
  background: var(--navy); color: #fff; padding: 56px 0; text-align: center;
}
.hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); }
.hero p { color: rgba(255,255,255,.78); max-width: 560px; margin: 0 auto 22px; font-size: 15px; }
.page-head { background: var(--navy); color: #fff; padding: 42px 0; text-align: center; }
.page-head h1 { color: #fff; font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 6px; }
.page-head p { color: rgba(255,255,255,.75); max-width: 520px; margin: 0 auto; font-size: 14px; }

/* --- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  padding: 11px 22px; border-radius: 3px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: #fff; color: var(--navy); }
.btn-primary:hover { background: #f1efe9; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }

/* --- sections ------------------------------------------------------- */
section { padding: 56px 0; }
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.section-sub { color: var(--text-muted); max-width: 560px; margin-bottom: 30px; font-size: 14.5px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* --- photo placeholder tiles ------------------------------------------ */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-tile {
  aspect-ratio: 4/3; background: #eeece5; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  color: var(--text-muted); font-size: 12.5px; text-align: center; padding: 10px;
}
.photo-tile i { font-size: 22px; opacity: .5; }
@media (max-width: 760px) { .photo-grid { grid-template-columns: 1fr 1fr; } }

/* --- service cards (Home) -------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.svc-card {
  border: 1px solid var(--border); background: var(--surface); padding: 26px; text-decoration: none;
  display: flex; flex-direction: column; gap: 8px;
}
.svc-card h3 { margin-bottom: 2px; }
.svc-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 4px; }
.svc-card span { font-size: 13px; font-weight: 700; color: var(--navy); }
@media (max-width: 700px) { .svc-grid { grid-template-columns: 1fr; } }

/* --- moulding catalogue (Frames) -------------------------------------- */
.moulding-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.moulding-card {
  display: block; border: 1px solid var(--border); background: var(--surface); overflow: hidden;
  text-decoration: none; color: inherit; transition: border-color .15s ease;
}
.moulding-card:hover { border-color: var(--navy); }
.moulding-photo { width: 100%; height: 150px; object-fit: cover; }

/* Cover shot (corner) first, examples of real work after it — swipe on
   mobile, scroll on desktop. Plain CSS scroll-snap; nothing to wire up
   in JS, and a card with only one photo just doesn't scroll. */
.moulding-photo-strip {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  height: 150px; -webkit-overflow-scrolling: touch;
}
.moulding-photo-strip::-webkit-scrollbar { height: 4px; }
.moulding-photo-strip img {
  flex: 0 0 100%; width: 100%; height: 150px; object-fit: cover; scroll-snap-align: start;
}
.moulding-body { padding: 16px 18px; }
.moulding-code { font-size: 12px; font-weight: 700; color: var(--grey); letter-spacing: .04em; }
.moulding-desc { font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
.moulding-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 10px; }
.moulding-meta b { color: var(--navy); }
@media (max-width: 700px) { .moulding-grid { grid-template-columns: 1fr; } }

/* --- single moulding product page (frame.html) ------------------------- */
.back-link { display: inline-block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin: 24px 0 18px; }
.back-link:hover { color: var(--navy); }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; padding-bottom: 60px; }
@media (max-width: 760px) { .product-layout { grid-template-columns: 1fr; gap: 20px; } }

.main-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--bg-alt); border: 1px solid var(--border); }
.main-photo-empty {
  width: 100%; aspect-ratio: 4/3; background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px;
}
.thumb-strip { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb-strip img {
  width: 64px; height: 64px; object-fit: cover; border: 2px solid transparent; cursor: pointer; opacity: .75;
}
.thumb-strip img:hover { opacity: 1; }
.thumb-strip img.active { border-color: var(--navy); opacity: 1; }

.product-code { font-size: 13px; font-weight: 700; color: var(--grey); letter-spacing: .04em; margin-bottom: 6px; }
.product-info h1 { font-size: 24px; margin-bottom: 16px; }
.product-meta-grid { display: flex; gap: 28px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.product-meta-grid div span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.product-meta-grid div b { font-size: 18px; color: var(--navy); }

/* --- contact cards ----------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.contact-card { border: 1px solid var(--border); background: var(--surface); padding: 22px; }
.contact-card h3 { font-size: 15px; margin-bottom: 6px; }
.contact-card p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.contact-card a { color: var(--navy); font-weight: 700; text-decoration: none; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* --- footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 20px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner img { height: 26px; opacity: .8; }
.footer-inner p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 12.5px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--navy); }

.build-tag {
  position: fixed; bottom: 12px; right: 12px; z-index: 100;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--navy); padding: 4px 10px; border-radius: 3px; opacity: .85;
}

/* --- frame builder (builder.html) --------------------------------------
   Real customer feature now, reading moulding data live from Supabase
   (the "builder" kind photo specifically — the overhead length shot,
   never the corner/example ones). Ported from the internal test tool;
   same rendering logic (mitred corners, mount + bevel, aspect lock),
   just wearing the site's real chrome and design tokens instead of the
   plain black-and-white tool look. ------------------------------------- */
.builder-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; padding: 30px 0 70px; }
@media (max-width: 900px) { .builder-layout { grid-template-columns: 1fr; } }

.builder-panel { background: var(--surface); border: 1px solid var(--border); padding: 20px; }
.b-field { margin-bottom: 16px; }
.b-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.b-field .hint { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 5px; }

.b-dropzone {
  border: 1px dashed var(--border); padding: 10px; border-radius: 2px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; background: var(--bg);
}
.b-dropzone:hover, .b-dropzone.drag { border-color: var(--navy); }
.b-dropzone input { display: none; }
.b-dropzone-thumb {
  width: 44px; height: 44px; background: #fff; flex-shrink: 0;
  background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); border: 1px solid var(--border);
}
.b-dropzone-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.35; }
.b-dropzone-text b { display: block; color: var(--text); font-size: 13px; margin-bottom: 1px; font-weight: 600; }

.b-swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.b-swatch-chip {
  aspect-ratio: 1; border: 1px solid var(--border); background-size: cover; background-position: center;
  cursor: pointer; position: relative;
}
.b-swatch-chip.is-picked { border: 2px solid var(--navy); }
.b-swatch-chip span {
  position: absolute; left: 2px; bottom: 1px; font-size: 8px; font-weight: 700;
  color: rgba(0,0,0,.6); text-shadow: 0 1px 1px rgba(255,255,255,.5);
}

.b-num-row { display: flex; gap: 8px; }
.b-field input[type="number"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 13.5px; font-family: inherit;
}
.b-field input[type="number"]:focus { outline: 1px solid var(--navy); }

.builder-preview { min-height: 400px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.builder-preview-empty { text-align: center; color: var(--text-muted); font-size: 13.5px; max-width: 300px; line-height: 1.5; }
#builder-canvas { max-width: 100%; height: auto; border: 1px solid var(--border); display: none; }

.b-foot-note { margin-top: 22px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* --- builder: compact moulding picker + popup dialog -------------------
   With 5 mouldings an inline grid is fine; with hundreds it'd dominate
   the page and, worse, force a re-scroll/re-pick feeling every time you
   just want to compare a couple of options. So the panel shows only the
   current pick, and "Change" opens a dialog with the full grid — the
   photo, size and mount all stay exactly as they were underneath it. */
.moulding-current {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--border); background: #fff; padding: 8px 12px; cursor: pointer; font-family: inherit;
}
.moulding-current:hover { border-color: var(--navy); }
.moulding-current-thumb {
  width: 40px; height: 40px; flex-shrink: 0; background: var(--bg-alt); background-size: cover; background-position: center;
  border: 1px solid var(--border);
}
.moulding-current-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.moulding-current-text b { font-size: 13.5px; font-weight: 700; color: var(--text); }
.moulding-current-text span { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moulding-current i { color: var(--text-muted); }

#moulding-dialog {
  border: 1px solid var(--border); padding: 20px; max-width: 640px; width: 90vw;
  max-height: 80vh; box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
}
#moulding-dialog::backdrop { background: rgba(20,20,20,.5); }
.moulding-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.moulding-dialog-head h3 { margin: 0; font-size: 16px; }
.dialog-close {
  border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 2px 6px;
}
.dialog-close:hover { color: var(--text); }
.moulding-search {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); font-size: 13.5px; font-family: inherit;
}
.moulding-search:focus { outline: 1px solid var(--navy); }
