/* =============================================================
   Happy Construction: main stylesheet

   PALETTE IS REAL, derived from the brand gold (#FDCB17). The neutrals
   are warm-shifted to sit with it. The old cool blue-greys fought the
   gold. Nothing below :root hardcodes a hex, so the site re-skins from
   this block alone. Keep it that way. See CLAUDE.md > "Design tokens".

   Every pair below is verified WCAG AA (>=4.5:1 for text). Two rules:

   * `--accent` (#FDCB17) is NEVER a text color on a light surface.
     It is 1.53:1 on white. It is a fill: buttons, rules, the CTA band,
     and type on `--ink`. For gold *text* on light, use `--accent-dark`.
   * `--accent-dark` must stay dark enough to carry white text, because
     `.btn:hover` and `.header-phone:hover` reverse out of it.

   Fonts are still the system stack. CLAUDE.md > "Fonts" has the
   self-hosting procedure for when a typeface is chosen.
   ============================================================= */

:root {
  /* Brand */
  --ink: #17130F;          /* warm near-black: headings, hero/footer bg */
  --ink-soft: #332B22;
  --slate: #574F45;        /* body copy on light, 8.05:1 on white */
  --slate-light: #6E6459;  /* muted labels, 5.78:1 on white */
  --accent: #FDCB17;       /* brand gold: FILL ONLY, never text on light */
  --accent-dark: #7A5E00;  /* gold that survives as text, 6.12:1 on white */
  --accent-light: #FFF1C2; /* gold wash: proof strip, highlight panels */

  /* Surfaces */
  --white: #ffffff;
  --concrete: #FAF7F1;     /* warm off-white, alternating sections */
  --concrete-dark: #EFE8DA;
  --line: #E4DBC9;         /* hairline borders */

  /* Typography */
  --font-body: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);

  /* Elevation */
  /* Warm-tinted to match --ink; a blue-grey shadow reads dirty against gold. */
  --sh-sm: 0 1px 3px rgba(23, 19, 15, 0.10);
  --sh-md: 0 6px 20px rgba(23, 19, 15, 0.10);
  --sh-lg: 0 18px 40px rgba(23, 19, 15, 0.14);

  /* Geometry */
  --radius: 4px;
  --radius-lg: 8px;
  --wrap: 1200px;
}

/* Base */

html {
  color: var(--ink);
  font-size: 1em;
  line-height: 1.6;
}

::selection {
  background: var(--accent);
  color: var(--ink);
  text-shadow: none;
}

body {
  margin: 0;
  font-size: 1.05em;
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--slate);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover { color: var(--ink); }

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
}

textarea { resize: vertical; }

fieldset { border: 0; margin: 0; padding: 0; }

/* Accessibility */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--ink);
  color: var(--white);
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus { top: 0; }

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

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

/* Buttons */

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background-color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-dark {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background-color: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--white);
}

.btn-ghost {
  background-color: transparent;
  border-color: currentColor;
  color: var(--white);
}

.btn-ghost:hover {
  background-color: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

/* Layout shell */

.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex-grow: 1; }

/* Header */

