/* Topkon Construction Services — shared site styles
   Brand source: Brand/Topkon-Brand-Guidelines.md */

/* ---------- Tokens ---------- */
:root {
  --color-orange: #C1652F;
  --color-orange-deep: #A9531F;   /* small text on white */
  --color-orange-light: #E0915F;  /* small text on charcoal */
  --color-charcoal: #262626;
  --color-white: #ffffff;
  --color-grey: #F2F2F2;
  --color-orange-tint: #F6E3D5; /* pale orange wash for section backgrounds, e.g. Why Topkon */

  --font-heading: "Barlow Condensed", Verdana, "DejaVu Sans", sans-serif; /* free stand-in for ADCO's Grotzec Cond Demibold (a paid font) — brand guidelines call for Verdana, see CLAUDE.md */
  --font-body: "Outfit", Verdana, "DejaVu Sans", sans-serif; /* free stand-in for ADCO's Filson Pro (a paid Adobe font) — brand guidelines call for Verdana, see CLAUDE.md */

  --space-page: 32px;   /* page margin, mobile */
  --space-section: 48px; /* gap between sections */
  --max-width: 1200px;
}

@media (min-width: 900px) {
  :root {
    --space-page: 64px;
    --space-section: 80px;
  }
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* No overflow-x here: with overflow-x set on BOTH html and body, the body
     becomes its own scroll container and position:sticky (the home hero pin)
     stops working. */
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.5;
  overflow-x: clip; /* blocks sideways scroll without the scroll-container side effect overflow-x:hidden has, which also breaks position:sticky in Safari */
  padding-bottom: 64px;
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600; /* semibold, matching ADCO's Demibold headings — only this weight is loaded */
  font-synthesis: none; /* stop the browser faking a heavier bold on top of the one loaded weight */
  line-height: 1.1;
  margin: 0 0 16px;
}

p {
  margin: 0 0 16px;
}

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

section {
  padding: var(--space-section) 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 14px 28px;
  font-size: 19px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-orange-deep);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 2px;
}

.btn-primary:active {
  background: var(--color-charcoal);
}

.btn-secondary {
  background: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-charcoal);
}

.btn-secondary:hover {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.btn-secondary:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.btn-secondary:active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
}

/* ---------- Button hover-reveal (main "Message us" CTAs only) ---------- */
.btn-reveal {
  position: relative;
  overflow: hidden;
  height: 52px;
  padding: 0;
  border: 2px solid var(--color-charcoal);
  background: transparent;
}

.btn-reveal-top,
.btn-reveal-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 0 28px;
  transition: transform 0.4s ease;
}

.btn-reveal-top {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-reveal-bottom {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--color-white);
  transform: translateY(100%);
}

.btn-reveal-fill {
  position: absolute;
  inset: 0;
  background: var(--color-charcoal);
  transform: skewY(8deg) scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s ease;
}

.btn-reveal-label {
  position: relative;
  z-index: 1;
}

.btn-reveal:hover .btn-reveal-top,
.btn-reveal:focus-visible .btn-reveal-top {
  transform: translateY(-150%);
}

.btn-reveal:hover .btn-reveal-bottom,
.btn-reveal:focus-visible .btn-reveal-bottom {
  transform: translateY(0);
}

.btn-reveal:hover .btn-reveal-fill,
.btn-reveal:focus-visible .btn-reveal-fill {
  transform: skewY(8deg) scaleY(1.6);
}

.btn-reveal:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 4px solid var(--color-orange);
  position: sticky;
  top: 0;
  background: var(--color-white);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo-link {
  display: block;
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(280px, 80vw);
  background: var(--color-charcoal);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  padding: 96px 32px 32px;
  z-index: 90;
}

.site-nav.is-open {
  transform: translateX(0);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 24px;
}

.site-nav a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-orange-light);
}

.nav-indicator {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 95;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--color-charcoal);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

/* position makes the z-index count, so the button sits above the open
   (fixed, z-index 90) menu panel instead of underneath it */
.nav-toggle {
  position: relative;
}

/* Open: the menu panel is charcoal, so the bars turn white (they were
   charcoal-on-charcoal = invisible, so the menu looked impossible to
   close) and fold into an ✕. 8px = 3px bar + 5px gap. */
