/* ============================================================
   1AU — Daylight & Lighting Consultancy

   ---- CHANGING THE FONT ----
   Two lines, both here. Swap the @import below for a different
   Google Fonts URL, then put the family name first in --f-sans.
   Nothing else in the site needs touching.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;700&display=swap");

:root {
  --bg:        #EFECE4;   /* warm off-white page background */
  --ink:       #1C1A17;   /* headings, near-black */
  --body:      #8B8075;   /* muted warm grey for body copy */
  --body-dark: #6E645A;   /* slightly stronger muted text */
  --rule:      rgba(28, 26, 23, 0.14);
  --field:     #E5E1D8;   /* form input fill */
  --accent:    #691C26;   /* 1AU burgundy — buttons, focus, hover */

  --wrap:      1240px;
  --gutter:    40px;

  /* Font family — first name must match the @import above */
  --f-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */

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

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

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

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

a { color: inherit; }

h1, h2, h3, h4, p, figure { margin: 0; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand { text-decoration: none; display: block; }

.brand__mark {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

.brand__sub {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--body);
}

.nav {
  display: flex;
  gap: 40px;
  padding-top: 8px;
}

.nav a {
  text-decoration: none;
  font-size: 17px;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

/* ---------- Hero (version A: stacked full-width images) ---------- */

.hero { display: grid; gap: 0; }

.hero figure { margin: 0; }

.hero img {
  width: 100%;
  height: auto;
}

/* ---------- Hero (version B: one image, statement over it) ---------- */

.hero-b {
  position: relative;
  min-height: 82vh;
  min-height: 82dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #241F1A;
}

.hero-b__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Scrim: keeps the text readable whatever the photograph does. */
.hero-b::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(16, 14, 12, 0.55) 0%,
    rgba(16, 14, 12, 0.42) 45%,
    rgba(16, 14, 12, 0.62) 100%
  );
}

.hero-b__inner {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 120px var(--gutter);
  width: 100%;
}

.hero-b__statement {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
  color: #F6F3EC;
  font-size: clamp(21px, 2.45vw, 32px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-b__cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: rgba(246, 243, 236, 0.75);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero-b__cue span { font-size: 17px; line-height: 1; }

.hero-b__cue:hover { color: #F6F3EC; }

@media (max-width: 680px) {
  .hero-b { min-height: 76vh; min-height: 76dvh; }
  .hero-b__inner { padding: 88px var(--gutter); }
}

/* ---------- Statement ---------- */

.statement {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(22px, 2.5vw, 33px);
  line-height: 1.38;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- Section heading ---------- */

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 36px;
  color: var(--ink);
}

/* ---------- Card grid (work + capabilities) ---------- */

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

.card { display: block; text-decoration: none; }

.card__media {
  background: var(--field);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card__media img,
.card:focus-visible .card__media img { transform: scale(1.03); }

.card__eyebrow {
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
}

.card__title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.card__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--body);
  max-width: 42ch;
}

/* ---------- Project page ---------- */

.back-link {
  display: inline-block;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.back-link:hover { border-bottom-color: var(--ink); }

.page-eyebrow {
  margin-top: 40px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body);
}

.page-title {
  margin-top: 8px;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 48px;
}

.gallery__item {
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--field);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery__item:hover img { transform: scale(1.03); }

.project-body {
  max-width: 62ch;
  margin-top: 56px;
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.72;
}

.project-body p + p { margin-top: 20px; }

.project-body .credit { color: var(--body-dark); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(20, 19, 17, 0.94);
  padding: 24px;
  height: 100vh;
  height: 100dvh;          /* accounts for mobile browser chrome */
}

/* minmax(0, 1fr) is the important part: a plain 1fr row keeps an
   automatic minimum size, so a tall image stretches the row past the
   bottom of the screen and max-height has nothing to measure against. */
.lightbox.is-open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #F3F0E9;
  font-size: 14px;
  padding-bottom: 14px;
}

.lightbox__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;          /* lets a zoomed image be panned */
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  cursor: zoom-in;
}

/* Click the image to see it at full size and scroll around it —
   useful for drawings with small annotation text. */
.lightbox.is-zoomed .lightbox__stage { place-items: start; }

.lightbox.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  width: auto;
  cursor: zoom-out;
}

.lightbox__hint {
  color: rgba(243, 240, 233, 0.6);
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .lightbox__hint { display: none; }
}

.lb-btn {
  background: none;
  border: 1px solid rgba(243, 240, 233, 0.4);
  color: #F3F0E9;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease;
}

.lb-btn:hover { background: rgba(243, 240, 233, 0.14); }

.lightbox__nav { display: flex; gap: 10px; align-items: center; }

/* ---------- Team ---------- */

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

.person { text-decoration: none; display: block; }

.person__photo {
  background: var(--field);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.person:hover .person__photo img { transform: scale(1.03); }

.person__name {
  margin-top: 20px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.person__role {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--body-dark);
}

/* Profile page */

.profile {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  margin-top: 44px;
}

.profile__photo {
  background: var(--field);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

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

.profile__name {
  margin-top: 20px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile__creds {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--body-dark);
}

.profile__edu {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--body-dark);
}

.profile__bio {
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.75;
}

.profile__bio p + p { margin-top: 22px; }

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
  gap: 64px;
}

.contact__lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-dark);
  max-width: 44ch;
}

.contact h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.field { margin-top: 22px; }

.field label {
  display: block;
  font-size: 15px;
  color: var(--body-dark);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s ease;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: #A99F93; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.btn {
  margin-top: 28px;
  width: 100%;
  background: var(--accent);
  color: #F5F1EA;
  border: 0;
  border-radius: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn:hover { filter: brightness(1.15); }

.contact__direct {
  margin-top: 36px;
  font-size: 15px;
  line-height: 1.8;
}

.contact__direct a { color: var(--ink); }

.form-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--body);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding: 44px 0 72px;
}

.site-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer__name { font-size: 16px; font-weight: 700; }

.site-footer__place { margin-top: 4px; font-size: 15px; color: var(--body); }

.social { display: flex; gap: 20px; align-items: center; }

.social a { color: var(--ink); opacity: 0.85; transition: opacity 0.2s ease; }

.social a:hover { opacity: 1; }

.social svg { width: 20px; height: 20px; }

/* ---------- Responsive ---------- */

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

  .profile,
  .contact { grid-template-columns: 1fr; gap: 40px; }

  .profile__photo { max-width: 420px; }
}

@media (max-width: 680px) {
  :root { --gutter: 22px; }

  .section { padding: 56px 0; }

  .site-header__inner { padding: 18px var(--gutter); flex-wrap: wrap; }

  .nav { gap: 24px; padding-top: 0; width: 100%; }

  .grid,
  .gallery,
  .team-grid { grid-template-columns: 1fr; gap: 40px; }

  .brand__mark { font-size: 26px; }

  .person__name { font-size: 26px; }

  .lightbox { padding: 14px; }
}
