/* =========================================================
   Urbanpro — design system v2
   Swiss editorial / technical. Photography-led. Light + dark.
   ========================================================= */

:root {
  /* light theme (default) */
  --bg: #ffffff;
  --surface: #f4f3f1;
  --surface-strong: #ececea;
  --ink: #131417;
  --ink-soft: #55585d;
  --ink-faint: #8a8d92;
  --line: #dedcd8;
  --line-strong: #131417;
  --accent: #d8402a;
  --accent-ink: #ffffff;
  --overlay-scrim: rgba(19, 20, 23, 0.55);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --container: 1280px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

:root[data-theme="dark"] {
  --bg: #161616;
  --surface: #1f1f1f;
  --surface-strong: #272727;
  --ink: #f2f1ee;
  --ink-soft: #b7b5b0;
  --ink-faint: #817f7b;
  --line: #333331;
  --line-strong: #f2f1ee;
  --accent: #ff5b3d;
  --accent-ink: #161616;
  --overlay-scrim: rgba(10, 10, 10, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

.display {
  text-transform: lowercase;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }
}

/* -------------------- reveal-on-scroll -------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .draw-line i {
    transform: none !important;
  }
}

/* signature motif: a technical line that draws itself in */
.draw-line {
  display: block;
  width: 100%;
  max-width: 64px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.draw-line i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease) 0.1s;
}

.reveal.is-visible .draw-line i {
  transform: translateX(0);
}

/* -------------------- eyebrow / labels -------------------- */

.eyebrow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* -------------------- buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-outline.on-dark {
  color: var(--bg);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline.on-dark:hover {
  background: var(--bg);
  color: var(--ink);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
}

.btn-text:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 12px;
}

/* -------------------- theme toggle -------------------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: var(--surface);
}

.theme-toggle button {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-faint);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.theme-toggle button svg {
  width: 15px;
  height: 15px;
}

.theme-toggle button.is-active {
  background: var(--ink);
  color: var(--bg);
}

/* -------------------- header -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header.nav-open {
  backdrop-filter: none;
  background: var(--bg);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo .mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.logo .mark .mark-bg {
  fill: var(--ink);
}

.logo .mark .mark-fg {
  fill: var(--bg);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo .tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-top: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 80px 0 0 0;
    z-index: 60;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 20px;
    gap: 2px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    overflow-y: auto;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav a {
    width: 100%;
    padding: 15px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }

  .header-actions .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

/* =========================================================
   The composition — one continuous scroll, not stacked sections.
   ========================================================= */

.composition {
  position: relative;
}

.composition > :where(section) {
  padding: 0;
}

.act-expertise {
  padding: clamp(72px, 11vh, 150px) 0 clamp(130px, 20vh, 230px);
}

.act-work {
  padding: clamp(56px, 8vh, 120px) 0 clamp(150px, 22vh, 250px);
}

.act-people {
  padding: clamp(72px, 11vh, 150px) 0 clamp(130px, 19vh, 220px);
}

.act-credentials {
  padding: clamp(96px, 15vh, 190px) 0 clamp(130px, 20vh, 230px);
  background: var(--surface);
}

.act-news {
  padding: clamp(72px, 11vh, 150px) 0 clamp(130px, 20vh, 230px);
}

/* ---- Act hero — a short line, and the work orbiting beside it ---- */

.act-hero {
  padding: clamp(130px, 20vh, 210px) 0 0;
}

.act-hero .container {
  margin-bottom: clamp(48px, 7vh, 96px);
}

.thesis-text {
  font-size: clamp(30px, 5.6vw, 76px);
  max-width: 17ch;
  line-height: 1.05;
}

.thesis-text .accent {
  color: var(--accent);
}

.hero-phrase {
  font-size: clamp(34px, 5vw, 60px);
  max-width: 13ch;
  line-height: 1.06;
}

.rotator-line {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin: 22px 0 0;
  font-size: 17px;
  color: var(--ink-soft);
}

.rotator {
  display: inline-block;
  height: 1.3em;
  overflow: hidden;
  position: relative;
  vertical-align: top;
}

.rotator-track {
  display: flex;
  flex-direction: column;
}

.rotator-word {
  height: 1.3em;
  line-height: 1.3em;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .rotator-line {
    flex-wrap: wrap;
  }
}

/* the hero puzzle: one photo, cut into four, each piece falls into its
   slot on load — a single settle, not a loop. */

.hero-puzzle {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(340px, 64vh, 760px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr;
  overflow: hidden;
  background: var(--surface-strong);
}

.hero-puzzle-piece {
  background-size: 400% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  transform: translateY(-100%);
  transition: transform 1s var(--ease), opacity 0.8s var(--ease);
}

.hero-puzzle.is-in .hero-puzzle-piece {
  opacity: 1;
  transform: translateY(0);
}

.hero-puzzle-piece:nth-child(1) {
  transition-delay: 0s;
}

.hero-puzzle-piece:nth-child(2) {
  transition-delay: 0.15s;
}

.hero-puzzle-piece:nth-child(3) {
  transition-delay: 0.3s;
}

.hero-puzzle-piece:nth-child(4) {
  transition-delay: 0.45s;
}

@media (max-width: 900px) {
  .act-hero {
    padding: clamp(100px, 16vh, 160px) 0 0;
  }

  .hero-puzzle {
    height: clamp(260px, 46vh, 460px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-puzzle-piece {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- mask reveal, used for every large statement ---- */

.mask {
  overflow: hidden;
}

.mask > * {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
}

.mask.is-visible > * {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .mask > * {
    transform: none;
    transition: none;
  }
}

/* ---- the index: shared by expertise / work / people / credentials ---- */

.act-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 40px;
}

.index-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.index-list {
  border-top: 1px solid var(--line);
}

.index-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.index-row .n {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.index-row .t {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  text-transform: lowercase;
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}

.index-row .m {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  white-space: nowrap;
}

.index-row:hover .t,
.index-row.is-active .t {
  color: var(--accent);
  transform: translateX(10px);
}

.index-row:hover .m,
.index-row.is-active .m {
  opacity: 1;
}

.index-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease);
}

.index-row.is-open + .index-detail {
  max-height: 240px;
}

.index-row.is-hidden {
  display: none;
}

.index-row.is-hidden + .index-detail {
  display: none;
}

.index-detail-inner {
  padding: 4px 0 28px 64px;
  max-width: 60ch;
  font-size: 15px;
  color: var(--ink-soft);
}

.index-stage {
  position: sticky;
  top: 100px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-strong);
}

.index-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.7s var(--ease), transform 1.1s var(--ease);
}

.index-stage img.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 860px) {
  .index-grid {
    grid-template-columns: 1fr;
  }
  .index-stage {
    position: relative;
    top: 0;
    order: -1;
  }
  .index-row .m {
    display: none;
  }
}

/* ---- close ---- */

.act-close {
  padding: clamp(110px, 17vh, 210px) 0 clamp(90px, 14vh, 170px);
}

.close-text {
  font-size: clamp(26px, 4vw, 52px);
  max-width: 16ch;
  margin-bottom: 24px;
}

/* -------------------- stats -------------------- */

.stat-bar {
  padding: 72px 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  color: var(--ink);
  display: block;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 780px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }
}

