:root {
  --ink: #091725;
  --blue: #1258f4;
  --paper: #f7f8fa;
  --white: #ffffff;
  --muted: #627080;
  --line: #dce1e7;
  --green: #b8f227;
  --coral: #ff735d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans SC", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 248, 250, .88);
  border-bottom: 1px solid rgba(9, 23, 37, .1);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 11px; font-weight: 800; }
.brand img { width: 42px; height: 42px; object-fit: cover; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 42px); }
.site-header nav a { text-decoration: none; font-size: 13px; font-weight: 600; }
.site-header nav a:hover { color: var(--blue); }

.hero {
  position: relative;
  min-height: min(900px, 92vh);
  padding: 130px clamp(22px, 7vw, 112px) 74px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: absolute;
  inset: 68px 0 0;
  background-image: linear-gradient(rgba(9,23,37,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(9,23,37,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%);
}
.hero-logo {
  position: absolute;
  width: clamp(340px, 52vw, 760px);
  height: auto;
  top: 50%;
  right: clamp(-120px, 1vw, 40px);
  transform: translateY(-54%);
  opacity: .15;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; max-width: 900px; }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; color: var(--muted); }
.eyebrow span { width: 26px; height: 3px; background: var(--blue); }
.hero h1, .section-heading h2, .method-section h2, .contact-section h2 {
  margin: 0;
  font-size: clamp(52px, 9vw, 134px);
  line-height: .88;
  font-weight: 800;
}
.hero-lead { margin: 34px 0 0; font-size: clamp(21px, 2.4vw, 34px); font-weight: 600; }
.hero-note { margin: 10px 0 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }
.hero-link { margin-top: 34px; display: inline-flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 7px; }
.hero-link svg { width: 18px; }
.hero-index { position: absolute; right: clamp(22px, 5vw, 80px); bottom: 34px; font-size: 12px; font-weight: 800; color: var(--muted); }

.projects-section { padding: 110px clamp(20px, 5vw, 80px) 130px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 70px; align-items: end; margin-bottom: 70px; }
.section-heading h2 { font-size: clamp(42px, 6.2vw, 88px); line-height: .98; }
.section-heading > p { margin: 0 0 8px; max-width: 500px; color: var(--muted); line-height: 1.8; font-size: 15px; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.project-card {
  grid-column: span 6;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:nth-child(3n) { grid-column: span 12; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(9, 23, 37, .11); }
.project-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.project-media { aspect-ratio: 16 / 9; background: #e9edf2; overflow: hidden; position: relative; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-card:hover .project-media img { transform: scale(1.025); }
.project-number { position: absolute; top: 12px; right: 12px; min-width: 36px; height: 28px; padding: 0 8px; display: grid; place-items: center; background: rgba(255,255,255,.9); border: 1px solid rgba(9,23,37,.14); border-radius: 5px; font-size: 11px; font-weight: 800; }
.project-body { padding: 22px; }
.project-topline { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.project-body h3 { margin: 14px 0 10px; font-size: clamp(23px, 2.5vw, 34px); line-height: 1.15; }
.project-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.project-open { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.project-open svg { width: 17px; color: var(--blue); }

.method-section { padding: 110px clamp(20px, 5vw, 80px); background: var(--ink); color: var(--white); }
.section-heading.compact { display: block; margin-bottom: 70px; }
.eyebrow.light { color: #a9b3bd; }
.method-section h2 { font-size: clamp(46px, 7vw, 96px); }
.method-list { border-top: 1px solid rgba(255,255,255,.2); }
.method-list article { display: grid; grid-template-columns: 70px minmax(190px, .7fr) minmax(240px, 1fr); gap: 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.method-list b { color: var(--green); font-size: 12px; }
.method-list h3 { margin: 0; font-size: 24px; }
.method-list p { margin: 0; max-width: 600px; color: #aeb8c2; line-height: 1.7; }

.contact-section { min-height: 560px; padding: 100px clamp(20px, 7vw, 112px); display: grid; grid-template-columns: 180px 1fr auto; gap: 50px; align-items: center; background: var(--white); }
.contact-section > img { width: 180px; }
.contact-section h2 { font-size: clamp(48px, 7vw, 96px); }
.contact-links { display: flex; flex-direction: column; min-width: 220px; }
.contact-links a { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.contact-links a:hover { color: var(--blue); }
.contact-links svg { width: 18px; }
footer { padding: 22px clamp(20px, 5vw, 80px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.project-dialog { width: min(1120px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 7px; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.project-dialog::backdrop { background: rgba(5, 13, 22, .72); backdrop-filter: blur(7px); }
.dialog-shell { position: relative; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(390px, 1.1fr); min-height: 680px; }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; }
.dialog-close:hover { background: var(--ink); color: var(--white); }
.dialog-close svg { width: 19px; }
.dialog-media { background: #e9edf2; min-height: 100%; }
.dialog-media img { width: 100%; height: 100%; object-fit: cover; }
.dialog-content { padding: 64px clamp(28px, 5vw, 70px) 44px; overflow-y: auto; }
.dialog-meta { margin: 0 0 14px; color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dialog-content h2 { margin: 0; font-size: clamp(36px, 4vw, 58px); line-height: 1; }
.dialog-summary { margin: 22px 0 32px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.dialog-facts { border-top: 1px solid var(--line); }
.dialog-facts > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.dialog-facts span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.dialog-facts p { margin: 0; line-height: 1.7; font-size: 14px; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.dialog-tags span { padding: 7px 9px; border-radius: 5px; color: var(--muted); background: var(--paper); font-size: 11px; font-weight: 700; }
.dialog-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.dialog-links a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 15px; border-radius: 6px; background: var(--ink); color: var(--white); text-decoration: none; font-size: 12px; font-weight: 800; }
.dialog-links a.secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.dialog-links svg { width: 16px; }

@media (max-width: 820px) {
  .site-header { height: 60px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 12px; }
  .brand span { display: none; }
  .hero { min-height: 820px; padding-top: 112px; }
  .hero-logo { width: 520px; right: -200px; top: 38%; opacity: .12; }
  .section-heading { grid-template-columns: 1fr; gap: 28px; }
  .project-card, .project-card:nth-child(3n) { grid-column: span 12; }
  .method-list article { grid-template-columns: 42px 1fr; }
  .method-list p { grid-column: 2; }
  .contact-section { grid-template-columns: 90px 1fr; }
  .contact-section > img { width: 90px; }
  .contact-links { grid-column: 1 / -1; }
  .dialog-shell { grid-template-columns: 1fr; }
  .dialog-media { min-height: 300px; max-height: 340px; }
  .dialog-content { padding-top: 38px; }
}

@media (max-width: 520px) {
  .site-header nav a:nth-child(2) { display: none; }
  .hero { min-height: 720px; }
  .hero h1 { font-size: 54px; }
  .hero-index { display: none; }
  .projects-section, .method-section { padding-top: 84px; padding-bottom: 90px; }
  .project-body { padding: 18px; }
  .method-list h3 { font-size: 20px; }
  .contact-section { padding-top: 78px; padding-bottom: 78px; }
  footer { flex-direction: column; }
  .project-dialog { max-height: calc(100vh - 12px); width: calc(100vw - 12px); }
  .dialog-media { min-height: 230px; max-height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
