/* Keskin Structural Engineers: tokens and the shared parts (header, menu card, buttons, action bar, footer).
   One light theme, locked: the brief asks for a light page, so there is no switch and the system's dark mode
   does not change anything (data-theme="light" and color-scheme: light on <html>, no prefers-color-scheme rules).
   One accent, their logo red. One radius system: 8px for anything you press or type in, 14px for surfaces. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback (tools/fallbacks.mjs), so nothing moves when Manrope arrives. */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial");
  size-adjust: 104.4%;
  ascent-override: 102.1%;
  descent-override: 28.7%;
  line-gap-override: 0%;
}

:root {
  --paper: #f4f6f9;        /* page */
  --surface: #fbfcfd;      /* cards, header, form */
  --tint: #e9eef5;         /* blueprint panels */
  --line: #d3dae5;         /* hairlines, card borders */
  --grid: rgb(20 33 58 / 0.055); /* the blueprint grid */
  --ink: #14213a;          /* text, drawings */
  --ink-2: #4a5672;        /* secondary text */
  --accent: #b60029;       /* their logo red */
  --accent-deep: #8e0020;  /* hover and press */
  --on-accent: #fbfcfd;
  --dark: #14213a;         /* the one dark card */
  --on-dark: #f4f6f9;
  --on-dark-2: #b9c3d6;
  --error: #a1001f;

  --font: "Manrope", "Manrope Fallback", Arial, sans-serif;
  --r-ui: 8px;
  --r-card: 14px;
  --pad: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgb(20 33 58 / 0.06), 0 8px 24px rgb(20 33 58 / 0.07);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; font-weight: 450; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--pad); }
.skip-link { position: absolute; z-index: 30; inset-inline-start: 12px; top: -60px; padding: 10px 16px; border-radius: var(--r-ui); background: var(--ink); color: var(--on-dark); font-weight: 700; text-decoration: none; transition: transform 0.2s var(--ease); }
.skip-link:focus { transform: translateY(72px); }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.link { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { text-decoration-color: var(--accent); }

/* Placeholders the practice has to fill: square brackets, a dashed frame, never mistaken for a fact. */
.tbc { display: inline-block; padding: 0 6px; border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 4px; color: var(--accent); font-size: 0.85em; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: 0.08em; }

.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars .icon { width: 1.15em; height: 1.15em; }

/* ------------------------------------------------------------------ Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 20px; border: 2px solid transparent; border-radius: var(--r-ui); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: transform 0.15s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--on-dark); }
.btn--text { min-height: 44px; padding-inline: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.btn--text:hover { color: var(--accent-deep); }
.btn--big { min-height: 56px; padding-inline: 26px; font-size: 1.0625rem; }
.btn .icon { width: 1.2em; height: 1.2em; }

/* ------------------------------------------------------------------ Header */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.logo { display: block; flex: none; border-radius: 4px; }
.logo__img { width: auto; height: 40px; }
.nav__list { display: flex; gap: 4px; }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: var(--r-ui); font-weight: 600; text-decoration: none; }
.nav__link:hover { background: var(--tint); }
.site-header__end { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.btn--call { min-height: 44px; padding-inline: 16px; }
.site-header__request { min-height: 44px; }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border: 2px solid var(--ink); border-radius: var(--r-ui); background: transparent; }
.menu-btn .icon { width: 22px; height: 22px; }

