/* ============================================================================
   SITE — structure and components.
   Reads every colour, font, radius and duration from tokens.css. If you find
   yourself typing a hex value in this file, put it in tokens.css instead.
   ============================================================================ */

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--weight-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.on-ink :focus-visible { outline-color: var(--brand-light); }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  z-index: 100; padding: 10px 18px; border-radius: 0 0 var(--radius) var(--radius);
  background: var(--brand); color: var(--text-on-brand);
  font-weight: var(--weight-strong); font-size: 14px;
}
.skip-link:focus { transform: translate(-50%, 0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Icons are a <use> reference into the sprite at the top of <body>. Size is
   set here and inherited by anything that does not override it. */
.i {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.i-solid { fill: currentColor; stroke: none; }

/* --- Shared type --------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px; font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--brand);
}
.eyebrow-on-ink { color: var(--text-on-ink); opacity: 0.85; }

.h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.14;
}
.h1 { font-size: clamp(31px, 3.6vw, 46px); }
.h2 { font-size: clamp(25px, 2.8vw, 34px); line-height: 1.2; }
.h3 { font-size: 15px; font-weight: var(--weight-strong); line-height: 1.35; letter-spacing: 0; }

.section-head { max-width: 660px; margin-inline: auto; text-align: center; }
.section-head .h2 { margin-top: 12px; }
.section-sub { margin-top: 14px; color: var(--text-mute); font-size: 16px; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding-inline: 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: var(--weight-strong);
  font-size: 14.5px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-quick) ease,
              border-color var(--dur-quick) ease,
              color var(--dur-quick) ease,
              transform var(--dur-quick) ease;
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }

.btn-brand { background: var(--brand); color: var(--text-on-brand); }
.btn-brand:hover { background: var(--brand-strong); }

.btn-outline { border-color: var(--rule-on-ink); color: var(--text-on-ink); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.10); border-color: var(--text-on-ink); }

.btn-lg { height: 52px; padding-inline: 26px; font-size: 15.5px; }
.btn-block { display: flex; width: 100%; }

/* --- Nav ----------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-quick) ease, box-shadow var(--dur-quick) ease;
}
.nav.is-stuck {
  border-bottom-color: var(--rule);
  box-shadow: 0 6px 24px rgba(15, 36, 56, 0.06);
}
.nav-inner {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 30px; height: 36px; color: var(--brand); }
.brand-mark .i { width: 100%; height: 100%; }
.brand-name {
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: 22px; line-height: 1; letter-spacing: -0.02em; color: var(--text);
}
.brand-sub {
  display: block; margin-top: 5px;
  font-family: var(--font-display); font-weight: var(--weight-strong);
  font-size: 10px; line-height: 1; letter-spacing: 0.3em; color: var(--brand);
}
.brand-on-ink .brand-name { color: var(--text-on-ink); }
.brand-on-ink .brand-sub  { color: var(--text-on-ink-mute); }
.brand-on-ink .brand-mark { color: var(--text-on-ink); }

.nav-links { display: flex; gap: clamp(18px, 2.2vw, 30px); }
.nav-links a {
  position: relative; display: block; padding: 6px 0;
  font-size: 14.5px; font-weight: var(--weight-medium); color: var(--text-mute);
  transition: color var(--dur-quick) ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); font-weight: var(--weight-strong); }
.nav-links a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--brand); border-radius: var(--radius-pill);
}

.nav-end { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }

.nav-tel { display: flex; align-items: center; gap: 10px; }
.nav-tel .i { width: 18px; height: 18px; color: var(--brand); }
.nav-tel-num {
  display: block; font-family: var(--font-display);
  font-weight: var(--weight-display); font-size: 15px; line-height: 1.2; color: var(--text);
}
.nav-tel-sub { display: block; font-size: 11.5px; line-height: 1.2; color: var(--text-mute); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); cursor: pointer;
}
.nav-menu { display: none; }

/* --- Hero ---------------------------------------------------------------- */

.hero { position: relative; background: var(--ink); color: var(--text-on-ink); overflow: hidden; }

.hero-media { position: absolute; inset: 0 0 0 auto; width: 64%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
              var(--ink) 0%,
              color-mix(in srgb, var(--ink) 90%, transparent) 24%,
              color-mix(in srgb, var(--ink) 40%, transparent) 58%,
              color-mix(in srgb, var(--ink) 14%, transparent) 100%);
}

.hero-inner {
  position: relative; z-index: 1;
  padding-block: clamp(52px, 6.5vw, 80px);
  min-height: clamp(400px, 34vw, 470px);
  display: flex; flex-direction: column; justify-content: center;
}
/* The copy column is wide enough for the trust row to stay on one line;
   the headline and the paragraph are narrowed individually so they still
   break where the design wants them to. */
.hero-copy { max-width: 700px; }
.hero-copy .h1 { margin-top: 18px; max-width: 580px; }
.hero-accent { display: block; color: var(--brand-light); }
.hero-sub {
  margin-top: 20px; max-width: 460px;
  font-size: 16.5px; color: var(--text-on-ink-mute);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 14px clamp(20px, 3vw, 38px);
  margin-top: clamp(30px, 4vw, 44px);
}
.hero-trust li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: var(--weight-medium); }
.hero-trust .i { width: 20px; height: 20px; }

/* --- Sections on the tinted canvas --------------------------------------- */

.s-services, .s-why, .s-reviews { background: var(--paper-tint); }
.s-services { padding-block: var(--section-y) var(--section-y-tight); }
.s-why      { padding-block: 0 var(--section-y-tight); }
.s-reviews  { padding-block: 0 var(--section-y); }

/* --- Services ------------------------------------------------------------ */

.services-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px; margin-top: clamp(32px, 4vw, 48px);
}
.service-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 16px;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  transition: transform var(--dur-quick) ease,
              box-shadow var(--dur-quick) ease,
              border-color var(--dur-quick) ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: var(--shadow-card);
}
.service-card .i { width: 34px; height: 34px; color: var(--brand); stroke-width: 1.5; }
.service-card .h3 { margin-top: 18px; }
.service-card p { margin-top: 9px; font-size: 13px; line-height: 1.5; color: var(--text-mute); }