/* -------------------- sections -------------------- */

section {
  padding: 96px 0;
}

.section-tight {
  padding: 64px 0;
}

.section-dark {
  background: var(--ink);
  color: var(--bg);
}

:root[data-theme="dark"] .section-dark {
  background: #000;
}

.section-dark p {
  color: var(--ink-faint);
}

.section-dark h2 {
  color: var(--bg);
}

.section-raised {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(30px, 4.6vw, 64px);
  max-width: 14ch;
}

.section-head p {
  max-width: 42ch;
  margin: 0;
}

@media (max-width: 720px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  section {
    padding: 64px 0;
  }
}

/* -------------------- service cards -------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
}

.service-card {
  transition: transform 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-3px);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.service-card h3 {
  font-size: 21px;
  margin: 12px 0 8px;
  font-weight: 700;
}

.service-card p {
  font-size: 14.5px;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------- project cards / photography -------------------- */

.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-strong);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.project-card:hover .shot img {
  transform: scale(1.06);
}

.project-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.8fr 1fr;
  gap: 64px 28px;
}

.project-grid .project-card:nth-child(3n+2) {
  margin-top: 84px;
}

.project-grid .project-card:nth-child(3n) {
  margin-top: 32px;
}

.project-card {
  overflow: hidden;
}

.project-card-body {
  padding: 20px 0 0;
}

.project-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.project-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
  font-weight: 700;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 12px;
}