@media (max-width: 67.99rem) {
  .js .nav { display: none; }
  .js .menu-btn { display: inline-grid; }
  .site-header__request { display: none; }
  /* Without scripts the links stay in the bar and wrap under the logo. */
  html:not(.js) .site-header { height: auto; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; row-gap: 0; padding-block: 12px; }
  html:not(.js) .nav { order: 3; width: 100%; }
  html:not(.js) .nav__list { flex-wrap: wrap; }
}
@media (max-width: 47.99rem) {
  :root { --header-h: 64px; }
  .logo__img { height: 34px; }
  .site-header__inner { gap: 12px; }
  .btn--call { width: 44px; padding: 0; }
  .btn--call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ------------------------------------------------------------------ Menu card (under 68rem) */
/* A card that scales out of the menu button's corner, its top edge a red steel beam. The hours at the top;
   the four sections as rows, each with an icon, its name and a short line, the section on screen marked; then
   the actions: request a visit across the full width, call and email side by side; the address last.
   The rows come in one after the other (transform and opacity, off under reduced motion). */
.menu-card { position: fixed; inset: calc(var(--header-h) - 6px) var(--pad) auto auto; width: min(380px, calc(100vw - 2 * var(--pad))); max-height: calc(100dvh - var(--header-h)); margin: 0; padding: 0 16px 16px; overflow: auto; border: 1px solid var(--line); border-top: 0; border-radius: var(--r-card); background: var(--surface); color: var(--ink); box-shadow: 0 2px 4px rgb(20 33 58 / 0.08), 0 24px 60px rgb(20 33 58 / 0.24); transform-origin: top right; }
.menu-card::before { content: ""; position: sticky; top: 0; display: block; height: 6px; margin-inline: -16px; background: var(--accent); }
.menu-card::backdrop { background: rgb(20 33 58 / 0.32); }
.menu-card[open] { animation: card-in 0.28s var(--ease); }
.menu-card.is-closing { animation: card-out 0.18s ease-in forwards; }
.menu-card.is-closing::backdrop { opacity: 0; transition: opacity 0.18s; }
@keyframes card-in { from { opacity: 0; transform: scale(0.88) translateY(-8px); } }
@keyframes card-out { to { opacity: 0; transform: scale(0.92) translateY(-6px); } }
.menu-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-inline: -16px; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--line); background-color: var(--tint); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; }
.menu-card__hours { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.menu-card__hours .icon { color: var(--accent); }
.menu-card__close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: var(--r-ui); background: transparent; }
.menu-card__close:hover { background: var(--surface); }
.menu-card__close .icon { width: 22px; height: 22px; }
.menu-card__list { display: grid; gap: 4px; margin-top: 12px; }
.menu-card__link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 64px; padding: 8px 10px 8px 8px; border-radius: var(--r-ui); text-decoration: none; }
.menu-card__link:hover { background: var(--paper); }
.menu-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-ui); background: var(--tint); color: var(--accent); }
.menu-card__icon .icon { width: 24px; height: 24px; }
.menu-card__text { display: grid; }
.menu-card__label { font-size: 1.125rem; font-weight: 800; line-height: 1.3; }
.menu-card__desc { font-size: 0.875rem; color: var(--ink-2); line-height: 1.4; }
.menu-card__arrow { color: var(--ink-2); transition: transform 0.2s var(--ease); }
.menu-card__link:hover .menu-card__arrow { transform: translateX(3px); }
.menu-card__link[aria-current="true"] { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.menu-card__link[aria-current="true"] .menu-card__icon { background: var(--accent); color: var(--on-accent); }
.menu-card__link[aria-current="true"] .menu-card__arrow { color: var(--accent); }
.menu-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.menu-card__request { grid-column: 1 / -1; min-height: 52px; }
.menu-card__where { margin-top: 12px; font-size: 0.8125rem; color: var(--ink-2); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .menu-card[open] .menu-card__list li, .menu-card[open] .menu-card__actions { animation: row-in 0.36s var(--ease) both; }
  .menu-card[open] .menu-card__list li:nth-child(1) { animation-delay: 0.04s; }
  .menu-card[open] .menu-card__list li:nth-child(2) { animation-delay: 0.08s; }
  .menu-card[open] .menu-card__list li:nth-child(3) { animation-delay: 0.12s; }
  .menu-card[open] .menu-card__list li:nth-child(4) { animation-delay: 0.16s; }
  .menu-card[open] .menu-card__actions { animation-delay: 0.2s; }
}
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }

/* The section on screen, marked in the desktop links too. */
.nav__link[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: var(--r-ui) var(--r-ui) 0 0; }

/* ------------------------------------------------------------------ Action bar (phones and tablets) */
/* Call and request, under the thumb, once the hero's own buttons have scrolled away (main.js); hidden again
   over the request form, where it would repeat itself. Without scripts it is always there. */
.action-bar { display: none; }
@media (max-width: 61.99rem) {
  .action-bar { position: fixed; z-index: 15; inset: auto 0 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transition: transform 0.3s var(--ease); }
  .action-bar .btn { min-height: 50px; }
  .js .action-bar:not(.is-shown) { transform: translateY(110%); }
  body { padding-bottom: 76px; }
}

/* ------------------------------------------------------------------ Pins (maps) */
.pin { position: absolute; left: var(--x); top: var(--y); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 5px var(--accent), 0 2px 6px rgb(20 33 58 / 0.3); }
.pin--office { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--accent); box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent), 0 4px 10px rgb(20 33 58 / 0.35); }
.pin--centre { --x: 50%; --y: 50%; }
.pin__label { position: absolute; inset-inline-start: calc(100% + 6px); top: 50%; transform: translateY(-50%); padding: 1px 7px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ink); font-size: 0.8125rem; font-weight: 800; white-space: nowrap; box-shadow: 0 1px 3px rgb(20 33 58 / 0.15); }
.pin--office .pin__label { color: var(--accent); }

/* ------------------------------------------------------------------ Footer */
/* The office on a small map, the details beside it, one quiet row for the note and credit. */
.site-footer { margin-top: clamp(64px, 9vw, 120px); padding-block: 56px 28px; background: var(--surface); border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px 48px; align-items: start; }
.site-footer__logo { width: auto; height: 36px; }
.site-footer__name { margin-top: 14px; font-weight: 800; font-size: 1.125rem; line-height: 1.3; }
.site-footer__line { margin-top: 4px; color: var(--ink-2); }
.site-footer__facts { display: grid; gap: 18px; }
.site-footer__facts dt { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.site-footer__facts dd { margin-top: 4px; font-weight: 600; overflow-wrap: anywhere; }
.site-footer__office { display: grid; gap: 14px; }
.site-footer__map { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); }
.site-footer__map img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.site-footer__map figcaption, .areas__map figcaption { position: absolute; inset: auto 8px 8px auto; padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink-2); font-size: 0.75rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }
@media (max-width: 61.99rem) {
  /* Brand and contact side by side; the office across the width, address beside its map. */
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__office { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
}
@media (max-width: 47.99rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .site-footer__office { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .site-footer__map img { aspect-ratio: 4 / 3; }
  .site-footer__legal { display: grid; }
}

/* ------------------------------------------------------------------ Page transitions */
/* Native cross-document view transitions (the 404 page to the homepage): the header stays put, the page
   under it fades. Browsers without support just load the page; off under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: vt-out 0.16s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in 0.3s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