.nav-toggle[aria-expanded="true"] span {
  background: var(--color-white);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span {
    transition: none;
  }
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.quote-btn {
  padding: 10px 18px;
  font-size: 14px;
  background: var(--color-orange-deep);
}

.quote-btn:hover {
  background: var(--color-charcoal);
}

@media (min-width: 900px) {
  .site-nav {
    position: static;
    height: auto;
    width: auto;
    background: transparent;
    transform: none;
    transition: none;
    padding: 0;
  }

  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
  }

  .site-nav li + li {
    margin-top: 0;
  }

  .site-nav a {
    display: block;
    color: var(--color-charcoal);
    font-size: 16px;
    padding: 10px 18px;
    position: relative;
    z-index: 1;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    color: var(--color-orange-deep);
    background: var(--color-grey);
  }

  .nav-indicator {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--color-orange);
    opacity: 0;
    z-index: 2;
    transition: left 0.2s ease, width 0.2s ease, opacity 0.15s ease;
    pointer-events: none;
  }

  .site-nav ul.has-hover .nav-indicator {
    opacity: 1;
  }

  .nav-toggle {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-charcoal);
  color: var(--color-white);
  overflow: hidden;
  clip-path: inset(0);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  background: var(--color-orange);
}

.hero::before {
  width: 60%;
  height: 200%;
  top: -50%;
  right: -20%;
  transform: rotate(15deg);
  opacity: 0.9;
}

