@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/*
 * FCRO brand usage guide (ticket #146)
 * Charcoal      #1C1C1E — authority, clarity: headings, ink, dark hero/panel backgrounds
 * Electric Blue #1F6FEB — trust, competence: primary buttons, links, icons, nav, diagrams, hero accents
 * Crimson       #C1272D — energy, action: CTA band, primary-button hover, urgent highlights (used with intent, not decoration)
 * Gold          #D9A441 — premium value: key stat numbers and numbered markers only, used sparingly
 * Soft White / Graphite Grey / Mist Grey — neutrals: backgrounds, body text, section dividers
 * --blue-ink is a darkened Electric Blue kept at ~5.9:1 contrast for small text on light backgrounds;
 * --blue-tint is a lightened Electric Blue for text/accents on dark backgrounds (hero, panels).
 */
:root {
  /* Brand palette */
  --bg: #F7F7F5;          /* Soft White */
  --bg-alt: #E3E4E5;      /* Mist Grey */
  --bg-alt-2: #EDEEEC;    /* Soft White / Mist Grey blend, for gradients */
  --bg-rgb: 247, 247, 245;
  --surface: #FFFFFF;
  --ink: #1C1C1E;         /* Charcoal */
  --ink-muted: #3A3D40;   /* Graphite Grey */
  --ink-faint: #6B6E71;
  --ink-rgb: 28, 28, 30;
  --blue: #1F6FEB;        /* Electric Blue */
  --blue-ink: #195BC1;    /* accessible shade of Electric Blue for small text on light backgrounds */
  --blue-tint: #8FB7F5;   /* lighter Electric Blue, for text/accents on dark panels */
  --blue-rgb: 31, 111, 235;
  --crimson: #C1272D;     /* Crimson */
  --crimson-rgb: 193, 39, 45;
  --gold: #D9A441;        /* Gold — used sparingly for key numbers */
  --gold-rgb: 217, 164, 65;
  --panel-dark: #1C1C1E;  /* dark accent panels standing in for photography */
  --panel-dark-2: #3A3D40;
  --radius: 14px;
  --max: 1180px;
  --shadow: 0 20px 50px -20px rgba(28, 28, 30, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { color: var(--ink-muted); }
.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: 640px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--bg); }
.btn-primary:hover { background: var(--crimson); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(var(--ink-rgb), 0.25); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-muted); }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(var(--bg-rgb), 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
header.site .logo svg { height: 40px; width: auto; display: block; }
nav.main { display: flex; align-items: center; gap: 34px; }
nav.main a { font-size: 0.95rem; font-weight: 500; color: var(--ink-muted); transition: color 0.15s ease; }
nav.main a:hover, nav.main a.active { color: var(--ink); }
nav.main .btn { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 860px) {
  nav.main { position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 30px 28px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; border-top: 1px solid rgba(var(--ink-rgb), 0.08); }
  nav.main.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 100px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.65; }
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 780px; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.7rem; color: var(--gold); }
.hero-stats div span { font-size: 0.85rem; color: rgba(var(--bg-rgb), 0.75); }

/* Home hero: distinctive Sydney photo (Harbour Bridge + Opera House), with a Charcoal
   scrim so heading/lede text stays reliably legible regardless of the photo underneath. */
.hero .hero-bg {
  background:
    linear-gradient(0deg, rgba(28,28,30,0.86) 0%, rgba(28,28,30,0.42) 55%, rgba(28,28,30,0.58) 100%),
    url('/assets/img/hero-sydney.jpg') center 58% / cover no-repeat;
}
.hero .eyebrow { color: var(--blue-tint); }
.hero h1 { color: var(--bg); }
.hero .lede { color: rgba(var(--bg-rgb), 0.85); }
.hero .btn-ghost { border-color: rgba(var(--bg-rgb), 0.5); color: var(--bg); }
.hero .btn-ghost:hover { border-color: var(--blue-tint); color: var(--blue-tint); }

/* Inner-page heroes: a deliberate dark Charcoal band (not a light wash) so heading/lede
   text is always light-on-dark. Replaces the earlier light hero-bg gradient approach from
   tickets #141/#143/#145, which visually washed out and never resolved the reported
   text-contrast complaints on About/Services/Why/Contact. */
