/* Brand Foundry Manufacturing Corporation — public website
   Colours follow the inventory app: maroon + gold on cream. */

:root {
  --maroon-900: #2a0a10;
  --maroon-800: #4a0f18;
  --maroon-600: #7c1d2a;
  --gold-600: #9a7b1e;
  --gold-500: #c0912f;
  --gold-400: #d6ac4e;
  --gold-300: #e8ce8a;
  --cream-100: #fbf6ee;
  --cream-200: #f4ede4;
  --cream-300: #ece3da;
  --line: #d9cec4;
  --ink: #221a1c;
  --ink-soft: #594e51;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(60, 28, 20, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--cream-100); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; text-wrap: balance; }
a { color: var(--maroon-600); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--maroon-800); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
.icon { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 28px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1.2 var(--sans); text-decoration: none; text-align: center;
  transition: background-color .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-maroon { background: var(--maroon-600); color: #fff; }
.btn-maroon:hover { background: var(--maroon-800); }
.btn-gold { background: var(--gold-400); color: var(--maroon-900); }
.btn-gold:hover { background: var(--gold-300); }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 246, 238, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--maroon-800); }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 700 19px var(--serif); letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-600); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; }
.site-nav a:not(.btn):hover { background: var(--cream-300); color: var(--maroon-600); }
.nav-login { margin-left: 8px; min-height: 42px; padding: 8px 18px; }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--maroon-800); border-radius: 2px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  color: #fff; text-align: center;
  background:
    radial-gradient(720px 420px at 22% 18%, rgba(154, 44, 58, 0.65), transparent 70%),
    radial-gradient(620px 380px at 85% 95%, rgba(192, 145, 47, 0.22), transparent 70%),
    linear-gradient(160deg, #3a0c14, #1b0a0e);
}
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -6%; top: 50%; width: min(620px, 70vw); aspect-ratio: 1; transform: translateY(-50%); background: url(assets/mark-white.png) center / contain no-repeat; opacity: .05; pointer-events: none; }
.hero-inner, .hero-strip { position: relative; }
.hero-inner { padding-block: clamp(64px, 11vw, 128px) clamp(48px, 8vw, 88px); display: flex; flex-direction: column; align-items: center; }
.hero-mark { width: 96px; height: 96px; object-fit: contain; }
.hero h1 { font-size: clamp(48px, 9.5vw, 116px); letter-spacing: -.015em; margin-top: 22px; }
.hero h1 em { font-style: italic; color: var(--gold-400); }
.hero-tag { font: italic 400 clamp(22px, 3.4vw, 34px) var(--serif); color: var(--gold-300); margin-top: 10px; }
.hero-line { margin-top: 26px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #e2d6c6; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.hero-strip { display: flex; justify-content: center; flex-wrap: wrap; border-top: 1px solid rgba(232, 206, 138, 0.22); }
.hero-strip li { padding: 20px 34px; font: 700 18px var(--serif); color: var(--gold-300); }
.hero-strip li + li { border-left: 1px solid rgba(232, 206, 138, 0.22); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tint { background: var(--cream-200); border-block: 1px solid var(--line); }
.kicker { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; color: var(--gold-600); }
.title { font-size: clamp(32px, 5vw, 56px); color: var(--maroon-900); margin-top: 10px; }

/* About */
.statement { font-size: clamp(30px, 4.8vw, 52px); color: var(--maroon-900); margin-top: 16px; font-weight: 400; }
.statement em { color: var(--maroon-600); }
#about { background: linear-gradient(rgba(251,246,238,.55), rgba(251,246,238,.55)), url(assets/bg-blueprint.jpg) center / cover no-repeat; }
.quote { margin: 48px auto 0; display: flex; align-items: center; gap: 24px; text-align: left; max-width: 680px; background: #fff; border: 1px solid var(--line); border-radius: 999px 28px 28px 999px; padding: 14px 32px 14px 14px; box-shadow: var(--shadow); }
.quote img { flex: none; width: 116px; height: 116px; border-radius: 50%; object-fit: cover; filter: brightness(1.35); border: 3px solid var(--gold-400); }
.quote blockquote { font: italic 400 clamp(18px, 2.2vw, 22px)/1.55 var(--serif); color: var(--ink-soft); }
.quote blockquote::before { content: "“"; }
.quote blockquote::after { content: "”"; }
.quote figcaption { margin-top: 14px; font-size: 14px; letter-spacing: .08em; color: var(--gold-600); }
.quote figcaption strong { color: var(--maroon-800); text-transform: uppercase; letter-spacing: .14em; }

/* Service tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.tiles li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 18px; color: var(--maroon-600); }
.tiles .icon { flex: none; width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: #f6e7e9; }
.tiles li:nth-child(even) { color: var(--gold-600); }
.tiles li:nth-child(even) .icon { background: #f7efd9; }
.tiles h3 { font-size: 21px; color: var(--maroon-900); }

/* Product chips */
.product-groups { display: grid; gap: 40px; margin-top: 40px; }
.group h3 { font: 600 13px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 18px; }
.photos li { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--maroon-900); box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.photos img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.55) saturate(1.1); transition: transform .5s; }
.photos li:hover img { transform: scale(1.07); }
.photos li::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(42, 10, 16, .88)); }
.photos h4 { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; margin: 0; font: 700 18px/1.2 var(--serif); color: #fff; }
.rounds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 22px; }
.rounds li { text-align: center; }
.rounds img { width: min(170px, 100%); aspect-ratio: 1; margin-inline: auto; border-radius: 50%; object-fit: cover; border: 4px solid var(--gold-400); box-shadow: var(--shadow); transition: transform .3s; }
.rounds li:hover img { transform: translateY(-4px); }
.rounds h4 { margin: 14px 0 0; font: 700 19px/1.2 var(--serif); color: var(--maroon-900); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chips li { padding: 12px 22px; border-radius: 999px; background: var(--maroon-800); color: #fff; font: 700 clamp(16px, 2vw, 20px) var(--serif); }
.chips-gold li { background: var(--gold-400); color: var(--maroon-900); }

/* Dark band */
.section-dark { background: linear-gradient(160deg, #2a0a10, #1b0a0e); color: #fff; text-align: center; }
.section-dark .kicker { color: var(--gold-400); }
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 40px; }
.pillars li { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--gold-400); }
.pillars .icon { width: 72px; height: 72px; padding: 17px; border-radius: 50%; border: 1.5px solid rgba(214, 172, 78, 0.55); }
.pillars h3 { font-size: 21px; color: #fff; }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 56px; }
.steps li { counter-increment: s; position: relative; text-align: center; padding: 0 8px; font: 700 17px/1.3 var(--serif); color: var(--maroon-900); }
.steps li::before {
  content: counter(s); display: grid; place-items: center; margin: 0 auto 14px;
  width: 52px; height: 52px; border-radius: 50%; position: relative; z-index: 1;
  background: var(--gold-400); color: var(--maroon-900); font: 700 21px var(--serif);
  box-shadow: 0 0 0 6px var(--cream-100);
}
.steps li:last-child::before { background: var(--maroon-600); color: #fff; }
.steps li + li::after { content: ""; position: absolute; top: 25px; right: 50%; width: 100%; height: 2px; background: var(--gold-300); }

/* Gallery — sideways strip */
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 36px; padding: 6px max(20px, (100vw - 1120px) / 2) 18px; }
.gallery li { flex: none; width: min(420px, 78vw); scroll-snap-align: center; }
.gallery button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.viewer { border: 0; padding: 0; background: #14080b; border-radius: 12px; width: min(1200px, 96vw); max-height: 94vh; overflow: hidden; }
.viewer::backdrop { background: rgba(20, 8, 11, 0.82); }
.viewer img { width: 100%; max-height: calc(94vh - 64px); object-fit: contain; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; color: #f3e9dc; flex-wrap: wrap; }
.viewer-bar button { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(232,206,138,.4); background: transparent; color: #fff; font: 600 15px var(--sans); cursor: pointer; }
.viewer-bar button:hover { background: rgba(255,255,255,.1); }
#viewer-count { min-width: 64px; text-align: center; font-size: 14px; }

/* Contact */
.contact { background: radial-gradient(640px 360px at 50% 0%, rgba(154, 44, 58, 0.6), transparent 70%), linear-gradient(160deg, #4a0f18, #2a0a10); }
.contact .title { color: #fff; margin-top: 0; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: #1b0a0e; color: #cbbfae; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; font-size: 14px; }
.footer-base a { color: var(--gold-300); }

/* Reveal on scroll (only when script is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .photos { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .steps { grid-template-columns: 1fr; gap: 18px; max-width: 420px; }
  .steps li { display: flex; align-items: center; gap: 16px; text-align: left; padding: 0; font-size: 19px; }
  .steps li::before { margin: 0; flex: none; }
  .steps li + li::after { top: -18px; left: 25px; right: auto; width: 2px; height: 18px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; background: var(--cream-100); border-bottom: 1px solid var(--line); padding: 10px 20px 18px; box-shadow: 0 12px 24px rgba(60, 28, 20, 0.12); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 8px; font-size: 17px; border-bottom: 1px solid var(--cream-300); border-radius: 0; }
  .nav-login { margin: 12px 0 0; }
}

@media (max-width: 600px) {
  .photos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rounds { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .quote { flex-direction: column; text-align: center; border-radius: 28px; padding: 24px; }
  .brand-sub { display: none; }
  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tiles li { padding: 18px 20px; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillars li:last-child { grid-column: 1 / -1; }
  .hero-strip { flex-direction: column; }
  .hero-strip li { padding: 14px 20px; }
  .hero-strip li + li { border-left: 0; border-top: 1px solid rgba(232, 206, 138, 0.22); }
  .hero-actions, .contact-actions { width: 100%; }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .photos img, .rounds img { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