.hero::after {
  width: 30%;
  height: 200%;
  top: -50%;
  right: -35%;
  background: var(--color-white);
  opacity: 0.08;
  transform: rotate(15deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  padding-bottom: 40px;
  max-width: 640px;
}

.hero h1 {
  font-size: 36px;
  letter-spacing: -0.03em;
  text-transform: none;
}

.hero .tagline {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-orange-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero .btn-secondary,
.cta-final .btn-secondary {
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero .btn-secondary:hover,
.cta-final .btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-charcoal);
}

@media (min-width: 900px) {
  .hero h1 {
    font-size: 56px;
  }

  .hero-inner {
    padding-top: 88px;
    padding-bottom: 88px;
  }
}

/* ---------- Strip (reused for Why Topkon, About vision/mission) ---------- */
.strip-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 700px) {
  .strip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.strip-item h3 {
  color: var(--color-orange-deep);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.strip-item p {
  margin-bottom: 0;
}

.needs-anderson {
  color: #777;
  font-style: italic;
}

/* ---------- Section heading ---------- */
.section-heading {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.section-heading--lg {
  font-size: clamp(30px, 4.2vw, 42px);
}

.section-note {
  color: var(--color-charcoal);
  font-style: italic;
}

/* ---------- Services preview: heading-left / text-right split (What we do) ---------- */
.intro-split {
  display: grid;
  gap: 24px;
}

@media (min-width: 700px) {
  .intro-split {
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: start;
  }
}

.intro-split__heading {
  margin: 0;
  color: var(--color-orange);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  text-transform: uppercase;
}

.intro-split__body p {
  font-size: 19px;
  line-height: 1.6;
  color: #595959;
}

.intro-split__body .btn-secondary {
  border-color: var(--color-orange);
  color: var(--color-orange-deep);
}

.intro-split__body .btn-secondary:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
}

/* ---------- Fade-in on scroll ---------- */
/* Only hidden once main.js adds .js-fade to <html>, so text is never
   stuck invisible if JavaScript fails to load. */
.js-fade .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-fade .fade-in.is-visible {
  opacity: 1;
  transform: none;
}

.js-fade .fade-in--delay-1 { transition-delay: 0.15s; }
.js-fade .fade-in--delay-2 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .js-fade .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Before and after ---------- */
.before-after {
  background: var(--color-grey);
}

.before-after-grid {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}

@media (min-width: 700px) {
  .before-after-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.before-after-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.before-after-pair .project-placeholder {
  font-size: 13px;
}

/* ---------- Why Topkon ---------- */
.why-topkon {
  background: var(--color-orange-tint);
  padding-top: clamp(96px, 12vw, 220px);
  padding-bottom: clamp(96px, 12vw, 220px);
}

.why-topkon > .container > .section-heading {
  color: var(--color-orange);
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 48px);
}

.why-grid {
  margin-top: 32px;
}

.why-topkon .strip-item {
  background: var(--color-white);
  border: 1px solid #E5E5E5;
  padding: 32px;
}

.why-topkon .strip-item h3 {
  font-size: clamp(24px, 2.4vw, 30px);
}

.why-topkon .strip-item p {
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.6;
}

/* ---------- About page ---------- */
/* Intro: story on the left, Quick facts card on the right; one column
   under 768px. */
.about-intro {
  display: grid;
  gap: 32px;
}

.about-intro__text {
  max-width: 60ch;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .about-intro {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 64px;
    align-items: start;
  }
}

.facts-card {
  background: var(--color-grey);
  border-left: 4px solid var(--color-orange);
  padding: 28px;
}

/* 28px counts as large text, so the main orange passes contrast on grey
   here; the small labels below use the deep orange, which passes at any
   size (the main orange on grey is only ~3.6:1). */
.facts-card__title {
  color: var(--color-orange);
  font-size: 28px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.facts-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.facts-list dt {
  color: var(--color-orange-deep);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.facts-list dd {
  margin: 0;
}

/* Vision / Mission: two equal cards, centred, under a small heading. */
.about-vision {
  background: var(--color-grey);
}

.about-vision__heading {
  text-align: center;
  margin-bottom: 32px;
}

.values-grid {
  display: grid;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.value-card {
  background: var(--color-white);
  border-top: 4px solid var(--color-orange);
  padding: 32px;
}

.value-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--color-orange);
  stroke-width: 1.75;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.value-card h3 {
  color: var(--color-orange-deep);
  font-size: 24px;
}

.value-card p {
  margin-bottom: 0;
}

/* ---------- Service detail list (services.html) ---------- */
.services-list {
  padding-top: 0;
}

.service-detail {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-grey);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail h2 {
  color: var(--color-orange-deep);
}

.service-media .project-placeholder,
.service-media img {
  aspect-ratio: 4 / 3;
}

.service-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 700px) {
  .service-detail {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .service-detail:nth-child(even) .service-media {
    order: 2;
  }

  .service-detail:nth-child(even) .service-text {
    order: 1;
  }
}

/* Same grey as the Home "What we do" paragraph */
.service-text p {
  color: #595959;
}

/* ---------- Projects preview ---------- */
.projects-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 700px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-placeholder {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    45deg,
    var(--color-grey),
    var(--color-grey) 10px,
    #e6e6e6 10px,
    #e6e6e6 20px
  );
  border: 2px dashed #b3b3b3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #777;
  font-size: 14px;
  font-weight: bold;
}

.projects-preview {
  text-align: left;
}

.projects-preview .btn {
  margin-top: 32px;
}

/* ---------- Filter buttons (Projects page) ---------- */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 14px;
  background: var(--color-grey);
  color: var(--color-charcoal);
  border: 2px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
}

.filter-btn:hover {
  background: #e9e9e9;
}

.filter-btn.is-active {
  background: var(--color-orange-deep);
  color: var(--color-white);
}

.filter-btn:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 2px;
}

/* ---------- Clickable project items ---------- */
.project-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  color: inherit;
}

.project-item:focus-visible .project-placeholder {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.project-pair.is-hidden,
.project-item.is-hidden {
  display: none;
}

@media (min-width: 700px) {
  .projects-grid .project-pair {
    grid-column: span 2;
  }
}

/* ---------- Lightbox (click a project to enlarge) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-dialog {
  position: relative;
  background: var(--color-white);
  max-width: 640px;
  width: 100%;
  padding: 24px;
  border: 2px solid var(--color-charcoal);
}

.lightbox-media {
  aspect-ratio: 4 / 3;
}

.lightbox-caption {
  margin: 16px 0 0;
  font-weight: bold;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: var(--color-charcoal);
  color: var(--color-white);
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--color-orange);
}

/* ---------- Process page: dark banner + white curved step list ---------- */
.process-intro-desc {
  margin: 16px 0 0;
  max-width: 480px;
  color: rgba(255, 255, 255, 0.75);
}

.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 820px;
}