/* --- Why choose us ------------------------------------------------------- */

.why-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(16px, 2vw, 24px); align-items: stretch;
}
.why-photo {
  border-radius: var(--radius-card); overflow: hidden; min-height: 260px;
  background: var(--panel);
}
.why-photo img { width: 100%; height: 100%; object-fit: cover; }

.why-panel {
  background: var(--panel); border-radius: var(--radius-panel);
  padding: clamp(26px, 3vw, 40px);
  display: flex; flex-direction: column; justify-content: center;
}
.why-panel .h2 { margin-top: 12px; }
.why-list { margin-top: clamp(20px, 2.4vw, 28px); display: grid; gap: 18px; }
.why-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.why-check {
  width: 26px; height: 26px; border-radius: var(--radius-pill);
  background: var(--brand); color: var(--text-on-brand);
  display: grid; place-items: center;
}
.why-check .i { width: 15px; height: 15px; stroke-width: 2.5; }
.why-item p { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--text-mute); }

/* --- Reviews ------------------------------------------------------------- */

.reviews-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 22px); margin-top: clamp(32px, 4vw, 48px);
}
.review-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-card); padding: clamp(20px, 2.2vw, 26px);
}
.review-card blockquote { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.stars { display: flex; gap: 3px; margin-top: 18px; color: var(--star); }
.stars .i { width: 15px; height: 15px; }

.reviewer { display: flex; align-items: center; gap: 11px; margin-top: 16px; }
.reviewer img,
.reviewer .avatar {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  object-fit: cover; background: var(--brand-wash);
}
.reviewer .avatar {
  display: grid; place-items: center;
  color: var(--brand);
  font-family: var(--font-display); font-weight: var(--weight-strong);
  font-size: 12.5px; letter-spacing: 0.02em;
}
.reviewer-name { font-size: 13.5px; font-weight: var(--weight-strong); line-height: 1.3; }
.reviewer-place { font-size: 12.5px; line-height: 1.3; color: var(--brand); }

/* --- Quote band ---------------------------------------------------------- */

.quote {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--text-on-ink);
  padding-block: var(--section-y-tight);
}
.quote-media { position: absolute; inset: 0 0 0 auto; width: 52%; }
.quote-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.quote-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
              var(--ink) 0%,
              color-mix(in srgb, var(--ink) 82%, transparent) 40%,
              color-mix(in srgb, var(--ink) 62%, transparent) 100%);
}

.quote-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.quote-copy .h2 { margin-top: 12px; }
.quote-copy > p { margin-top: 14px; color: var(--text-on-ink-mute); font-size: 15.5px; max-width: 420px; }

.contact-lines { display: flex; flex-wrap: wrap; gap: 18px 40px; margin-top: clamp(24px, 3vw, 34px); }
.contact-line { display: flex; gap: 12px; }
.contact-line .i { width: 22px; height: 22px; color: var(--text-on-ink); }
.contact-line b { display: block; font-family: var(--font-display); font-weight: var(--weight-strong); font-size: 15px; line-height: 1.35; }
.contact-line span { display: block; font-size: 13px; line-height: 1.4; color: var(--text-on-ink-mute); }

.quote-form {
  background: var(--paper-tint); border-radius: var(--radius-panel);
  padding: clamp(20px, 2.4vw, 26px); box-shadow: var(--shadow-lift);
  color: var(--text);
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: block; }
/* Stacked fields only. Fields inside .field-row are spaced by its grid gap; an
   unscoped `.field + .field` also matched the second field in the row and
   pushed it below the first. */