.page-hero { padding: 76px 0 64px; position: relative; overflow: hidden; }
.page-hero .hero-bg {
  background:
    radial-gradient(55% 60% at 85% 10%, rgba(var(--blue-rgb),0.22), transparent 60%),
    linear-gradient(160deg, var(--panel-dark) 0%, var(--panel-dark-2) 100%);
}
.page-hero .eyebrow { color: var(--blue-tint); }
.page-hero h1 { color: var(--bg); }
.page-hero .lede { color: rgba(var(--bg-rgb), 0.82); }
.page-hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.page-hero .btn-primary, .hero .btn-primary { color: #fff; }

/* Sections */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.section-warm { background: var(--bg-alt); color: var(--ink); }
.section-warm p { color: var(--ink-muted); }
.section-warm h2, .section-warm h3 { color: var(--ink); }
.section-charcoal { background: var(--panel-dark); color: var(--bg); }
.section-navy2 { background: var(--bg-alt); }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split.reverse .col-media { order: 2; }
@media (max-width: 860px) { .split.reverse .col-media { order: 0; } }

/* Media panels stand in for photography, so they keep a deliberate dark, moody treatment against the light page */
.media-panel {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-dark-2), var(--panel-dark));
  border: 1px solid rgba(var(--bg-rgb), 0.08);
}
.media-panel.teal { background: linear-gradient(135deg, var(--blue), var(--panel-dark)); }
.media-panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Grid / cards */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(var(--blue-rgb), 0.35); box-shadow: 0 24px 60px -20px rgba(var(--ink-rgb), 0.18); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--blue-rgb), 0.12); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.96rem; }

.section-warm .card { background: var(--surface); border-color: rgba(var(--ink-rgb), 0.08); }
.card-light { background: var(--surface); color: var(--ink); }
.card-light h3 { color: var(--ink); }
.card-light p { color: var(--ink-muted); }
.card-light .num { color: var(--gold); }

.service-card { display: flex; gap: 20px; }
.service-card .num { font-size: 0.85rem; font-weight: 700; color: var(--gold); letter-spacing: 0.08em; }

/* CRO Framework diagram set (Services page) — Electric Blue line art, Gold accent node */
.diagram-card { text-align: center; }
.diagram-card .panel {
  aspect-ratio: 4/3; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-dark-2), var(--panel-dark));
  margin-bottom: 16px;
}
.diagram-card .panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.diagram-card h4 { font-size: 0.95rem; color: var(--ink); }

/* Section head */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Operating model diagram — uses Slate Blue, the palette's diagram accent */
.flow {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; margin-top: 60px; gap: 8px;
}
.flow-line { position: absolute; top: 27px; left: 4%; right: 4%; height: 2px; background: rgba(var(--ink-rgb), 0.12); z-index: 0; }
.flow-line .progress {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 55%, white), var(--blue));
  animation: flowProgress 5s ease-in-out infinite;
}
.flow-dot {
  position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px 3px rgba(var(--blue-rgb),0.5);
  animation: flowDot 5s ease-in-out infinite;
}
@keyframes flowProgress { 0% { width: 0%; } 85% { width: 100%; } 100% { width: 100%; } }
@keyframes flowDot { 0% { left: 0%; } 85% { left: calc(100% - 8px); } 100% { left: calc(100% - 8px); } }

.flow-step { position: relative; z-index: 1; flex: 1; text-align: center; }
.flow-node {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--surface); border: 2px solid rgba(var(--blue-rgb),0.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--blue-ink); font-size: 1.1rem;
  animation: nodePulse 5s ease-in-out infinite;
}
.flow-step:nth-child(2) .flow-node { animation-delay: 0.15s; }
.flow-step:nth-child(3) .flow-node { animation-delay: 0.3s; }
.flow-step:nth-child(4) .flow-node { animation-delay: 0.45s; }
.flow-step:nth-child(5) .flow-node { animation-delay: 0.6s; }
.flow-step:nth-child(6) .flow-node { animation-delay: 0.75s; }
@keyframes nodePulse {
  0%, 12% { border-color: rgba(var(--blue-rgb),0.35); box-shadow: none; }
  16%, 92% { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(var(--blue-rgb),0.12); }
  100% { border-color: rgba(var(--blue-rgb),0.35); box-shadow: none; }
}
.flow-step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.flow-step p { font-size: 0.82rem; max-width: 150px; margin: 0 auto; }
@media (max-width: 860px) {
  .flow { flex-direction: column; gap: 30px; }
  .flow-line { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; }
  .flow-line .progress { width: 100%; height: 0%; animation: flowProgressV 5s ease-in-out infinite; }
  .flow-dot { animation: flowDotV 5s ease-in-out infinite; top: 0; left: 23px; }
  @keyframes flowProgressV { 0% { height: 0%; } 85% { height: 100%; } 100% { height: 100%; } }
  @keyframes flowDotV { 0% { top: 0%; } 85% { top: calc(100% - 8px); } 100% { top: calc(100% - 8px); } }
  .flow-step { display: flex; gap: 20px; text-align: left; }
  .flow-node { margin: 0; flex-shrink: 0; }
  .flow-step p { margin: 0; }
}