/* Phone: number box in its own left column (spanning title + text), so
   the progress line running down that column never crosses the text. */
.process-steps li {
  border-top: 1px solid var(--color-grey);
}

.process-steps li:last-child {
  border-bottom: 1px solid var(--color-grey);
}

/* The clickable row (the <summary> of each <details>) */
.step-summary {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 6px 20px;
  padding: 20px 16px;
  cursor: pointer;
  list-style: none; /* hide the default ▸ marker */
  transition: background-color 0.2s ease;
}

.step-summary::-webkit-details-marker {
  display: none;
}

.step-summary:focus-visible {
  outline: 3px solid var(--color-orange-deep);
  outline-offset: -3px;
}

.process-steps .step-number {
  grid-row: span 2;
  align-self: start;
}

/* Extra detail shown when a row is opened, lined up under the title */
.step-detail {
  padding: 0 16px 20px 80px; /* 16px row padding + 44px box + 20px gap */
}

.step-detail p + p {
  margin-top: 8px;
}

@media (min-width: 700px) {
  .step-summary {
    grid-template-columns: 56px 220px 1fr;
    align-items: center;
    gap: 8px 28px;
  }

  .step-detail {
    padding-left: 100px; /* 16px row padding + 56px column + 28px gap */
  }

  .process-steps .step-number {
    grid-row: auto;
    align-self: center;
  }
}

/* Scroll progress line. Hidden until main.js positions it (.is-ready),
   so there's no stray line if JavaScript doesn't run. */
.process-path {
  position: relative;
}

.process-line {
  display: none;
  position: absolute;
  width: 2px;
  background: var(--color-grey);
  z-index: 0;
}

.process-line.is-ready {
  display: block;
}

.process-line__fill {
  width: 100%;
  height: 0;
  background: var(--color-orange-deep);
}

/* White number on deep orange (not the main orange) — white on main
   orange is only 4.06:1 at this 14px size, below the 4.5:1 minimum. */
/* Round on purpose — Anderson asked for circles here (2026-10-23), an
   exception to the brand's straight-edges rule, logged in the guidelines. */
