/* ==========================================================================
   Blu Line Design Studios — site styles
   Hand-written, no build step. Mirrors the original Tailwind output, with
   contrast, target-size and focus fixes applied. See README.md.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  --ink: #111111;
  --paper: #f8f8f7;
  --blu: #0047ab;
  --stone: #e5e5e1;

  /* Lifted blue for use on the dark section. #0047ab on #111 is 2.24:1;
     this is 5.17:1 and reads as the same brand blue. */
  --blu-light: #4a86dd;

  /* Muted inks. Every value below clears 4.5:1 on --paper.
     0.60 = 4.87:1   0.65 = 5.75:1   0.70 = 6.91:1   0.80 = 9.91:1 */
  --ink-60: rgba(17, 17, 17, 0.6);
  --ink-65: rgba(17, 17, 17, 0.65);
  --ink-70: rgba(17, 17, 17, 0.7);
  --ink-80: rgba(17, 17, 17, 0.8);

  --hair: rgba(17, 17, 17, 0.1);
  --hair-soft: rgba(17, 17, 17, 0.05);
  --hair-strong: rgba(17, 17, 17, 0.2);

  /* On ink: 0.55 = 5.91:1, 0.60 = 6.87:1 */
  --paper-55: rgba(248, 248, 247, 0.55);
  --paper-60: rgba(248, 248, 247, 0.6);
  --paper-hair: rgba(248, 248, 247, 0.2);

  --danger: #b3261e;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --wrap: 1280px;
  --pad: 20px;
  --nav-h: 76px;
}

@media (min-width: 640px) {
  :root { --pad: 24px; }
}
@media (min-width: 768px) {
  :root { --pad: 40px; --nav-h: 88px; }
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
iframe { display: block; max-width: 100%; }

img { height: auto; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 700; }

address { font-style: normal; }

::selection {
  background-color: var(--blu);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   3. Focus + skip link
   -------------------------------------------------------------------------- */

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--blu);
  outline-offset: 3px;
}

.services :where(a, button, input, textarea, [tabindex]):focus-visible {
  outline-color: var(--blu-light);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translateY(-120%);
  transition: transform 150ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Enlarges a control's hit area to >=44px without changing how it looks.
   Used on the small text links and chips. */
.tap {
  position: relative;
}

.tap::after {
  content: "";
  position: absolute;
  inset: -10px 0;
}

.tap--wide::after { inset: -15px -8px; }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.section {
  padding: 64px var(--pad);
  scroll-margin-top: 80px;
}

@media (min-width: 640px) { .section { padding-block: 96px; } }
@media (min-width: 768px) { .section { padding-block: 128px; } }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
}

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blu);
}

.rule {
  height: 1px;
  width: 100%;
  background: var(--hair-strong);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: var(--ink);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.nav.is-solid {
  background: rgba(248, 248, 247, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--hair-soft);
}

.nav__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px var(--pad);
}

@media (min-width: 768px) {
  .nav__bar {
    display: flex;
    justify-content: space-between;
    padding-block: 24px;
  }
}

/* overflow:hidden (for the ellipsis) would clip a .tap overlay, so the hit
   area comes from padding cancelled by an equal negative margin. */
.nav__logo {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-block: 10px;
  margin-block: -10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
}

@media (min-width: 640px) { .nav__logo { font-size: 18px; } }
@media (min-width: 768px) { .nav__logo { font-size: 20px; } }

.nav__logo span { color: var(--blu); }

.nav__links {
  display: none;
  gap: 40px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 768px) { .nav__links { display: flex; } }

.nav__links a { transition: color 150ms ease; }
.nav__links a:hover { color: var(--blu); }

.nav__toggle {
  display: grid;
  place-items: center;
  justify-self: end;
  height: 44px;
  width: 44px;
  flex-shrink: 0;
}

@media (min-width: 768px) { .nav__toggle { display: none; } }

.nav__toggle span {
  display: grid;
  gap: 6px;
}

.nav__toggle span span {
  display: block;
  height: 1px;
  width: 24px;
  background: currentColor;
  transition: transform 200ms ease, opacity 150ms ease;
}

.nav__toggle[aria-expanded="true"] span span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */

.nav__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: calc(100svh - var(--nav-h));
  overflow-y: auto;
  padding: 32px var(--pad);
  background: var(--paper);
  border-top: 1px solid var(--hair);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.12);
}

.nav__menu[hidden] { display: none; }

@media (min-width: 768px) { .nav__menu { display: none; } }

.nav__menu-list {
  display: flex;
  flex-direction: column;
}

.nav__menu-list a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding-block: 20px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.nav__menu-list a:hover { color: var(--blu); }

.nav__menu-list b {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--blu);
}

.nav__menu-list em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.nav__menu-contact {
  display: grid;
  margin-top: 40px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-65);
}

.nav__menu-contact a {
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: color 150ms ease;
}
.nav__menu-contact a:hover { color: var(--blu); }
.nav__menu-contact a:first-child { word-break: break-all; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px var(--pad) 48px;
}

@media (min-width: 640px) {
  .hero {
    min-height: 100svh;
    padding-top: 128px;
    padding-bottom: 64px;
  }
}

@media (min-width: 768px) { .hero { padding-bottom: 80px; } }

.hero__grid {
  row-gap: 32px;
  align-items: end;
}

.hero__col {
  grid-column: span 12;
  min-width: 0;
}

@media (min-width: 1024px) {
  .hero__col { grid-column: span 7; }
}

.hero__eyebrow {
  display: block;
  margin-bottom: 16px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

@media (min-width: 640px) { .hero__eyebrow { letter-spacing: 0.3em; } }
@media (min-width: 768px) { .hero__eyebrow { font-size: 12px; margin-bottom: 40px; } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  /* Base */
  font-size: clamp(2.75rem, 13vw, 12rem);
}

@media (min-width: 640px) { .hero__title { letter-spacing: -0.03em; } }

/* Fallback for browsers without container queries: 13vw overflows the 7-column
   box between 1024px and ~1600px, which is what split "VISIONARY," mid-word. */
@media (min-width: 1024px) and (max-width: 1600px) {
  .hero__title { font-size: 10vw; }
}

/* Preferred: size the headline off the column it actually sits in, so neither
   line can exceed the measure at any viewport width.
   "Visionary," renders at ~4.85x the font size and "For You." at ~4.08x, so
   19.5cqi type against a 16cqi indent keeps both on one line with slack. */
@supports (container-type: inline-size) {
  .hero__col { container-type: inline-size; }
  .hero__title { font-size: clamp(2.75rem, min(13vw, 19.5cqi), 12rem); }
}

.hero__title b {
  display: block;
  padding-left: 4vw;
  color: var(--blu);
  font-weight: inherit;
}

@media (min-width: 640px) { .hero__title b { padding-left: 8vw; } }
@media (min-width: 1024px) { .hero__title b { padding-left: 10vw; } }

@supports (container-type: inline-size) {
  @media (min-width: 1024px) {
    .hero__title b { padding-left: 16cqi; }
  }
}

.hero__aside {
  grid-column: span 12;
  min-width: 0;
}

@media (min-width: 1024px) {
  .hero__aside {
    grid-column: 9 / span 4;
  }
}

.hero__lede {
  max-width: 448px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--ink-80);
}

@media (min-width: 640px) { .hero__lede { font-size: 16px; } }
@media (min-width: 768px) { .hero__lede { font-size: 18px; } }

.hero__rule { margin-top: 24px; }

.hero__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

@media (min-width: 420px) { .hero__actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .hero__actions { grid-template-columns: max-content max-content; } }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid:hover { background: var(--blu); }

.btn--ghost {
  border: 1px solid var(--hair-strong);
}

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

/* --------------------------------------------------------------------------
   8. Projects
   -------------------------------------------------------------------------- */

.projects__head {
  row-gap: 16px;
  align-items: end;
  margin-bottom: 40px;
}

@media (min-width: 768px) { .projects__head { margin-bottom: 80px; } }

.projects__head h2 {
  grid-column: span 12;
  font-family: var(--font-display);
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

@media (min-width: 768px) { .projects__head h2 { font-size: 48px; line-height: 1; } }
@media (min-width: 1024px) { .projects__head h2 { grid-column: span 8; } }

.projects__head p {
  grid-column: span 12;
  font-size: 14px;
  line-height: 1.625;
  color: var(--ink-65);
}

@media (min-width: 1024px) { .projects__head p { grid-column: span 4; } }

.projects__list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 768px) { .projects__list { gap: 32px; } }