@media (max-width: 980px) {
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-grid .project-card:nth-child(3n+2) {
    margin-top: 56px;
  }
  .project-grid .project-card:nth-child(3n) {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-grid .project-card {
    margin-top: 0 !important;
  }
}

/* -------------------- filters -------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 48px;
}

.filter-bar::after {
  content: none;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.filter-btn:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: var(--line);
}

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

.filter-btn.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* -------------------- catalog table -------------------- */

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.catalog-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.catalog-table-wrap {
  overflow-x: auto;
}

table.catalog-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.catalog-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 18px 14px 0;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.catalog-table td {
  padding: 18px 18px 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}

.catalog-table tr:last-child td {
  border-bottom: none;
}

.catalog-table tr.is-hidden {
  display: none;
}

.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.badge-public,
.badge-built {
  color: var(--ink);
}

.catalog-note {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* below 900px the table becomes a stacked list of label/value rows —
   no horizontal scroll, no shrunk-sideways text. */

@media (max-width: 899px) {
  .catalog-table-wrap {
    overflow-x: visible;
  }

  table.catalog-table {
    display: block;
    min-width: 0;
  }

  .catalog-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .catalog-table tbody,
  .catalog-table tr {
    display: block;
    width: 100%;
  }

  .catalog-table tr {
    padding: 24px 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .catalog-table tr:first-child {
    padding-top: 0;
  }

  .catalog-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 6px 0;
    border-bottom: none;
  }

  .catalog-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }

  .catalog-table td[data-label="Объект"] {
    justify-content: flex-start;
    padding: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
  }

  .catalog-table td[data-label="Объект"]::before {
    content: none;
  }
}

/* -------------------- news / blog -------------------- */

.news-list {
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  padding-top: 4px;
}

.news-body h2 {
  font-size: 21px;
  margin-bottom: 10px;
}

.news-body p {
  font-size: 15px;
  max-width: 68ch;
  margin-bottom: 0;
}

.news-image {
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  max-width: 480px;
  overflow: hidden;
  background: var(--surface-strong);
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-link {
  display: inline-block;
  margin-top: 14px;
}

.news-status {
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 15px;
}

@media (max-width: 640px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* -------------------- org chart -------------------- */

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.org-level {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  padding-bottom: 40px;
}

.org-level::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 40px;
  background: var(--line);
}

.org-level:last-child::after {
  display: none;
}

.org-node {
  padding: 4px 20px;
  min-width: 190px;
  text-align: center;
}

.org-node.is-lead .org-name {
  color: var(--accent);
}

.org-node .org-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.org-node .org-name {
  font-weight: 600;
  font-size: 14px;
}

.org-branch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* -------------------- team -------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}

.team-card {
  text-align: left;
}

.team-photo {
  aspect-ratio: 3 / 4;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.team-photo svg {
  width: 40%;
  opacity: 0.4;
}

.team-photo-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.team-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

@media (max-width: 980px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------------------- licenses -------------------- */

.license-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
}

.license-card {
  display: flex;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.license-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.license-icon svg {
  width: 22px;
  height: 22px;
}

.license-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}

.license-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
}

@media (max-width: 720px) {
  .license-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------- timeline -------------------- */

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.timeline-item h3 {
  font-size: 17px;
  margin: 4px 0 6px;
  font-weight: 700;
}

/* -------------------- values -------------------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-item {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.value-item h3 {
  font-size: 16px;
  font-weight: 700;
}

.value-item p {
  font-size: 14px;
}

@media (max-width: 900px) {
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------------------- photo band (full-bleed mood section) -------------------- */

.photo-band {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-band-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.55));
}

.photo-band-caption {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .photo-band {
    aspect-ratio: 4 / 5;
  }
}

/* -------------------- CTA band -------------------- */

.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: 48px 52px;
}

:root[data-theme="dark"] .cta-band {
  background: #000;
}

.cta-band h2 {
  color: var(--bg);
  font-size: clamp(26px, 3.4vw, 44px);
  max-width: 18ch;
  margin-bottom: 10px;
}

.cta-band p {
  color: var(--ink-faint);
  margin: 0;
  max-width: 40ch;
}

.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .cta-band {
    padding: 36px 28px;
  }
}

/* -------------------- contact -------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 28px 0 32px;
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.contact-list dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--accent);
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  filter: grayscale(0.4);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-success {
  display: none;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

.contact-form.is-sent form {
  display: none;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* -------------------- page hero (inner pages) -------------------- */

.page-hero {
  padding: 56px 0 48px;
}

.page-hero h1 {
  font-size: clamp(38px, 6.4vw, 88px);
  max-width: 14ch;
}

.page-hero p {
  max-width: 48ch;
  font-size: 17px;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* -------------------- footer -------------------- */

.site-footer {
  background: var(--ink);
  color: var(--ink-faint);
  padding: 72px 0 32px;
}

:root[data-theme="dark"] .site-footer {
  background: #000;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  margin-bottom: 16px;
  color: var(--bg);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 19px;
}

.footer-about p {
  font-size: 14px;
  max-width: 34ch;
  color: var(--ink-faint);
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--bg);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