header {
  background-color: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

#headerContent {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

/* The logo link must not shrink, and the image needs a *definite* height.
   An SVG sized `width: auto; max-height: N` inside a flex row collapses to
   0x0 because it has no definite flex basis to resolve against. */
.header-logo-link { flex-shrink: 0; display: block; }

/* <picture> is inline by default; a block wrapper keeps the link's height equal
   to the image's and avoids an inline baseline gap. */
.header-logo-link picture { display: block; }

.header-logo {
  height: 48px;
  width: auto;
  display: block;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-flow: row nowrap;
  gap: 4px;
  align-items: center;
}

header nav a {
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

header nav a:hover { color: var(--accent-dark); }

header nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.header-phone:hover { background: var(--accent-dark); color: var(--white); }

.header-phone::before {
  content: "\260E";
  font-size: 1rem;
}

.desktop-menu { display: none; }

/* Hamburger */

.hamburger-icon {
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
  z-index: 20;
}

.hamburger-icon .bar1,
.hamburger-icon .bar2,
.hamburger-icon .bar3 {
  width: 30px;
  height: 3px;
  background-color: var(--ink);
  margin: 6px 0;
  border-radius: 2px;
  transition: 0.4s;
}

.hamburger-icon-click .bar1 { transform: rotate(-45deg) translate(-6px, 7px); }
.hamburger-icon-click .bar2 { opacity: 0; }
.hamburger-icon-click .bar3 { transform: rotate(45deg) translate(-6px, -7px); }

.mobile-menu-container {
  opacity: 0;
  height: 0;
  width: 0;
  transition: 0.25s;
  z-index: 15;
}

.mobile-menu-outside {
  position: fixed;
  z-index: 14;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(23, 19, 15, 0.5);
  border: none;
  padding: 0;
  cursor: default;
}

.mobile-menu {
  position: fixed;
  z-index: 16;
  right: 0;
  top: 0;
  height: 100%;
  width: 0;
  background-color: var(--white);
  overflow: auto;
  box-shadow: -4px 0 12px rgba(23, 19, 15, 0.15);
  transition: width 0.25s;
}

.hamburger-icon-click .mobile-menu-container { opacity: 1; height: auto; width: auto; overflow: visible; }
.hamburger-icon-click .mobile-menu { width: min(320px, 80%); }
.hamburger-icon-click .mobile-menu-outside { width: 100%; }

.mobile-menu-nav {
  margin-top: 80px;
  padding: 0 20px;
}

.mobile-menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.mobile-menu-li a {
  display: block;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

.mobile-menu-li a:hover,
.mobile-menu-li a.active { background-color: var(--concrete); color: var(--accent-dark); }

.mobile-menu-cta { margin-top: 20px; }

/* Sections */

.section {
  padding: 56px 20px;
}

.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.section-concrete { background-color: var(--concrete); }
.section-dark { background-color: var(--ink); color: var(--concrete-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }

.section-title {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 14px 0 0;
}

.section-centered { text-align: center; }
.section-centered .section-title::after { margin-left: auto; margin-right: auto; }

.section-lede {
  max-width: 68ch;
  margin: 18px 0 36px;
  font-size: 1.1rem;
}

.section-centered .section-lede { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

/* On --ink, --accent-dark drops to 3.02:1, below AA for this size. Both dark
   surfaces take the full-strength gold instead (12.08:1). */
.hero .eyebrow,
.section-dark .eyebrow { color: var(--accent); }

/* Hero */

.hero {
  background-color: var(--ink);
  color: var(--concrete-dark);
  padding: 84px 20px;
}

.hero-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.hero h1 { color: var(--white); max-width: 20ch; }

.hero p {
  max-width: 60ch;
  font-size: 1.15rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-compact { padding: 56px 20px; }
.hero-compact h1 { max-width: none; }
.hero-compact p { margin-bottom: 0; }

/* Proof strip: credentials immediately below the hero. The gold wash is where
   the brand colour does real work on a light page; note --accent is the fill and
   the border, never the type (1.53:1 on white). Labels use --accent-dark. */

.proof-strip {
  background: var(--accent-light);
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
  padding: 28px 20px;
}

.proof-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  text-align: center;
}

.proof-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.proof-figure {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* For word-based credentials ("Licensed & Bonded") that would otherwise tower
   over the numeric figures beside them. */
.proof-figure-text {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proof-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--sh-sm);
}

.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.card-accent { border-top: 4px solid var(--accent); }

/* Numbered delivery-phase card (Services > How We Work). */
.card-phase { border-top: 4px solid var(--accent); }

.phase-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

/* Project tiles: placeholder frames until real photography lands */

.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.tile-media {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    45deg,
    var(--concrete),
    var(--concrete) 12px,
    var(--concrete-dark) 12px,
    var(--concrete-dark) 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.tile-body { padding: 18px 20px; }
.tile-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.tile-body p { margin: 0; font-size: 0.92rem; }

/* Sector badge on a project tile. Competitors all label their work by sector
   (healthcare, retail, education). It's how an owner finds the relevant job. */
.tile-sector {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tile-meta { color: var(--slate-light); }

/* Split content */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

/* Definition-style contact list */

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}

.detail-list dt,
.detail-list .detail-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-light);
  margin-bottom: 2px;
}

.detail-list dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

.detail-list dd a { color: var(--ink); }
.detail-list dd a:hover { color: var(--accent-dark); }

/* Side-by-side variant, for credential rows like the safety block. */
.detail-list-inline { grid-template-columns: repeat(2, 1fr); }

/* On --ink the default dt/dd colors invert into failures: --slate-light drops to
   2.0:1 and --ink is invisible on itself. Gold labels, white values. */
.section-dark .detail-list dt { color: var(--accent); }
.section-dark .detail-list dd { color: var(--white); }

/* CTA strip */

.cta-strip {
  background: var(--accent);
  color: var(--ink);
  padding: 44px 20px;
  text-align: center;
}

.cta-strip h2 { margin-bottom: 8px; }
.cta-strip p { max-width: 56ch; margin: 0 auto 22px; }

/* Placeholder banner: remove once real copy lands */

.wip-banner {
  background: var(--ink-soft);
  color: var(--white);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Footer */

footer {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--concrete-dark);
  padding: 48px 20px 24px;
}

.footer-container {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* Same reason as the header: a bare <picture> is inline and would leave a
   baseline gap under the logo. */
.footer-brand picture { display: block; }

.footer-brand img {
  width: 200px;
  height: auto;
  max-width: 100%;
  display: block;
  margin-bottom: 12px;
}

.footer-brand p { margin: 0; opacity: 0.75; font-size: 0.92rem; max-width: 42ch; }

.footer-col h4 {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin-bottom: 8px; font-size: 0.95rem; }

.footer-col a {
  color: var(--white);
  opacity: 0.8;
}

.footer-col a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  max-width: var(--wrap);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.footer-bottom a { color: var(--accent); }

/* Builder credit tag. The width/height attributes on the <img> carry the SVG's
   true 2338x1080 intrinsic size, so the box reserved before it loads has the
   right aspect; the global `img { height: auto }` scales it from this width.
   Same rule and same 150px as funcitygamesnwa.com, deliberately. */
.footer-bottom img { max-width: 150px; }

/* Responsive */

@media screen and (min-width: 940px) {
  .desktop-menu { display: block; }
  .hamburger-icon { display: none; }
  .header-phone { display: inline-flex; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > :first-child { order: 2; }
  .footer-container { grid-template-columns: 2fr 1fr 1fr 1fr; }

  .section { padding: 76px 40px; }
  .hero { padding: 110px 40px; }
  .hero-compact { padding: 68px 40px; }
  .header-logo { height: 56px; }

  .proof-strip { padding: 32px 40px; }
  .proof-inner { grid-template-columns: repeat(4, 1fr); gap: 16px 24px; }
  .detail-list-inline { grid-template-columns: repeat(4, 1fr); }
}

@media screen and (min-width: 640px) and (max-width: 939px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 600px) {
  .section { padding: 44px 16px; }
  .hero { padding: 64px 16px; }
}

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