.project { grid-column: span 12; }

@media (min-width: 1024px) {
  .project--lead { grid-column: span 8; }
  .project--tall { grid-column: span 4; margin-top: 96px; }
}

.project--wide { margin-top: 32px; }

@media (min-width: 768px) { .project--wide { margin-top: 64px; } }

.project__frame {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--stone);
  outline: 1px solid rgba(0, 0, 0, 0.05);
  outline-offset: -1px;
  cursor: zoom-in;
}

.project__frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.project__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.project__frame:hover img { transform: scale(1.03); }
.project--wide .project__frame:hover img { transform: scale(1.02); }

.project--lead .project__frame { aspect-ratio: 16 / 10; }
.project--tall .project__frame { aspect-ratio: 3 / 4; }
.project--wide .project__frame { aspect-ratio: 21 / 9; }

.project__meta {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .project__meta {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
  }
}

.project__meta h3 {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
}

@media (min-width: 768px) { .project__meta h3 { font-size: 24px; } }

.project__meta span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

@media (min-width: 640px) {
  .project__meta span { flex-shrink: 0; margin-top: 4px; }
}

/* --------------------------------------------------------------------------
   9. Services (dark)
   -------------------------------------------------------------------------- */

.services {
  background: var(--ink);
  color: var(--paper);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) { .services__grid { gap: 48px; } }

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .services__intro { grid-column: span 4; }
  .services__items { grid-column: 6 / span 7; }
}

.services__intro { min-width: 0; }

.services__intro .eyebrow {
  color: var(--blu-light);
  margin-bottom: 24px;
}

.services__intro h2 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

@media (min-width: 768px) { .services__intro h2 { font-size: 48px; } }

.services__intro p {
  max-width: 384px;
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.625;
  color: var(--paper-60);
}

@media (min-width: 768px) { .services__intro p { font-size: 16px; } }

.tags {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 40px;
  max-width: 100%;
}