.process-steps .step-number {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  background: var(--color-white);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.process-steps .step-number.is-active,
.step-summary:hover .step-number,
.step[open] .step-number {
  background: var(--color-orange-deep);
  color: var(--color-white);
}

/* Hover: grey row tint, title nudges right and a small arrow appears.
   When a row is open the arrow stays, turned to point down. */
.step-summary:hover {
  background: var(--color-grey);
}

.process-steps h3 {
  transition: transform 0.2s ease;
}

.step-summary:hover h3 {
  transform: translateX(6px);
}

.step-arrow {
  display: inline-block;
  margin-left: 4px;
  color: var(--color-orange-deep);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.step-summary:hover .step-arrow,
.step[open] .step-arrow {
  opacity: 1;
}

.step[open] .step-arrow {
  transform: rotate(90deg);
}

/* Rows reveal one after another, ~100ms apart (uses the .fade-in system) */
.js-fade .process-steps li:nth-child(2) { transition-delay: 0.1s; }
.js-fade .process-steps li:nth-child(3) { transition-delay: 0.2s; }
.js-fade .process-steps li:nth-child(4) { transition-delay: 0.3s; }

.process-cta {
  margin-top: 32px;
}

@media (prefers-reduced-motion: reduce) {
  .process-steps .step-number,
  .step-summary,
  .process-steps h3,
  .step-arrow {
    transition: none;
  }

  .step-summary:hover h3 {
    transform: none;
  }
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-orange-deep);
  color: var(--color-orange-deep);
  font-weight: bold;
  font-size: 14px;
}

.process-steps h3 {
  margin: 0;
  color: var(--color-charcoal);
  font-size: 19px;
}

.process-steps p {
  margin: 0;
  color: #555555;
  font-size: 0.95rem;
}

/* ---------- Final CTA ---------- */
.cta-final {
  background: var(--color-charcoal);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: "";
  position: absolute;
  width: 40%;
  height: 200%;
  top: -50%;
  left: -15%;
  background: var(--color-orange);
  opacity: 0.9;
  transform: rotate(-15deg);
}

.cta-final .container {
  position: relative;
  z-index: 1;
}

.cta-final h2 {
  font-size: 26px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.footer-inner {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  display: grid;
  gap: 32px;
}

@media (min-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Contact column ("auto") sizes itself to the full email address so it
   never wraps mid-word; the other three share what's left. */
@media (min-width: 1000px) {
  .footer-inner {
    grid-template-columns: 1fr auto 1fr 1fr;
  }

  .footer-contact-link {
    white-space: nowrap;
  }
}

.footer-logo {
  height: 160px;
  width: auto;
}

.footer-col h4 {
  color: var(--color-orange-light);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-col p,
.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  text-decoration: none;
  overflow-wrap: break-word;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--color-orange-light);
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-orange-light);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

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

.footer-bottom {
  border-top: 1px solid #3a3a3a;
  padding: 16px 0;
  font-size: 13px;
  color: #b3b3b3;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-orange-light);
  text-decoration: none;
  flex-shrink: 0;
}

.social-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.social-icon:hover,
.social-icon:focus-visible {
  color: var(--color-white);
}

/* ---------- Contact page ---------- */
.contact-info {
  background: var(--color-white);
  padding-top: 32px;
  padding-bottom: 32px;
}

.contact-info-grid {
  display: grid;
  gap: 24px;
}

/* 2 x 2 on tablet and small laptops: four equal columns are too narrow
   for the email address, which then broke mid-word. */
@media (min-width: 700px) {
  .contact-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 40px;
  }
}

/* One row on wide screens: the first three cards take only the width
   they need (so the email fits on one line), the service area gets the rest. */
@media (min-width: 1200px) {
  .contact-info-grid {
    grid-template-columns: max-content max-content max-content minmax(0, 1fr);
    gap: 40px;
  }
}

/* Icon left; heading on row 1, value on row 2. Fixed rows, so every
   card's heading and value sit at the same height as its neighbours'. */
.contact-info-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-content: start;
}

.contact-info-icon {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--color-orange);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.contact-info-item h3 {
  color: var(--color-orange-deep);
  font-size: 14px;
  line-height: 28px; /* same height as the icon, so the heading centres on it */
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}

.contact-info-item p {
  margin: 0;
  line-height: 1.5;
}

/* Slightly smaller so it fits; the <wbr> before the @ in contact.html
   is the only place it wraps if space runs out. */
.contact-info-email {
  font-size: 15px;
}

.contact-info-item a {
  text-decoration: none;
  font-weight: bold;
  overflow-wrap: break-word;
}

.contact-info-item a:hover,
.contact-info-item a:focus-visible {
  color: var(--color-orange-deep);
}

.quote-form {
  max-width: 560px;
  margin-top: 24px;
}

.form-row {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-weight: bold;
  font-size: 14px;
}

.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-charcoal);
}

.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible {
  outline: none;
  border-color: var(--color-orange);
}

.form-note {
  font-size: 13px;
  color: #555;
  margin-top: 16px;
}

.form-note a {
  color: var(--color-orange-deep);
}

/* ---------- Quote form stepper (one question at a time) ---------- */
/* Step tracker: ① Service — ② Details — ③ Contact. Round circles to
   match the Process page's 01-04 badges (logged brand exception). */
.stepper-track {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.stepper-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: none;
  width: 72px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  cursor: default;
}

.stepper-dot-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #BDBDBD;
  background: var(--color-white);
  color: #6B6B6B;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.stepper-dot-label {
  font-size: 13px;
  font-weight: bold;
  color: #6B6B6B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Current step: orange outline */
.stepper-dot.is-current .stepper-dot-circle {
  border-color: var(--color-orange-deep);
  color: var(--color-orange-deep);
}

.stepper-dot.is-current .stepper-dot-label,
.stepper-dot.is-done .stepper-dot-label {
  color: var(--color-orange-deep);
}

/* Finished step: solid deep orange with a white tick, tap to go back */
.stepper-dot.is-done {
  cursor: pointer;
}

