/* ============================================================
   N-AMAN CONSTRUCTIONS LTD — Design System
   Tokens: Navy #051F45 · Gold #FDBA2C · Paper #FFFFFF
           Mist #F1F4F8 · Slate #47536A · Line #DCE2EA
   Type: Space Grotesk (headings) · IBM Plex Sans (body)
   ============================================================ */

:root {
  --navy: #051F45;
  --navy-2: #0A2E63;
  --gold: #FDBA2C;
  --gold-dark: #8C6209; /* darkened from #E3A310 (2.21:1) to 5.43:1 against white — passes WCAG AA for text at any size */
  --paper: #FFFFFF;
  --mist: #F1F4F8;
  --slate: #47536A;
  --slate-light: #7C879B;
  --line: #DCE2EA;
  --danger: #B3261E;
  --success: #1E6B4C;

  --font-head: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius: 4px;
  --radius-lg: 8px;
  --max-width: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* The browser's default [hidden]{display:none} loses to any later author
   rule of equal specificity — including .btn's display:inline-flex. This
   rule restores hidden's effect for every element on the site, regardless
   of what other classes it carries, so a hidden button is never visible. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 var(--space-2); max-width: 62ch; }
a { color: var(--navy-2); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--paper); padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--paper); z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--space-2); padding-bottom: var(--space-2);
}
.brand { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand span { font-family: var(--font-head); font-weight: 600; color: var(--navy); font-size: 1rem; }

.main-nav { display: flex; align-items: center; gap: var(--space-4); }
.main-nav ul { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none; color: var(--navy); font-weight: 500; font-size: 0.96rem;
  padding: 6px 2px; border-bottom: 3px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--gold); }
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--gold-dark); /* 5.43:1 against white — passes WCAG 1.4.11 non-text contrast */
  font-weight: 700; /* redundant, non-colour cue so the current page is never identified by colour alone */
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--navy);
  position: relative; transition: transform 0.2s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.header-cta { display: flex; gap: var(--space-2); align-items: center; }

@media (max-width: 880px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--paper); flex-direction: column;
    align-items: stretch; padding: var(--space-3); transform: translateX(100%);
    transition: transform 0.25s var(--ease); overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 16px 4px; }
  .header-cta { flex-direction: column; align-items: stretch; margin-top: var(--space-3); }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.96rem;
  padding: 13px 24px; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  min-height: 48px;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Sections ---------- */
.section { padding: var(--space-7) 0; }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy); color: var(--paper); }
.section-navy h2, .section-navy h3 { color: var(--paper); }
.section-head { max-width: 640px; margin-bottom: var(--space-5); }
.section-head p { color: var(--slate); }
.section-navy .section-head p { color: #C7D2E5; }

.kicker {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  color: var(--navy-2); font-size: 0.95rem; margin-bottom: var(--space-1);
}

/* ---------- Hero ---------- */
.hero { padding: var(--space-6) 0 var(--space-7); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); align-items: center; }
.hero-copy p.lede { font-size: 1.15rem; color: var(--slate); max-width: 50ch; }
.hero-actions { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }
.hero-figure svg { width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 320px; margin: 0 auto var(--space-3); }
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4);
  background: var(--paper); height: 100%;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); margin-bottom: 0; }

/* A single recurring brand mark — a reduced roofline + the gold ground line
   from the logo — used consistently instead of mismatched generic icons.
   Appears once per card, never repeated as wallpaper. */
.roof-mark {
  width: 0; height: 0; margin-bottom: 14px; position: relative;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 11px solid var(--navy);
}
.roof-mark::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}

/* Service cards: the "what we can do" set — carries the roof mark */
.card-service { border-left: 3px solid var(--gold); }

/* Evidence cards ("Why N-Aman"): a different, non-iconographic treatment —
   a structural top rule rather than a mark, signalling "this is a claim we
   stand behind" rather than "this is a capability" */
.card-evidence { border: none; border-top: 3px solid var(--navy); border-radius: 0; padding-top: var(--space-3); background: transparent; }
.card-evidence h3 { font-size: 1.05rem; }
.card-grid { display: grid; gap: var(--space-3); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 780px) {
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
}

.tile-link { text-decoration: none; color: inherit; display: block; }
.tile-link .card { transition: border-color 0.15s var(--ease); }
.tile-link:hover .card, .tile-link:focus-visible .card { border-color: var(--gold); }

/* ---------- Empty states ---------- */
.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  padding: var(--space-5); text-align: left; background: var(--mist);
}
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--slate); }