@media (min-width: 360px) { .tags { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .tags { display: flex; flex-wrap: wrap; } }

.tag {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid var(--paper-hair);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  overflow-wrap: break-word;
}

.services__items {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.services__items ol {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 40px;
  row-gap: 40px;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) { .services__items ol { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .services__items ol { row-gap: 56px; } }

.services__items li {
  min-width: 0;
  padding-top: 24px;
  border-top: 1px solid var(--paper-hair);
}

.services__items b {
  display: block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--blu-light);
}

.services__items h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

@media (min-width: 768px) { .services__items h3 { font-size: 20px; } }

.services__items p {
  font-size: 14px;
  line-height: 1.625;
  color: var(--paper-55);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */

.contact {
  border-top: 1px solid var(--hair-soft);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.contact__intro { min-width: 0; }

.contact__intro .eyebrow { margin-bottom: 24px; }

.contact__title {
  margin-bottom: 40px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

@media (min-width: 640px) { .contact__title { margin-bottom: 48px; } }

.contact__lines {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
}

@media (min-width: 640px) { .contact__lines { font-size: 18px; } }
@media (min-width: 768px) { .contact__lines { font-size: 20px; } }

/* min-height gives each line a 44px touch target; the ::after in .tap is not
   used here because the rows would overlap. */
.contact__lines a {
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: color 150ms ease;
}

.contact__lines a:hover { color: var(--blu); }
.contact__lines a:first-child { word-break: break-all; }

.contact__studio { margin-top: 48px; }

@media (min-width: 1024px) { .contact__studio { margin-top: 64px; } }

.contact__label {
  display: block;
  margin-bottom: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blu);
}

.contact__label + .contact__label,
.contact__studio p + .contact__label,
.contact__studio address + .contact__label { margin-top: 40px; }

.contact__studio address,
.contact__studio p {
  max-width: 384px;
  font-size: 14px;
  line-height: 1.625;
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .contact__studio address,
  .contact__studio p { font-size: 16px; }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.badges span {
  padding: 6px 12px;
  border: 1px solid var(--hair-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.contact__side { min-width: 0; }

@media (min-width: 1024px) {
  .contact__side {
    padding-left: 48px;
    border-left: 1px solid var(--hair);
  }
}

.colophon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--hair);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

@media (min-width: 768px) {
  .colophon { flex-direction: row; margin-top: 128px; }
}

/* --------------------------------------------------------------------------
   11. Form
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: 24px;
}

.form > .contact__label { margin-bottom: 0; }

.field { display: grid; gap: 4px; }

.field--group {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.field--group legend {
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field__head label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

.field__error {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--danger);
}

.field__error:empty { display: none; }

/* Scoped to the text controls on purpose: a bare `.field input` also matches
   the visually-hidden radios in the Project Type group and would stretch them
   across the page. */
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding-block: 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  border-radius: 0;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 150ms ease;
}

.field textarea { resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-60); }

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field textarea:focus { border-bottom-color: var(--blu); }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: var(--danger); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

/* Native radios, visually hidden; the labels are the pills. Keyboard and
   screen-reader behaviour come for free, and the group works without JS. */
.chip {
  position: relative;
  padding: 6px 12px;
  border: 1px solid var(--hair-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-70);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

/* 29px pill -> 45px hit area, without changing how it looks. */
.chip::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}

.chip:hover { border-color: var(--ink); }

.chips input:checked + .chip {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chips input:focus-visible + .chip {
  outline: 2px solid var(--blu);
  outline-offset: 3px;
}

.form__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 420px) {
  .form__foot { flex-direction: row; align-items: center; justify-content: space-between; }
}

.form__submit {
  width: auto;
  padding-inline: 24px;
  flex-shrink: 0;
}

.form__status {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blu);
}

.form__status:empty { display: none; }

/* Fallback panel — shown after submit so a missing mail client never loses
   the enquiry silently. */
.fallback {
  margin-top: 4px;
  padding: 20px;
  border: 1px solid var(--hair-strong);
  background: rgba(229, 229, 225, 0.4);
}

.fallback[hidden] { display: none; }

.fallback h3 {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.fallback p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-70);
}

.fallback pre {
  max-height: 180px;
  margin: 12px 0;
  padding: 12px;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--hair);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.fallback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fallback__actions a,
.fallback__actions button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--hair-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.fallback__actions a:hover,
.fallback__actions button:hover { border-color: var(--ink); }

.noscript {
  padding: 16px;
  border: 1px solid var(--hair-strong);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-70);
}

/* --------------------------------------------------------------------------
   12. Map
   -------------------------------------------------------------------------- */

.map { margin-top: 48px; }

@media (min-width: 1024px) { .map { margin-top: 64px; } }

.map__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.map__head .contact__label { margin-bottom: 0; }

.map__open {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
  transition: color 150ms ease;
}

.map__open:hover { color: var(--blu); }

.map__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.15);
  background: var(--stone);
}

.map__frame iframe {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  border: 0;
}

.map__pin {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 8px;
  background: rgba(248, 248, 247, 0.9);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   13. Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  width: min(100vw - 32px, 1400px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.lightbox::backdrop { background: rgba(17, 17, 17, 0.88); }

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: var(--stone);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.lightbox__bar p { min-width: 0; }

.lightbox__bar em {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox__bar span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-65);
}

.lightbox__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--hair-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lightbox__close:hover { border-color: var(--ink); }

/* --------------------------------------------------------------------------
   14. 404
   -------------------------------------------------------------------------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px var(--pad);
  text-align: center;
}

.notfound__inner { max-width: 34rem; }

.notfound .eyebrow { margin-bottom: 16px; }

.notfound h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.notfound h2 {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
}

.notfound p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.625;
  color: var(--ink-65);
}

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.notfound__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--hair-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: border-color 150ms ease, color 150ms ease;
}

.notfound__links a:hover { border-color: var(--ink); color: var(--blu); }

.notfound__cta {
  width: auto;
  margin-top: 16px;
  padding-inline: 24px;
}

.notfound__contact { margin-top: 32px; }

.notfound__contact a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notfound__contact a:hover { color: var(--blu); }

/* --------------------------------------------------------------------------
   15. Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .project__frame:hover img { transform: none; }
}
