/* Fortuna Civils landing page. Palette drawn from the logo: navy base, chalk text, gold accent only. */

:root {
  --ink: #161B25;
  --surface: #1D2330;
  --surface-2: #232A39;
  --line: #2E3646;
  --line-strong: #3E475A;
  --muted: #9AA2B1;
  --chalk: #EDEAE3;
  --chalk-dim: #CFCBC2;
  --gold: #C9A24A;
  --gold-deep: #A8842F;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); line-height: 1; letter-spacing: .005em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: .04em;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-line { background: transparent; color: var(--chalk); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--chalk-dim); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237,234,227,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22,27,37,.12);
  color: var(--ink);
}
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 96px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 70px; height: auto; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 27px; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.brand span small { display: block; font-size: 13px; letter-spacing: .22em; font-weight: 500; margin-top: 4px; color: #4A5060; }
.nav-links { display: flex; gap: 28px; margin: 0 0 0 8px; padding: 0; list-style: none; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; color: #3A404D; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-phone { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink); }
.nav-toggle { display: none; }
.nav-sheet { color: var(--chalk); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 86vh; display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; z-index: -1; background: var(--surface) center / cover no-repeat; filter: saturate(.6) contrast(1.02); }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(22,27,37,.97) 0%, rgba(22,27,37,.72) 40%, rgba(22,27,37,.35) 100%),
    linear-gradient(to right, rgba(22,27,37,.55), transparent 65%);
}
.hero .wrap { padding: 16vh 0 72px; }
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.7rem);
  font-weight: 600;
  max-width: 21ch;
  line-height: 1;
}
.hero-lede { margin: 26px 0 34px; max-width: 58ch; font-size: clamp(17px, 1.3vw, 19px); color: var(--chalk-dim); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Accreditation row */
.accred-row { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); }
.accred-row ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.accred-row li { padding: 18px 0; font-size: 14px; color: var(--chalk-dim); display: flex; align-items: center; gap: 12px; }
.accred-row li + li { border-left: 1px solid var(--line); padding-left: 24px; }
.accred-row li::before { content: ""; width: 6px; height: 6px; background: var(--gold); flex: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 600; max-width: 18ch; }
.section-head p { max-width: 54ch; color: var(--chalk-dim); font-size: 18px; }
.on-light .section-head p { color: #4A5060; }

/* ---------- Cross-section ---------- */
.xsec-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.xsec-stage { position: sticky; top: 112px; }
.xsec-stage svg { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); }
.stage-label { display: flex; justify-content: space-between; margin-top: 12px; font: 12px/1 var(--mono); letter-spacing: .06em; color: var(--muted); }
.stage-label b { color: var(--gold); font-weight: 400; }

.xsec-steps { display: grid; gap: 10px; }
.step {
  padding: 28px 28px 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 44vh;
  display: flex; flex-direction: column; justify-content: center;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.step.is-active { border-color: var(--gold); }
.step .n { font: 12px/1 var(--mono); color: var(--muted); letter-spacing: .06em; }
.step.is-active .n { color: var(--gold); }
.step h3 { margin: 14px 0 12px; font-size: clamp(1.6rem, 2.3vw, 2.1rem); font-weight: 600; }
.step p { color: var(--chalk-dim); font-size: 16px; max-width: 46ch; }
.step .ask { margin-top: 18px; align-self: flex-start; background: none; border: 0; padding: 0; color: var(--gold); font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: .04em; cursor: pointer; border-bottom: 1px solid transparent; }
.step .ask:hover { border-bottom-color: var(--gold); }

.layer { opacity: 0; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.layer.on { opacity: 1; transform: none; }
.layer.current .hl { stroke: var(--gold); }
.layer .ann { opacity: 0; transition: opacity .4s var(--ease); }
.layer.current .ann, #l0.on .ann { opacity: 1; }
.xsec svg .ann { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: .05em; fill: var(--chalk-dim); }
.xsec svg .ann.dim { fill: var(--muted); }
@media (prefers-reduced-motion: reduce) { .layer { transition: none; transform: none; } }

/* ---------- Sectors ---------- */
.sectors { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sector { background: var(--ink); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; }
.sector.lead { background: var(--surface); }
.sector h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 600; }
.sector .lede { margin: 16px 0 24px; color: var(--chalk-dim); font-size: 16px; max-width: 50ch; }
.sector ul { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 9px; }
.sector li { padding-left: 18px; position: relative; font-size: 15px; color: var(--chalk); }
.sector li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--gold); }