/* ---------- Journey / timeline ---------- */
.journey-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.journey-item {
  display: grid; grid-template-columns: 64px 1fr; gap: var(--space-3);
  padding: var(--space-3) 0; border-top: 1px solid var(--line);
}
.journey-item:last-child { border-bottom: 1px solid var(--line); }
.journey-num {
  counter-increment: step; font-family: var(--font-head); font-weight: 600;
  color: var(--gold-dark); font-size: 1.4rem;
}
.journey-num::before { content: counter(step, decimal-leading-zero); }
.journey-body h3 { margin-bottom: 4px; }
.journey-body p { color: var(--slate); margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: var(--paper); color: var(--navy);
}
textarea { resize: vertical; min-height: 110px; }
.field { margin-bottom: var(--space-3); }
.field-hint { font-size: 0.85rem; color: var(--slate-light); margin-top: 4px; }
.field-error { font-size: 0.85rem; color: var(--danger); margin-top: 4px; display: none; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

fieldset { border: none; padding: 0; margin: 0 0 var(--space-3); }
legend { font-weight: 600; margin-bottom: 10px; padding: 0; font-size: 0.95rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.choice {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  cursor: pointer; position: relative;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { font-size: 0.95rem; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--gold); background: #FFF7E4; }
.choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Build Vision ---------- */
.bv-wrap { max-width: 760px; margin: 0 auto; }
.bv-progress { margin-bottom: var(--space-4); }
.bv-progress-track { display: flex; gap: 6px; }
.bv-progress-segment { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bv-progress-segment.is-complete { background: var(--gold-dark); }
.bv-progress-segment.is-current { background: var(--gold); }
.bv-progress-label { font-size: 0.88rem; color: var(--slate); margin-top: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .bv-progress-segment { transition: background-color 0.25s var(--ease); }
}

/* Mobile sticky step controls for Build Vision only — doesn't cover content
   (page gets bottom padding), respects safe-area insets, and is a plain
   static-positioned duplicate at focus time for assistive tech, not a
   floating trap: it contains real, independently-focusable buttons already
   in the tab order, just visually pinned. */
@media (max-width: 780px) {
  #build-vision .bv-nav {
    position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line);
    padding: 12px var(--space-2) calc(12px + env(safe-area-inset-bottom));
    margin: var(--space-4) calc(-1 * var(--space-3)) 0;
  }
}
.bv-step { display: none; }
.bv-step.active { display: block; }
.bv-nav { display: flex; justify-content: space-between; margin-top: var(--space-4); gap: var(--space-2); }
.bv-summary-block { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); margin-bottom: var(--space-2); }
.bv-summary-block dt { font-weight: 600; font-size: 0.85rem; color: var(--slate-light); }
.bv-summary-block dd { margin: 2px 0 var(--space-2); }
.bv-disclaimer {
  border-left: 4px solid var(--gold); background: var(--mist); padding: var(--space-2) var(--space-3);
  font-size: 0.92rem; color: var(--navy); margin: var(--space-3) 0;
}
.bv-result-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.bv-checklist { padding-left: 1.1em; color: var(--slate); }
.bv-checklist li { margin-bottom: 6px; }

@media print {
  .site-header, .site-footer, .bv-nav, .bv-result-actions, .no-print { display: none !important; }
  body { color: #000; }
}

/* ---------- Build Vision spotlight (homepage) ---------- */
.bv-spotlight {
  background: var(--navy); color: #E7ECF5; border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5); position: relative; overflow: hidden;
}
.bv-spotlight .container-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); align-items: center; position: relative; z-index: 1; }
.bv-spotlight h2, .bv-spotlight h3 { color: var(--paper); }
.bv-spotlight p { color: #C7D2E5; }
.bv-spotlight-steps { display: flex; flex-direction: column; gap: 10px; }
.bv-spotlight-step { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: #C7D2E5; }
.bv-spotlight-step .dot { width: 22px; height: 22px; border-radius: 50%; background: rgba(253,186,44,0.15); border: 1.5px solid var(--gold); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 0.72rem; color: var(--gold); }
@media (max-width: 900px) { .bv-spotlight .container-inner { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: var(--space-2) 0; list-style: none;
  display: flex; justify-content: space-between; gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-head); font-size: 1.3rem; color: var(--gold-dark); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: var(--space-2); color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C7D2E5; padding: var(--space-6) 0 var(--space-4); }
.site-footer a { color: #E7ECF5; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-4); }
.footer-grid > * { min-width: 0; }
.site-footer a { overflow-wrap: anywhere; }
.footer-grid h4 { color: var(--paper); font-size: 0.95rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: var(--space-5); padding-top: var(--space-3); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
#footer-version { color: #9FB0C9; font-size: 0.8rem; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Sticky mobile action bar ---------- */
.mobile-actionbar {
  position: fixed; bottom: 0; left: 0; right: 0; display: none;
  background: var(--paper); border-top: 1px solid var(--line); padding: 10px var(--space-2);
  gap: 10px; z-index: 90;
}
@media (max-width: 780px) { .mobile-actionbar { display: flex; } body { padding-bottom: 68px; } }
.mobile-actionbar .btn { flex: 1; padding: 12px; font-size: 0.9rem; }

/* ---------- Contact layout ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr);
  gap: var(--space-5);
  align-items: start;
}
.contact-grid > * { min-width: 0; } /* prevents a long unbroken string (the email address) from forcing the grid track, and the page, wider than the viewport */
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}
.contact-card {
  background: var(--navy);
  color: #E7ECF5;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: sticky;
  top: 88px;
}
@media (max-width: 880px) { .contact-card { position: static; } }
.contact-card h2 { color: var(--paper); }
.contact-card .contact-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.15);
}
.contact-card .contact-row:first-of-type { border-top: none; margin-top: var(--space-2); }
.contact-card .contact-row-label { font-size: 0.82rem; color: #9FB0C9; min-width: 80px; }
.contact-card .contact-row a { color: var(--paper); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); overflow-wrap: anywhere; }
.contact-card .contact-row a:hover { color: var(--gold); }
.contact-card .contact-row-note { color: #9FB0C9; font-size: 0.9rem; overflow-wrap: anywhere; }
.enquiry-panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4);
}
@media (max-width: 480px) { .enquiry-panel { padding: var(--space-3); } }

/* ---------- Breadcrumb / small utilities ---------- */
.page-intro { padding: var(--space-6) 0 var(--space-4); border-bottom: 1px solid var(--line); }
.page-intro p { color: var(--slate); font-size: 1.05rem; }
.category-block { margin-bottom: var(--space-6); }
.category-block .section-head { margin-bottom: var(--space-3); }
