/* ══════════════════════════════════════════════════════════════════════════
   Azazello — page layer.

   modernist.css holds the design system (tokens, buttons, forms, cards). This
   file holds only what the Azazello pages add on top of it: the header and
   footer shell, the section rhythm, and the blocks that appear on the home and
   work pages. Every value comes from a token in modernist.css — if a colour,
   font or spacing step needs to change, change it there, not here.
   ══════════════════════════════════════════════════════════════════════════ */

/* — page shell ─────────────────────────────────────────────────────────── */

.page {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

/* The one measure the whole site is set to. Every band uses it so the rules,
   the grid columns and the footer all line up on the same two edges. */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 40px;
}

/* A 2px rule is the system's main organising device — never soften these. */
.rule {
  height: 2px;
  background: var(--color-divider);
}

/* Drawn left-to-right on load, under the hero only. */
.rule-draw {
  transform-origin: left;
  animation: az-rule 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes az-rule {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.section { padding-block: 96px; }

/* Label in a narrow left column, content in the rest — the page's main
   two-column figure, used by What we do, Team, Questions and How we work. */
.section-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

.section-label {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  padding-top: 6px;
}

.section-label-note {
  font-size: 14px;
  max-width: 26ch;
  margin: 16px 0 0;
}

.eyebrow {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 32px;
}

/* — header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 18px;
}

.brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-text);
  margin-right: auto;
}

.brand-dot { color: var(--color-accent); }

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text);
}

.site-nav a:hover { color: var(--color-accent-700); }
.site-nav a[aria-current='page'] { color: var(--color-accent); }
/* The nav's call to action is a .btn .btn-primary from modernist.css. */
.site-nav .btn:hover { color: var(--color-bg); }

/* — hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 120px 40px 96px; }

.hero-title {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}

.hero-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 56px;
}

.hero-lede {
  font-size: 19px;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: end;
}

.hero-aside .btn { align-self: start; }
.hero-note { font-size: 13px; }

/* Narrower variant used by Work and the secondary pages. */
.hero-lean { padding: 104px 40px 72px; }

.hero-lean .hero-title {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  max-width: 20ch;
}

.hero-lean .hero-lede {
  font-size: 18px;
  max-width: 52ch;
  margin-top: 40px;
}

/* — imagery ────────────────────────────────────────────────────────────── */

.media {
  position: relative;
  overflow: hidden;
}

.media-hero { height: min(52vh, 460px); }
.media-portrait { aspect-ratio: 4 / 5; margin-bottom: 14px; }
.media-shot { aspect-ratio: 4 / 3; }

/* Placeholder standing in for a photograph that has not been supplied yet.
   Drop a real file in and it covers the slot; the caption disappears with it.
   Photographs print black and white — see .grayscale in modernist.css. */
.image-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: var(--color-neutral-300);
  background-size: cover;
  background-position: center;
}

.image-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 7px,
    color-mix(in srgb, var(--color-neutral-500) 55%, transparent) 7px 8px
  );
}

.image-slot-caption {
  position: relative;
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-neutral-900);
  background: var(--color-bg);
}

/* With a photograph set, the hatching and the caption both go. */
.image-slot.has-image { background-color: transparent; }
.image-slot.has-image::before,
.image-slot.has-image .image-slot-caption { display: none; }

/* A faint accent wash over the grayscale photograph — the system's one
   permitted touch of colour on photography, tying it to --color-accent
   instead of running it in plain black and white. */
.image-slot.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  mix-blend-mode: color;
  opacity: 0.18;
}

/* The rule directly under a real photograph — accent instead of divider, so
   the photo bands read as a deliberate feature rather than page furniture. */
.rule-accent { background: var(--color-accent); }

/* — what we do ─────────────────────────────────────────────────────────── */

/* Cells sit on a divider-coloured bed, so the 2px gaps read as rules. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  background: var(--color-divider);
}

.service {
  background: var(--color-bg);
  padding: 8px 32px 40px 0;
}

.service-num {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.service-title {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  max-width: 14ch;
}

.service-body {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 34ch;
}

/* — team ───────────────────────────────────────────────────────────────── */

/* Four across, deliberately — the studio is four people and the row is the
   point. Column counts are set rather than left to auto-fit, which at some
   widths drops one member onto a second row on their own. The count goes back
   up at 900px because the label column stops taking a third of the width. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

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

@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

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

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

.team-member { margin: 0; }

/* Full-strength ink rule under each portrait, not the lighter divider. */
.team-member-rule {
  height: 2px;
  background: var(--color-text);
  margin-bottom: 12px;
}

.team-name {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.team-role { font-size: 13px; }

/* — questions ──────────────────────────────────────────────────────────── */

.faq-item { border-bottom: 1px solid var(--color-divider); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 20px;
  background: transparent;
  border: 0;
  padding: 24px 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.faq-q:hover { color: var(--color-accent-700); }
.faq-q-text { flex: 1; }

/* The + rotates 45° into an ×. */
.faq-sign {
  font-size: 22px;
  line-height: 1;
  color: var(--color-accent);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.faq-q[aria-expanded='true'] .faq-sign { transform: rotate(45deg); }

.faq-a {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}

.faq-a p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  max-width: 60ch;
  padding-bottom: 26px;
}

/* — the accent band: contact, and the work page's closing call ─────────── */

/* The one place red runs as a field. Type stays display-grade here. */
.band {
  background: var(--color-accent);
  color: var(--color-bg);
}

.band a { color: inherit; }

.band-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding-block: 96px;
}

.band-title {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  max-width: 14ch;
}

.band-lede {
  font-size: 17px;
  line-height: 1.6;
  max-width: 38ch;
  margin: 0 0 32px;
  opacity: 0.9;
}

.band-details {
  font-size: 15px;
  line-height: 1.9;
  font-style: normal;
}

.band-details a { text-decoration: none; }
.band-details a:hover { text-decoration: underline; }
.band-details .is-dim { opacity: 0.8; }

/* Work page's closing call — a single row rather than two columns. */
.band-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  padding-block: 88px;
}

