/* =========================================================
   ABH Design — Architecture & Design Studio
   Direction: "Drafting Catalogue"
   Cool graphite + concrete white, ultramarine accent,
   mono drafting labels, Amalfi-style roundness throughout.
   ========================================================= */

:root {
  /* Palette — cool concrete, not warm cream */
  --ink: #14151a;
  --ink-2: #24262e;
  --paper: #edeef0;
  --paper-2: #e3e5e9;
  --white: #ffffff;
  --muted: #797d87;
  --line: rgba(20, 21, 26, 0.12);
  --line-light: rgba(237, 238, 240, 0.18);
  --accent: #1b2bff;        /* ultramarine / blueprint blue, used sparingly */

  /* Roundness scale — the Amalfi trait */
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 24px 60px -28px rgba(20, 21, 26, 0.45);
  --shadow-soft: 0 10px 30px -18px rgba(20, 21, 26, 0.3);

  --font-display: "Archivo Expanded", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", ui-monospace, monospace;

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 92px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.015em;
}

/* Mono utility text — the drafting label system */
.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label { color: var(--accent); margin-bottom: 22px; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 104px) var(--gutter);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); box-shadow: var(--shadow-soft); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); }
.btn-outline-light { background: transparent; color: var(--paper); border-color: rgba(237, 238, 240, 0.5); }
.btn-outline-light:hover { background: rgba(237, 238, 240, 0.12); border-color: var(--paper); }
.btn-block { width: 100%; }

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--gutter);
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px 12px 24px;
  background: rgba(237, 238, 240, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  transition: background 0.3s ease;
}
.site-header.scrolled .nav { background: rgba(237, 238, 240, 0.92); }
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand-logo { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta-mobile { display: none; }
.nav-cta-desktop { padding: 11px 26px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: var(--header-h) var(--gutter) 0; max-width: var(--maxw); margin: 0 auto; }
.hero-media {
  position: relative;
  margin-top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-media img { width: 100%; height: min(84vh, 800px); object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(175deg, rgba(20,21,26,0.12) 0%, rgba(20,21,26,0.28) 45%, rgba(20,21,26,0.8) 100%);
}
/* faint blueprint grid — signature */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(237,238,240,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237,238,240,0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: overlay;
}
.hero-tag {
  position: absolute; top: 26px; left: clamp(22px, 4vw, 44px);
  z-index: 2; color: var(--paper);
  padding: 9px 18px;
  border: 1px solid rgba(237,238,240,0.32);
  border-radius: var(--radius-pill);
  background: rgba(20,21,26,0.22);
  backdrop-filter: blur(6px);
}
.hero-credit {
  position: absolute; bottom: 22px; right: clamp(22px, 4vw, 44px);
  z-index: 2; color: rgba(237,238,240,0.62); font-size: 0.66rem;
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(28px, 5vw, 64px);
  color: var(--paper); max-width: 860px;
}
.hero-title { font-size: clamp(2.8rem, 8vw, 6.2rem); font-weight: 800; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: block; transform: translateY(118%); }
.hero-sub { font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 520px; margin: 24px 0 32px; color: rgba(237,238,240,0.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== Intro ===== */
.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 1000px;
  margin: 0 0 56px;
}
/* Section rhythm — tighten every seam so adjacent paddings don't stack into dead bands */
.intro { padding-bottom: clamp(28px, 3.5vw, 44px); }
.work  { padding-top: clamp(28px, 3.5vw, 44px); padding-bottom: clamp(48px, 5vw, 72px); }
.services { padding-top: clamp(52px, 6vw, 80px); padding-bottom: clamp(52px, 6vw, 80px); }
.studio-split { padding-top: clamp(56px, 6vw, 84px); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-plate {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-plate:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.stat-label { color: var(--muted); font-size: 0.66rem; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }

/* ===== Section heads ===== */
.section-head { max-width: 760px; margin-bottom: 56px; }
.work .section-head,
.services .section-head { max-width: none; }
.section-title { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
.section-desc { color: var(--muted); font-size: 1.05rem; margin-top: 18px; }

/* ===== Work grid (catalogue) ===== */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.work-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.work-media img { width: 100%; height: 340px; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.work-card:hover .work-media img { transform: scale(1.06); }
.work-no {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  color: var(--paper); font-size: 0.68rem;
  padding: 7px 13px;
  background: rgba(20,21,26,0.45);
  border: 1px solid rgba(237,238,240,0.28);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}
.work-meta { padding: 20px 4px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.work-meta h3 { font-size: 1.3rem; font-weight: 600; }
.work-meta .mono { color: var(--muted); margin-top: 8px; }

/* ===== Services band ===== */
.services-band { background: var(--paper-2); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 30px 36px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.service-no { display: block; color: var(--accent); margin-bottom: 28px; }
.service-card h3 {
  position: relative;
  font-size: 1.35rem; font-weight: 600;
  margin-bottom: 12px; padding-bottom: 14px;
}
.service-card h3::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 26px; height: 2px; background: var(--line);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}
.service-card:hover h3::after { width: 52px; background: var(--accent); }
.service-card p { color: var(--muted); font-size: 0.97rem; }

/* ===== Studio split ===== */
.studio-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.studio-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.studio-media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.studio-text p:not(.label) { color: var(--ink-2); margin: 20px 0 0; }
.studio-text .section-title { margin-bottom: 8px; }
.studio-text .btn { margin-top: 30px; }

/* ===== Contact ===== */
.contact-band { background: var(--ink); padding: clamp(56px, 7vw, 96px) var(--gutter) clamp(40px, 4.5vw, 60px); }
.contact-card {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-card);
}
.contact-intro .section-title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.contact-blurb { color: var(--muted); margin: 18px 0 32px; }
.contact-details { display: grid; gap: 18px; }
.contact-details li { display: flex; flex-direction: column; gap: 4px; }
.contact-details .mono { color: var(--muted); font-size: 0.66rem; }
.contact-details a, .contact-details li > span:last-child { font-size: 1.05rem; }
.contact-details a:hover { color: var(--accent); }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-2); font-size: 0.66rem; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white); color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27, 43, 255, 0.12); }
.form-status { margin: 2px 0 0; color: var(--accent); min-height: 1.1em; text-transform: none; letter-spacing: 0.02em; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(40px, 4.5vw, 60px) var(--gutter) 28px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-light);
}
.footer-logo { height: 34px; filter: brightness(0) invert(1); } /* <img> can't take currentColor — force white */
.footer-brand p { color: rgba(237,238,240,0.62); margin-top: 18px; max-width: 280px; }
.footer-head { color: rgba(237,238,240,0.5); margin-bottom: 18px; }
.footer-nav, .footer-social { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a, .footer-social a { font-size: 0.97rem; transition: color 0.2s ease; }
.footer-nav a:hover, .footer-social a:hover { color: var(--accent); }
.footer-base {
  max-width: var(--maxw); margin: 24px auto 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-base .mono { color: rgba(237,238,240,0.45); font-size: 0.66rem; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Page-load orchestration ===== */
/* easing used throughout the entrance */
.site-header,
.hero-tag,
.hero-sub,
.hero-actions { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.site-header { transform: translateY(-18px); }
.hero-title .line > span { transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.hero-media img { transform: scale(1.12); transition: transform 1.9s cubic-bezier(0.16, 1, 0.3, 1); }

body.loaded .site-header { opacity: 1; transform: none; transition-delay: 0.05s; }
body.loaded .hero-media img { transform: scale(1); }
body.loaded .hero-tag { opacity: 1; transform: none; transition-delay: 0.15s; }
body.loaded .hero-title .line:nth-child(1) > span { transform: none; transition-delay: 0.28s; }
body.loaded .hero-title .line:nth-child(2) > span { transform: none; transition-delay: 0.38s; }
body.loaded .hero-title .line:nth-child(3) > span { transform: none; transition-delay: 0.48s; }
body.loaded .hero-sub { opacity: 1; transform: none; transition-delay: 0.62s; }
body.loaded .hero-actions { opacity: 1; transform: none; transition-delay: 0.74s; }

/* ===== Hover micro-interactions ===== */
/* animated nav underline */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* project card: darkening wash + "View project" pill on hover */
.work-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(20, 21, 26, 0.42), transparent 48%);
  opacity: 0; transition: opacity 0.45s ease;
}
.work-media::after {
  content: "View project";
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  padding: 9px 16px; border-radius: var(--radius-pill);
  transform: translateY(16px); opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}
.work-card:hover .work-media::before { opacity: 1; }
.work-card:hover .work-media::after { transform: none; opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .studio-split, .contact-card { grid-template-columns: 1fr; }
  .studio-media { min-height: 320px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-cta-desktop { display: none; }
  .nav-cta-mobile { display: block; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: calc(100% + 12px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 20px;
    background: rgba(237, 238, 240, 0.97);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 10px 6px; }
  .nav-cta-mobile .btn { margin-top: 8px; }
  .hero-credit { display: none; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .service-card:hover, .work-card:hover .work-media img { transform: none; }
  .site-header, .hero-tag, .hero-sub, .hero-actions { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
  .hero-media img { transform: none; }
}