.stepper-dot.is-done .stepper-dot-circle {
  background: var(--color-orange-deep);
  border-color: var(--color-orange-deep);
  color: var(--color-white);
}

.stepper-dot.is-done:hover .stepper-dot-circle {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
}

.stepper-dot:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 2px;
}

/* Line between circles, at circle-centre height; fills orange once the
   step before it is finished */
.stepper-line {
  flex: 1;
  height: 2px;
  margin: 17px -18px 0; /* tuck under the 72px-wide dot buttons, to the circle edges */
  background: #D9D9D9;
}

.stepper-line-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-orange-deep);
  transition: width 0.3s ease;
}

.stepper-line.is-filled .stepper-line-fill {
  width: 100%;
}

/* Running summary tags */
.stepper-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.stepper-summary li {
  background: var(--color-grey);
  border-left: 3px solid var(--color-orange);
  padding: 4px 10px;
  font-size: 14px;
  font-weight: bold;
  color: var(--color-charcoal);
}

.stepper-step {
  display: none;
}

.stepper-step.is-active {
  display: block;
}

/* Slide between steps: old one out to the left, new one in from the
   right (reversed when going back). */
.stepper-step.slide-out-left  { animation: step-out-left 0.12s ease-in forwards; }
.stepper-step.slide-out-right { animation: step-out-right 0.12s ease-in forwards; }
.stepper-step.slide-in-right  { animation: step-in-right 0.25s ease-out; }
.stepper-step.slide-in-left   { animation: step-in-left 0.25s ease-out; }

@keyframes step-out-left  { to { opacity: 0; transform: translateX(-40px); } }
@keyframes step-out-right { to { opacity: 0; transform: translateX(40px); } }
@keyframes step-in-right  { from { opacity: 0; transform: translateX(40px); } }
@keyframes step-in-left   { from { opacity: 0; transform: translateX(-40px); } }

.stepper-step h3 {
  font-size: 20px;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.choice-group--inline {
  margin-top: 8px;
}

.choice-btn {
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 16px;
  background: var(--color-grey);
  color: var(--color-charcoal);
  border: 2px solid transparent;
  padding: 14px 20px;
  cursor: pointer;
  text-align: left;
}

.choice-btn:hover {
  background: #e9e9e9;
}

.choice-btn.is-selected {
  background: var(--color-orange-deep);
  color: var(--color-white);
  animation: choice-pop 0.2s ease-out;
}

.choice-btn.is-selected::after {
  content: "\2713"; /* ✓ */
  margin-left: 10px;
}

@keyframes choice-pop {
  50% { transform: scale(1.06); }
}

.choice-btn:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 2px;
}

.stepper-nav {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.stepper-next.is-waiting,
.stepper-submit:disabled {
  opacity: 0.5;
}

.stepper-submit:disabled {
  cursor: not-allowed;
}

/* "Pick one to continue." shown if Next is tapped before choosing */
.stepper-error {
  margin: 12px 0 0;
  color: var(--color-orange-deep);
  font-weight: bold;
  font-size: 15px;
}

/* Success screen shown after sending, with a tick that draws itself */
.quote-success {
  max-width: 560px;
  margin-top: 24px;
  padding: 32px 0;
}

.quote-success:focus {
  outline: none;
}

.quote-success h3 {
  font-size: 26px;
  margin: 16px 0 12px;
}

.quote-success a {
  color: var(--color-orange-deep);
  font-weight: bold;
}

.quote-success-check {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--color-orange-deep);
  stroke-width: 3;
}

.quote-success-circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw-stroke 0.5s ease-out forwards;
}

.quote-success-tick {
  stroke-width: 4;
  stroke-linecap: square;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw-stroke 0.3s ease-out 0.45s forwards;
}

@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}