/* ---------- Projects (light band) ---------- */
.on-light { background: var(--chalk); color: var(--ink); }
.projects { display: grid; gap: clamp(40px, 5vw, 72px); }
.project { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 64px); align-items: start; padding-top: 36px; border-top: 1px solid rgba(22,27,37,.16); }
.project:nth-child(even) .project-text { order: 2; }
.project-text .where { font: 12px/1.6 var(--mono); letter-spacing: .06em; color: #6B7282; margin-bottom: 14px; }
.project-text h3 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); font-weight: 600; max-width: 20ch; }
.project-text p { margin-top: 16px; max-width: 56ch; color: #3A404D; }
.project-text ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.project-text li { padding-left: 18px; position: relative; font-size: 15px; color: #2A3040; }
.project-text li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--gold); }
.project-figs { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 210px 210px; gap: 8px; }
.project-figs figure { margin: 0; overflow: hidden; background: #D9D5CC; }
.project-figs figure:first-child { grid-row: span 2; }
.project-figs.five { grid-template-columns: 1.6fr 1fr 1fr; }
.project-figs img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.03); }

/* ---------- Approach ---------- */
.approach { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.approach h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 600; }
.approach .intro { margin-top: 20px; color: var(--chalk-dim); max-width: 48ch; font-size: 18px; }
.approach ol { margin: 0; padding: 0; list-style: none; counter-reset: n; border-top: 1px solid var(--line); }
.approach li { counter-increment: n; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--chalk-dim); }
.approach li::before { content: counter(n, decimal-leading-zero); font: 13px/1.7 var(--mono); color: var(--gold); }
.approach li strong { display: block; color: var(--chalk); font-weight: 500; margin-bottom: 4px; }

/* ---------- Accreditations and coverage ---------- */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.small-h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 600; }
.two-up p { margin-top: 16px; color: var(--chalk-dim); max-width: 48ch; }
.accs { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--line); }
.accs li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.accs li strong { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: .01em; }
.accs li span { font-size: 14px; color: var(--muted); text-align: right; }
.map { margin-top: 26px; border: 1px solid var(--line); background: var(--surface); }
.map svg { width: 100%; height: auto; display: block; }
.map .lbl { font-family: "Inter", sans-serif; font-size: 11.5px; fill: var(--chalk-dim); }
.map .lbl.hq { fill: var(--gold); font-weight: 500; }
.map .lbl.dim { fill: var(--muted); }