/* Timeline (About) */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid rgba(var(--blue-rgb),0.3); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -38px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(var(--blue-rgb),0.18); }
.timeline-item .year { font-size: 0.82rem; font-weight: 700; color: var(--blue-ink); letter-spacing: 0.08em; text-transform: uppercase; }

/* Portrait — real founder photo, with a Charcoal scrim so the caption stays legible */
.portrait {
  border-radius: var(--radius); aspect-ratio: 3/4; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-dark-2) 0%, var(--panel-dark) 70%);
  border: 1px solid rgba(var(--bg-rgb), 0.1);
  display: flex; align-items: flex-end;
}
.portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(var(--ink-rgb), 0.88) 100%);
  pointer-events: none;
}
.portrait .cap { position: relative; z-index: 1; padding: 26px; }
.portrait .cap strong { display: block; color: var(--bg); }
.portrait .cap span { font-size: 0.85rem; color: rgba(var(--bg-rgb), 0.7); }

/* Blog cards */
.blog-card .tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-ink); }
.blog-card .thumb { border-radius: 10px; aspect-ratio: 16/10; margin-bottom: 18px; overflow: hidden; background: linear-gradient(135deg, var(--panel-dark-2), var(--panel-dark)); position: relative; }
.blog-card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* CTA band — Crimson (energy, action) marks this as the site's one deliberate "act now" moment,
   distinct from the Electric Blue used for everyday navigation/buttons elsewhere. */
.cta-band {
  background: linear-gradient(120deg, var(--crimson), color-mix(in srgb, var(--crimson) 78%, black));
  border-radius: 20px; padding: 56px; text-align: center; color: var(--bg);
  margin: 0 28px;
}
.cta-band h2 { color: var(--bg); }
.cta-band p { color: rgba(var(--bg-rgb), 0.85); max-width: 560px; margin: 12px auto 28px; }
.cta-band .btn-primary { background: var(--bg); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--bg-alt-2); color: var(--crimson); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(var(--ink-rgb), 0.15);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 0.95rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); }
.info-block { display: flex; gap: 16px; margin-bottom: 26px; }
.info-block .icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(var(--blue-rgb), 0.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-block .icon svg { width: 20px; height: 20px; }
.info-block h4 { margin-bottom: 4px; }
.info-block p { font-size: 0.92rem; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 10px; }

/* Footer */
footer.site { background: var(--bg-alt); border-top: 1px solid rgba(var(--ink-rgb), 0.08); padding: 56px 0 30px; }
footer.site .foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 700px) { footer.site .foot-grid { grid-template-columns: 1fr; } }
footer.site .logo svg { height: 34px; width: auto; display: block; margin-bottom: 16px; }
footer.site p { font-size: 0.9rem; max-width: 320px; }
footer.site h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); margin-bottom: 16px; }
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer.site ul a { font-size: 0.92rem; color: var(--ink-muted); }
footer.site ul a:hover { color: var(--blue-ink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid rgba(var(--ink-rgb), 0.08); font-size: 0.82rem; color: var(--ink-faint); flex-wrap: wrap; gap: 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Utility */
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill { padding: 8px 16px; border-radius: 999px; background: rgba(var(--blue-rgb), 0.08); border: 1px solid rgba(var(--blue-rgb), 0.25); font-size: 0.85rem; color: var(--blue-ink); }