/* Less motion: no slides, pops or drawing — everything just appears */
@media (prefers-reduced-motion: reduce) {
  .stepper-step.slide-out-left,
  .stepper-step.slide-out-right,
  .stepper-step.slide-in-right,
  .stepper-step.slide-in-left,
  .choice-btn.is-selected {
    animation: none;
  }

  .stepper-dot-circle,
  .stepper-line-fill {
    transition: none;
  }

  .quote-success-circle,
  .quote-success-tick {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- Thank-you page ---------- */
.thank-you-inner {
  text-align: center;
  max-width: 480px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.thank-you-inner h1 {
  font-size: 32px;
}

.thank-you-inner .btn {
  margin-top: 16px;
}

/* ---------- Floating Messenger button (desktop only — mobile uses the bottom bar below) ---------- */
.messenger-float {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--color-orange);
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 19px;
  padding: 14px 20px;
  border: 2px solid var(--color-charcoal);
  z-index: 80;
  transition: background-color 0.15s ease;
}

.messenger-float:hover {
  background: var(--color-orange-deep);
}

.messenger-float:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .messenger-float {
    display: block;
  }
}

/* ---------- Mobile contact bar (Call + Message us) ---------- */
.mobile-contact-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
}

.mobile-contact-bar-btn {
  flex: 1;
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 16px;
  padding: 16px 12px;
  border-top: 2px solid var(--color-charcoal);
}

.mobile-contact-bar-btn--call {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.mobile-contact-bar-btn--call:hover {
  background: #000;
}

.mobile-contact-bar-btn--message {
  background: var(--color-orange);
  color: var(--color-white);
  border-left: 2px solid var(--color-charcoal);
}

.mobile-contact-bar-btn--message:hover {
  background: var(--color-orange-deep);
}

.mobile-contact-bar-btn:focus-visible {
  outline: 3px solid var(--color-orange-light);
  outline-offset: -4px;
}

@media (min-width: 900px) {
  .mobile-contact-bar {
    display: none;
  }
}

/* ============================================================
   TOPKON HOME HERO — full-bleed photo + corner panel, fixed in
   place while the next section (with .section-wave as its curved
   top edge, see below) scrolls up over it. Every other page does
   the same with its dark .hero--edge header.
   --header-h checked against .site-header's real height
   (16px + 48px logo + 16px padding + 4px border = 84px) — matches.
   ============================================================ */

:root {
  --header-h: 84px;
  --orange: #C1652F;
  --orange-on-dark: #E0915F;
  --charcoal: #262626;
  --wave-h: clamp(60px, 10vw, 200px); /* height of the curved top edge on the white section below the hero */
}

/* .hero2 below is position: fixed, so it isn't laid out inside this wrap —
   this is just a spacer reserving the hero's scroll space. The extra
   --wave-h pushes the next section's curved top edge (.section-wave)
   just below the fold at load, so only the photo and panel show at first;
   the curve then rises into view with the very first scroll. */
.hero2-wrap {
  position: relative;
  height: calc(100svh - var(--header-h) + var(--wave-h));
}

/* Fixed, not sticky — sticky still releases and scrolls away once its
   containing block runs out; this stays put for the entire page no matter
   how far the visitor scrolls. Later sections (z-index: 2 below) simply
   scroll up and over it instead. */
.hero2 {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: calc(100svh - var(--header-h));
  overflow: hidden;
  background: var(--charcoal);
}

/* Every section after the hero sits above it (z-index) and is opaque, so
   the pinned photo/panel can never show through once they've scrolled past
   — same reasoning for the footer below, which isn't a <section> so this
   selector doesn't reach it. */
.hero2-wrap ~ section {
  position: relative;
  z-index: 2;
}

.site-footer {
  position: relative;
  z-index: 2;
}

.hero2__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero2__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;   /* keeps the sofa and wood-slat wall in view; the plain left wall sits behind the panel */
  display: block;
  transform: scale(1);
}

/* ---- Charcoal wash over the photo, so the panel and white text stand out ---- */
.hero2__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(38, 38, 38, 0.06);   /* barely-there wash: the facade photo is already bright */
}

