/* Iron Crest Enterprises — site styles
   Palette and type carried over from the existing design; layout and components finished. */

:root {
  --paper: #ffffff;
  --bone: #f6f4ee;
  --ink: #0a090a;
  --charcoal: #222222;
  --charcoal-2: #2c2c2c;
  --gold: #f8bd49;
  --gold-text: #9a6c0c;      /* gold as a text colour on light backgrounds (AA contrast) */
  --muted: #5d5a54;
  --muted-on-dark: rgba(244, 242, 236, 0.72);
  --line: #e4e1da;
  --line-on-dark: #3a3a3a;
  --on-dark: #f4f2ec;           /* text on dark panels */
  --gold-hover: #f0b23a;
  --header-bg: rgba(255, 255, 255, 0.96);
  --photo-overlay: rgba(20, 20, 20, 0.84);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.12; letter-spacing: -0.005em; }
h1 { font-size: clamp(38px, 4.6vw, 58px); }
h2 { font-size: clamp(30px, 3.4vw, 42px); }
h3 { font-size: 22px; }
p  { margin: 0; }
a  { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -60px; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 4px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: currentColor; }
.brand-word { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: 0.08em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--charcoal); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }
.nav .nav-cta { background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 6px; border: 0; font-weight: 600; }
.nav .nav-cta:hover { background: var(--gold-hover); }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 24px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; font-family: var(--sans); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-hover); }
.link-quiet { color: var(--charcoal); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.link-quiet:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy h1 { max-width: 14ch; }
.hero-sub { margin-top: 22px; max-width: 52ch; color: var(--muted); font-size: 18px; }
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-media { margin: 0; }

.img-placeholder {
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 16 / 11; border-radius: 10px;
  background: repeating-linear-gradient(135deg, #2a2a2a 0 14px, #262626 14px 28px);
  color: var(--muted-on-dark); font-size: 15px; line-height: 1.4; padding: 24px;
}
.img-placeholder small { display: block; margin-top: 6px; font-size: 12px; opacity: .75; }
.img-placeholder.portrait { aspect-ratio: 1; width: 132px; border-radius: 50%; padding: 12px; font-size: 13px; }

/* ---------- Stats ---------- */
.stats { background: var(--gold); color: var(--ink); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 30px 0; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 72px; }
.stat-num { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 14px; font-weight: 500; margin-top: 8px; max-width: 22ch; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bone); }
.section-dark { background: var(--charcoal); color: var(--on-dark); }
.section-dark .section-head p { color: var(--muted-on-dark); }
.section-head { max-width: 60ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 36px; }
.service .ico { width: 30px; height: 30px; color: var(--gold-text); margin-bottom: 14px; }
.service h3 { margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 16px; }

/* Flow — the one element allowed to be memorable */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; margin-top: 8px; }
.flow::before { content: ""; position: absolute; left: 10%; right: 10%; top: 28px; height: 2px; background: var(--gold); }
.flow-step { position: relative; text-align: center; padding: 0 12px; }
.flow-node { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--gold); margin: 0 auto 16px; display: grid; place-items: center; position: relative; border: 4px solid var(--bone); }
.flow-node svg { width: 24px; height: 24px; }
.flow-step h3 { font-size: 20px; }
.flow-doc { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

.commitment { margin: clamp(40px, 5vw, 64px) auto 0; max-width: 760px; background: var(--paper); border-left: 4px solid var(--gold); padding: 24px 28px; border-radius: 0 8px 8px 0; }
.commitment h3 { font-size: 18px; margin-bottom: 8px; }
.commitment p { color: var(--charcoal); }

/* Markets */
.markets-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.markets-grid .section-head { margin-bottom: 0; }
.market-lists { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; padding-top: 10px; }
.market-group h3 { font-size: 18px; color: var(--gold); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-on-dark); }
.market-group li { padding: 6px 0; font-size: 17px; }

/* Leadership */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; max-width: 900px; }
.person h3 { margin-top: 18px; }
.person-title { color: var(--gold-text); font-weight: 600; font-size: 14px; letter-spacing: .02em; margin: 4px 0 12px; }
.person p { color: var(--muted); font-size: 16px; }
.person .link-quiet { display: inline-block; margin-top: 12px; font-size: 15px; }