/* ---------- Enquiry ---------- */
.enquiry-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.enq { border: 1px solid var(--line-strong); background: var(--surface); }
.enq-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.enq-progress { display: flex; gap: 6px; }
.enq-progress i { width: 34px; height: 3px; background: var(--line-strong); }
.enq-progress i.done { background: var(--gold); }
.enq-body { padding: 28px 22px 24px; min-height: 330px; }
.enq-step { display: none; }
.enq-step.is-on { display: block; }
.enq-step h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--line-strong); background: transparent;
  font-family: var(--body); font-size: 15px; line-height: 1.3; text-align: left; cursor: pointer; color: var(--chalk-dim);
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: var(--chalk-dim); color: var(--chalk); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.enq input:not([type="checkbox"]), .enq textarea {
  width: 100%; padding: 12px 14px; background: var(--ink); border: 1px solid var(--line-strong); color: var(--chalk);
  font: 16px/1.5 var(--body);
}
.enq input:focus, .enq textarea:focus { outline: none; border-color: var(--gold); }
.enq textarea { min-height: 150px; resize: vertical; }
.enq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 12px; }
.enq-fields label { display: block; font-size: 13px; color: var(--muted); }
.enq-fields label:first-child { grid-column: 1 / -1; } .enq-fields label small { font-size: inherit; } .enq-fields input { margin-top: 5px; }
.enq .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.enq-status { margin-top: 12px; font-size: 14px; color: var(--chalk-dim); min-height: 1.4em; } .enq-status.is-error { color: #E8A0A0; }
.enq-sent { padding: 12px 0; }
.enq-sent h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; margin-bottom: 14px; }
.enq-sent p { color: var(--chalk-dim); max-width: 46ch; }
.btn[disabled] { opacity: .6; cursor: default; }
@media (max-width: 600px) { .enq-fields { grid-template-columns: 1fr; } }
.enq .hint { margin-top: 12px; font-size: 14px; color: var(--muted); }
.enq-foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.enq-side h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 600; }
.enq-side p { margin-top: 18px; color: var(--chalk-dim); max-width: 44ch; }
.contact-lines { margin-top: 28px; display: grid; gap: 14px; }
.contact-lines small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.contact-lines a { text-decoration: none; font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: .01em; }
.contact-lines a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.footer { background: var(--chalk); color: var(--ink); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; align-items: start; }
.footer-logo { width: 240px; height: auto; }
.footer h4 { font-family: var(--body); font-size: 13px; font-weight: 500; color: #6B7282; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; color: #2A3040; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold-deep); }
.footer-about { margin-top: 22px; color: #3A404D; font-size: 15px; max-width: 40ch; }
.footer-bar { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(22,27,37,.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #6B7282; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .xsec-grid { grid-template-columns: 1fr; }
  .xsec-stage { position: sticky; top: 72px; z-index: 5; background: var(--ink); padding-bottom: 8px; }
  .step { min-height: 0; }
  .sectors { grid-template-columns: 1fr; }
  .approach, .two-up, .enquiry-grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-text { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .accred-row ul { grid-template-columns: 1fr 1fr; }
  .accred-row li:nth-child(3) { border-left: 0; padding-left: 0; }
  .accred-row li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .nav-links, .nav-phone { display: none; }
  .nav .wrap { gap: 12px; height: 64px; }
  .nav-right { gap: 10px; }
  .nav-right .btn { padding: 0 14px; font-size: 16px; min-height: 42px; }
  .brand span { white-space: nowrap; font-size: 19px; }
  .brand span small { font-size: 11px; }
  .brand img { width: 48px; }
  .nav .wrap { height: 72px; }
  .nav-toggle { border-color: rgba(22,27,37,.3); color: var(--ink); }
  .footer-logo { width: 180px; }
  .project-figs.five { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 130px 130px; }
  .project-figs.five figure:nth-child(n+4) { display: grid; }
  .nav-toggle { display: inline-flex; min-height: 42px; padding: 0 14px; background: none; border: 1px solid rgba(22,27,37,.3); color: var(--ink); font-family: var(--display); font-size: 17px; }
  .nav-sheet { display: none; border-top: 1px solid var(--line); background: var(--ink); }
  .nav-sheet.open { display: block; }
  .nav-sheet ul { list-style: none; margin: 0; padding: 8px 0; }
  .nav-sheet a { display: block; padding: 14px var(--gutter); text-decoration: none; font-family: var(--display); font-size: 22px; border-bottom: 1px solid var(--line); }
  .nav-sheet a.phone { color: var(--gold); }
  .hero { min-height: 80vh; }
  .hero .wrap { padding-top: 24vh; }
  .hero-cta .btn, .enq-foot .btn { width: 100%; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .stage-label span:first-child { display: none; }
  .project-figs { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 130px; }
  .project-figs figure:first-child { grid-row: auto; grid-column: span 2; }
  .enq-foot { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .accred-row ul { grid-template-columns: 1fr; }
  .accred-row li { border-left: 0 !important; padding-left: 0 !important; padding: 12px 0; }
  .accred-row li + li { border-top: 1px solid var(--line); }
}
@media (min-width: 801px) { .nav-sheet { display: none !important; } }