.band-row .band-title { margin-bottom: 0; max-width: 20ch; }

/* Ground-on-accent button, the inverse of .btn-primary. */
.btn-invert {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 26px;
  background: var(--color-bg);
  color: var(--color-accent);
  border: 2px solid var(--color-bg);
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-invert:hover { background: transparent; color: var(--color-bg); }
.btn-invert:active { background: var(--color-accent-100); color: var(--color-accent-700); }
.band :focus-visible { outline-color: var(--color-bg); }

/* Form sitting on the accent field — outlined in the ground colour. */
.form-invert {
  display: grid;
  gap: 20px;
}

.field-invert {
  display: grid;
  gap: 6px;
}

.field-invert > span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.field-invert input,
.field-invert textarea {
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: transparent;
  border: 2px solid var(--color-bg);
  color: var(--color-bg);
  border-radius: 0;
}

.field-invert textarea { resize: vertical; }
.field-invert input::placeholder,
.field-invert textarea::placeholder { color: color-mix(in srgb, var(--color-bg) 60%, transparent); }
.field-invert input:autofill { -webkit-text-fill-color: var(--color-bg); }

.form-invert .btn-invert { justify-self: start; }

/* Confirmation shown in place of the form after a successful send. */
.band-notice {
  border: 2px solid var(--color-bg);
  padding: 40px;
}

.band-notice-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 22px;
  margin-bottom: 10px;
}

.band-notice p { margin: 0; opacity: 0.9; font-size: 15px; }

.form-consent {
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.8;
  margin: 0;
  max-width: 46ch;
}

/* — work page ──────────────────────────────────────────────────────────── */

.work-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 72px;
  border-bottom: 1px solid var(--color-divider);
}

/* Text and image swap sides down the list. */
.work-project:nth-child(even) .work-copy { order: 2; }
.work-project:nth-child(even) .work-media { order: 1; }

.work-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.work-kicker {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.work-meta-rule {
  height: 1px;
  flex: 1;
  background: var(--color-divider);
}

.work-year { font-size: 12px; }

.work-title {
  font-size: 34px;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: 18ch;
}

.work-body {
  font-size: 16px;
  line-height: 1.65;
  max-width: 42ch;
  margin: 0 0 24px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stack li {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border: 1px solid var(--color-divider);
}

/* — how we work ────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 2px;
  background: var(--color-divider);
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: var(--color-bg);
  display: grid;
  grid-template-columns: 64px 220px 1fr;
  gap: 32px;
  align-items: baseline;
  padding-block: 28px;
}

.step-num {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.step-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.step-body {
  font-size: 15px;
  line-height: 1.6;
  max-width: 52ch;
}

/* — prose, for the secondary pages ─────────────────────────────────────── */

.prose { max-width: 62ch; }
.prose h3 { font-size: 21px; margin: 40px 0 12px; }
.prose h3:first-child { margin-top: 0; }
.prose p { font-size: 16px; line-height: 1.7; margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; }
.prose li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; }

/* — footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 56px 40px 72px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.footer-legal {
  font-size: 13px;
  line-height: 1.8;
  font-style: normal;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.footer-col a {
  text-decoration: none;
  color: var(--color-text);
}

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

/* — flash messages ─────────────────────────────────────────────────────── */

.flash { padding-block: 16px; }

.message {
  border-left: 4px solid var(--color-text);
  padding: 14px 18px;
  font-size: 14px;
  background: var(--color-surface);
  cursor: pointer;
}

.message.success { border-left-color: var(--color-accent); }
.message.error { border-left-color: var(--color-accent-700); }
.message.hidden { display: none; }

/* — scroll reveal ──────────────────────────────────────────────────────── */

/* Applied by site.js only when IntersectionObserver is available, so content
   is never left invisible if the script fails to run. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* — narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .wrap { padding-inline: 24px; }
  .section { padding-block: 64px; }
  .hero { padding: 72px 24px 56px; }
  .hero-lean { padding: 64px 24px 48px; }

  /* The label column folds above its content rather than beside it. */
  .section-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-cols { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .hero-aside { align-self: start; }

  .service { padding: 8px 0 32px; }

  .band-grid { grid-template-columns: 1fr; gap: 48px; padding-block: 64px; }
  .band-row { padding-block: 64px; }

  .work-project { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
  /* Image above copy on every row once stacked — the alternation only reads
     as deliberate side by side. */
  .work-project .work-copy { order: 2; }
  .work-project .work-media { order: 1; }

  .step { grid-template-columns: 48px 1fr; gap: 8px 20px; }
  .step-body { grid-column: 2; }

  .site-footer { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 56px; }
}

@media (max-width: 700px) {
  /* Brand keeps its line, the nav wraps underneath it — no overlay menu. */
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 16px;
    padding-block: 14px;
  }

  .brand { margin-right: 0; width: 100%; }
  .site-nav { gap: 18px; flex-wrap: wrap; }
  .site-nav a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .rule-draw { animation: none; }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .faq-a, .faq-sign { transition: none; }
}