/* Standards */
.standards-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.standards-grid .section-head { margin-bottom: 0; }
.standards-list li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
.standards-list li:last-child { border-bottom: 1px solid var(--line); }
.standards-list strong { font-weight: 600; }
.standards-list span { color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-details { font-style: normal; display: grid; gap: 10px; font-size: 17px; justify-items: start; }
.contact-details a { text-decoration: none; color: var(--on-dark); }
.contact-details a:hover { color: var(--gold); }
.contact-details span { color: var(--muted-on-dark); }

.contact-form { background: var(--charcoal-2); padding: 28px; border-radius: 10px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--muted-on-dark); }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--on-dark); background: var(--charcoal); border: 1px solid var(--line-on-dark); border-radius: 6px; padding: 12px 14px; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.contact-form .btn { justify-self: start; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 48px 0 0; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-desc { margin-top: 14px; color: var(--muted); max-width: 36ch; }
.footer-nav, .footer-contact { display: grid; gap: 8px; align-content: start; justify-items: start; }
.footer-nav a, .footer-contact a { color: var(--charcoal); text-decoration: none; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--gold-text); }
.footer-base { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-base a { color: var(--muted); text-decoration: none; }

/* ---------- Placeholders (remove attribute once real content is in) ---------- */
[data-placeholder] { outline: 1px dashed rgba(184, 120, 20, .55); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(5, 1fr); }
  .flow-doc { font-size: 12.5px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .menu-btn { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--paper); z-index: 60;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 24px var(--gutter); gap: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
    overflow-y: auto;
    font-size: 22px; font-family: var(--serif); font-weight: 700;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav a:hover { border-bottom-color: var(--line); }
  .nav .nav-cta { margin-top: 18px; font-family: var(--sans); font-size: 17px; width: auto; padding: 14px 22px; }
  @media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; padding: 28px 0; }
  .stat-num { font-size: 30px; }
  .stat-label { font-size: 13px; }
  .services { grid-template-columns: 1fr; gap: 32px; }

  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow::before { left: 27px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow-step { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; text-align: left; padding: 0 0 28px; }
  .flow-node { grid-row: 1 / span 2; margin: 0; }
  .flow-doc { margin-top: 4px; }

  .markets-grid, .standards-grid, .contact-grid { grid-template-columns: 1fr; }
  .market-lists { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-base { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ---------- Photos (added in staging pass) ---------- */
.hero-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 10px; background: #2a2a2a; }
#markets { background: linear-gradient(var(--photo-overlay), var(--photo-overlay)), url("/img/markets.webp") center / cover no-repeat, var(--charcoal); }

/* Tagline: Integritas */
.tagline { margin-bottom: 18px; color: var(--gold-text); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.tagline .tagline-en { font-weight: 500; }
.tagline-footer { margin: 14px 0 0; font-size: 12px; }

/* How We Work closing line; About section */
.commitment-line { max-width: 62ch; margin: clamp(40px, 5vw, 64px) auto 0; text-align: center; color: var(--muted); font-size: 17px; }
.commitment-line strong { color: var(--ink); }
.about-label { margin-top: 22px !important; font-size: 13px !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text) !important; }
.about-mission { margin-top: 8px !important; }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
.kicker { margin: 0 0 28px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); }

/* Principals (inside About) */
.principals { margin-top: clamp(48px, 6vw, 80px); }
.principals .kicker { margin-bottom: 10px; }
.principals-intro { max-width: 60ch; color: var(--muted); font-size: 18px; margin: 0 0 32px; }
.principals .people { max-width: none; gap: clamp(28px, 4vw, 48px); }
.person { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; align-items: start; }
.person h3 { margin-top: 0; }
.portrait { width: 132px; aspect-ratio: 1; max-width: 100%; border-radius: 10px; background: var(--bone); border: 1px solid var(--line); display: grid; place-content: center; text-align: center; gap: 2px; }
.portrait span { font-family: var(--serif); font-size: 36px; font-weight: 700; color: var(--gold-text); line-height: 1; }
.portrait small { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 860px) { .principals .people { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .person { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; } .portrait { width: 96px; } .portrait span { font-size: 28px; } }
/* Long figure (product list) sits on two lines at a smaller size so the strip stays even */
.stat-num-long { font-size: 24px; line-height: 1.15; max-width: 17ch; }
@media (max-width: 760px) { .stat-num-long { font-size: 21px; } }
.person h3 { word-spacing: 0.18em; }