.quote-form > .field + .field,
.field-row + .field { margin-top: 14px; }
.field > span {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: var(--weight-strong); color: var(--text);
}
.field input, .field select {
  width: 100%; height: 42px; padding-inline: 12px;
  background: var(--paper); color: var(--text);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-size: 14px;
  transition: border-color var(--dur-quick) ease, box-shadow var(--dur-quick) ease;
}
.field input::placeholder { color: var(--text-mute); opacity: 0.75; }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
                    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.quote-form .btn { margin-top: 18px; }
.form-note { margin-top: 12px; font-size: 12px; color: var(--text-mute); text-align: center; }

/* --- Footer -------------------------------------------------------------- */

.footer { background: var(--ink-deep); color: var(--text-on-ink); }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(20px, 3vw, 40px); padding-block: 28px;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 32px); }
.footer-nav a { font-size: 14px; color: var(--text-on-ink-mute); transition: color var(--dur-quick) ease; }
.footer-nav a:hover { color: var(--text-on-ink); }

.socials { display: flex; gap: 16px; }
.socials a { color: var(--text-on-ink-mute); transition: color var(--dur-quick) ease; }
.socials a:hover { color: var(--text-on-ink); }
.socials .i { width: 19px; height: 19px; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 12.5px; color: var(--text-on-ink-mute);
}

/* --- Demo badge ----------------------------------------------------------
   DEMO ONLY. Marks the page as portfolio work rather than a real business.
   Delete this block together with the .demo-badge element in index.html. */

.demo-badge {
  position: fixed; z-index: 60;
  right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 13px;
  background: var(--ink); color: var(--text-on-ink);
  border: 1px solid var(--rule-on-ink); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur-quick) ease, background-color var(--dur-quick) ease;
}
/* Only when it is actually a link. The default badge is a plain <div>. */
a.demo-badge:hover { transform: translateY(-2px); background: var(--ink-deep); }
.demo-badge .i { width: 18px; height: 18px; color: var(--brand-light); }
.demo-badge b {
  display: block; font-family: var(--font-display);
  font-weight: var(--weight-strong); font-size: 13px; line-height: 1.3;
}
.demo-badge span span {
  display: block; font-size: 12px; line-height: 1.3; color: var(--text-on-ink-mute);
}

/* Scrolled to the bottom, the fixed badge lands on the footer's legal line.
   Scoped with :has() so deleting the badge also releases the reserved space. */
body:has(.demo-badge) .footer-bottom { padding-bottom: 96px; }

/* Icon and lead line only on phones. The badge can still clip the right end of
   a full-width button it sits over; at this size the rest stays tappable. */
@media (max-width: 560px) {
  .demo-badge { padding: 9px 14px; }
  .demo-badge span span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-badge { transition: none; }
  a.demo-badge:hover { transform: none; }
}

/* --- Reveal -------------------------------------------------------------- */

.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay:  70ms; }
.reveal[data-delay="2"] { transition-delay: 140ms; }
.reveal[data-delay="3"] { transition-delay: 210ms; }
.reveal[data-delay="4"] { transition-delay: 280ms; }
.reveal[data-delay="5"] { transition-delay: 350ms; }
.reveal[data-delay="6"] { transition-delay: 420ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service-card { transition: none; }
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .nav-links, .nav-tel-sub { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { gap: 14px; }

  /* The nav links only exist in this panel below 960px. */
  .nav-menu {
    display: none; border-top: 1px solid var(--rule);
    background: var(--paper); padding-block: 8px 16px;
  }
  .nav-menu.is-open { display: block; }
  .nav-menu ul { display: grid; gap: 2px; }
  /* Scoped to the list: an unscoped `.nav-menu a` also matches the CTA anchor
     and outranks .btn-brand on specificity, which strips its colour. */
  .nav-menu ul a {
    display: block; padding: 11px 4px;
    font-size: 15px; font-weight: var(--weight-medium); color: var(--text-mute);
  }
  .nav-menu ul a.is-active { color: var(--brand); font-weight: var(--weight-strong); }
  .nav-menu .btn { display: none; }

  .hero-media { width: 100%; }
  /* The photo sits behind the copy here rather than beside it, so the scrim
     has to carry the contrast on its own. */
  .hero-media::after {
    background: linear-gradient(180deg,
                color-mix(in srgb, var(--ink) 94%, transparent) 0%,
                color-mix(in srgb, var(--ink) 84%, transparent) 55%,
                color-mix(in srgb, var(--ink) 96%, transparent) 100%);
  }
  .why-grid, .quote-grid { grid-template-columns: minmax(0, 1fr); }
  .why-photo { min-height: 240px; }
}

@media (max-width: 820px) {
  .reviews-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-tel-num { font-size: 0; }          /* icon-only phone link on phones */
  .nav-tel .i { width: 20px; height: 20px; }

  /* The bar cannot hold brand + phone + CTA + toggle at this width without
     overflowing, so the CTA moves into the menu panel. */
  .nav-end > .btn { display: none; }
  .nav-menu .btn { display: flex; margin-top: 12px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 26px; height: 31px; }
}