/* ---- Bottom-left orange panel, angled top edge and inward-leaning right edge ---- */
.hero2__panel {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 50vw;
  background: color-mix(in srgb, var(--orange) 94%, transparent); /* photo shows faintly through */
  clip-path: url(#hero2-panel-clip); /* curved top/right edge instead of a straight angled cut */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 96px 64px 56px var(--space-page); /* extra top padding grows the angled triangle above the eyebrow line */
}
.hero2__eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.hero2__headline {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 4.6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 800;
  color: #fff;
}
.hero2__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero2__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  font-weight: 700;
  font-size: 1.1875rem; /* 19px — the minimum size that clears AA contrast for bold white-on-orange text */
  text-decoration: none;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hero2__btn--primary {
  background: #fff;
  color: var(--charcoal);
  border-color: #fff;
}
.hero2__btn--primary:hover {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
}
.hero2__btn--ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.hero2__btn--ghost:hover {
  background: #fff;
  color: var(--charcoal);
}

.projects-preview {
  background-color: var(--color-white);
}

.services-preview {
  background: var(--color-white);
  padding-top: clamp(120px, 18vw, 340px);
  padding-bottom: clamp(120px, 18vw, 340px);
}

/* ---- Reduced motion (scroll-locking a section is itself a motion
   effect) skips the pin — just a normal section that scrolls away like
   everything else. Phones get the pin too (see below). ---- */
@media (prefers-reduced-motion: reduce) {
  .hero2-wrap {
    height: auto;
  }
  .hero2 {
    position: static;
    height: auto;
    min-height: calc(100svh - var(--header-h));
  }
}

/* ---- Phone: compact full-width panel with a curved cap on top, smaller
   text, stacked buttons. The panel itself is a plain rectangle (no
   clip-path) so nothing inside it can be cut off; the curve lives only
   in the ::before cap above it. ---- */
@media (max-width: 767px) {
  /* Leave room for the fixed Call / Message us bar (~56px) at the bottom,
     so the panel's buttons aren't hidden under it on first view. */
  .hero2 {
    min-height: calc(100svh - var(--header-h) - 56px);
  }
  .hero2__panel {
    width: 100%;
    clip-path: none;
    padding: 8px 20px 24px;
    align-items: stretch;
  }
  .hero2__panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 48px;
    background: inherit;
    clip-path: url(#hero2-cap-clip-mobile);
  }
  .hero2__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
  }
  .hero2__headline {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    margin-bottom: 16px;
  }
  .hero2__actions {
    flex-direction: column;
    gap: 8px;
  }
  .hero2__btn {
    width: 100%;
    min-height: 46px;
  }
}

/* ---- Phone, pinned: the hero stays fixed and stops just above the
   Call / Message us bar; the white curve starts just below the fold and
   rises up over the photo and panel as you scroll, same as desktop. ---- */
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .hero2 {
    height: calc(100svh - var(--header-h) - 56px);
  }
  .hero2-wrap {
    height: calc(100svh - var(--header-h) - 56px + var(--wave-h));
  }
}

/* ---------- Other pages (Services, Process, Projects, About, Contact):
   same scroll effect as Home. The dark header stays put (sticky, for the
   whole page) and the next section — with the curve as its top edge —
   scrolls up over it. The extra bottom padding keeps the curve clear of
   the heading while the page is at rest. */
.hero--edge {
  position: sticky;
  top: var(--header-h);
}

.hero--edge .hero-inner {
  padding-bottom: clamp(96px, 11vw, 220px);
}

.hero--edge ~ section {
  position: relative;
  z-index: 2;
}

/* Zero-specificity default so sections with their own background (grey,
   dark) keep it — only sections with none get white, so the pinned header
   can't show through them. */
:where(.hero--edge ~ section) {
  background-color: var(--color-white);
}

/* Reduced motion: no pin, header just scrolls away normally (same as
   Home). Phones keep the pin. */
@media (prefers-reduced-motion: reduce) {
  .hero--edge {
    position: relative;
    top: auto;
  }
}

/* The curved top edge of the section right after the hero (every page).
   It sits just above the section (bottom: 100%) and moves with it, so as
   the section scrolls up over the pinned/fixed hero, the boundary is this
   curve the whole way. */
.section-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px); /* 1px overlap into the section so no hairline gap shows between them */
  width: 100%;
  height: var(--wave-h);
  display: block;
}

.section-wave path {
  fill: var(--color-white);
}


/* Office address + business hours (added 2026-10-28) */
.footer-contact-line { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact-line .footer-icon { margin-top: 2px; }
@media (min-width: 1200px) {
  .contact-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.footer-contact-line span { max-width: 260px; }
