/* Maria Mathai Architects — site styles */

:root {
  --bg: #ffffff;
  --bg-alt: #f3f3f1;
  --surface: #ffffff;
  --ink: #111111;
  --ink-soft: #666666;
  --line: #e2e2e0;
  --accent: #111111;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.005em; }

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

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 18px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

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

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
/* Blur lives on a pseudo-element so the fixed mobile menu isn't trapped inside the header */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: block; line-height: 1; }
.brand-name {
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  letter-spacing: .24em; text-transform: uppercase; white-space: nowrap;
}

.nav { display: flex; gap: 40px; }
.nav a {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer;
  width: 44px; height: 44px; position: relative; color: var(--ink);
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease), opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand-name { font-size: 15px; letter-spacing: .2em; line-height: 1.3; white-space: normal; }
  .brand-name span { display: block; }
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--bg);
    flex-direction: column; gap: 0;
    padding: 24px var(--gutter);
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
  }
  .nav a {
    font-family: var(--serif); font-size: 36px; letter-spacing: 0; text-transform: none;
    color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--ink); font-style: italic; }
  .menu-open .nav { opacity: 1; visibility: visible; z-index: 60; }
  .menu-open { overflow: hidden; }
}

/* ---------- Home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: calc(100svh - var(--header-h));
}
.hero-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.hero h1 { font-size: clamp(42px, 5.4vw, 76px); margin-bottom: 28px; }
.hero h1 em { font-style: italic; }
.hero-lede { color: var(--ink-soft); max-width: 30em; font-size: 17px; margin-bottom: 36px; }
.hero-media { position: relative; overflow: hidden; background: var(--bg-alt); }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 14s var(--ease) both;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { order: -1; aspect-ratio: 4 / 3.4; }
  .hero-text { padding: 40px var(--gutter) 56px; }
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  background: var(--ink); color: var(--bg);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  padding: 16px 26px; border: 1px solid var(--ink);
  transition: background .25s, color .25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.arrow-link {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 4px;
}
.arrow-link span { transition: transform .3s var(--ease); }
.arrow-link:hover span { transform: translateX(5px); }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 11vw, 140px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 { font-size: clamp(34px, 4.4vw, 56px); }

.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.intro h2 { font-size: clamp(30px, 3.6vw, 46px); }
.intro p { color: var(--ink-soft); font-size: 17px; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } }

/* ---------- Project cards ---------- */

.projects {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 40px);
}
.projects .card:first-child { grid-column: 1 / -1; }
.projects .card:first-child .card-media { aspect-ratio: 16 / 8; }

.card { display: block; }
.card-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-alt); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }
.card-body {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-top: 18px;
}
.card-title { font-size: clamp(24px, 2.4vw, 32px); }
.card-meta { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.tag {
  flex-shrink: 0;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 5px 10px; color: var(--ink-soft);
  white-space: nowrap;
}
.tag-done { border-color: var(--accent); color: var(--accent); }

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  .projects .card:first-child .card-media { aspect-ratio: 4 / 3; }
  .card-body { flex-direction: column; gap: 10px; }
}

/* ---------- Services ---------- */

.services {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.service {
  padding: 32px 32px 36px 0;
  border-bottom: 1px solid var(--line);
}
.service + .service { padding-left: 32px; }
.service:nth-child(3n + 1) { padding-left: 0; }
.service:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.service-num { font-size: 12px; color: var(--ink-soft); letter-spacing: .1em; margin-bottom: 18px; display: block; }
.service h3 { font-size: 26px; margin-bottom: 10px; }
.service p { color: var(--ink-soft); font-size: 15px; margin: 0; }

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr 1fr; }
  .service, .service + .service { padding: 28px 24px 30px 0; border-right: 0 !important; }
  .service:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .service:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- Quote / CTA ---------- */

.quote {
  font-family: var(--serif); font-size: clamp(28px, 3.6vw, 48px); line-height: 1.25;
  max-width: 22em; margin: 0 auto; text-align: center;
}
.quote::before {
  content: ""; display: block; width: 40px; height: 1px; background: var(--accent);
  margin: 0 auto 36px;
}

.cta { text-align: center; }
.cta h2 { font-size: clamp(36px, 5vw, 64px); margin-bottom: 20px; }
.cta p { color: var(--ink-soft); margin-bottom: 36px; }
.cta .btn { align-self: center; }

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

.page-head { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(46px, 7vw, 96px); }
.page-head p { color: var(--ink-soft); max-width: 36em; font-size: 17px; margin-top: 24px; }

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

.project-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px);
}
.project-head h1 { font-size: clamp(42px, 6vw, 84px); }
.project-head .desc p { color: var(--ink-soft); font-size: 17px; }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px;
  margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.facts dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; }
@media (max-width: 760px) { .project-head { grid-template-columns: 1fr; } }

.project-hero { margin: 0 0 clamp(16px, 2vw, 24px); }
.project-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.gallery figure { margin: 0; }
.gallery .wide { grid-column: 1 / -1; }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-alt);
  cursor: zoom-in; overflow: hidden;
}
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1s var(--ease), opacity .3s; }
.gallery .wide img { aspect-ratio: 16 / 9; }
.gallery button:hover img { transform: scale(1.025); }
.gallery figcaption { font-size: 13px; color: var(--ink-soft); padding-top: 10px; }
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img, .gallery .wide img { aspect-ratio: 3 / 2; }
}

.render-note { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 18px; }


.project-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: clamp(72px, 10vw, 128px); padding-top: 32px; border-top: 1px solid var(--line);
}
.project-nav a { display: block; }
.project-nav small { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.project-nav span { display: block; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.2; transition: color .2s; }
.project-nav a:hover span { opacity: .6; }
.project-nav .next { text-align: right; }

/* ---------- About ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 96px);
}
.about-grid .lead { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 36px); line-height: 1.3; }
.about-grid .body p { color: var(--ink-soft); font-size: 17px; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  margin-top: clamp(48px, 7vw, 88px);
}
.stat { border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; }
.stat strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; }
.stat span { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.timeline .when { font-size: 13px; color: var(--ink-soft); letter-spacing: .04em; }
.timeline .role { font-family: var(--serif); font-size: 24px; }
.timeline .where { color: var(--ink-soft); }
@media (max-width: 760px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .timeline .when { order: 3; margin-top: 4px; }
}

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

.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); padding-bottom: clamp(72px, 10vw, 140px);
}
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.contact-list small { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.contact-list a, .contact-list .val { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); word-break: break-word; }
.contact-list a:hover { opacity: .6; }
.contact-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-media { order: -1; }
  .contact-media img { aspect-ratio: 4 / 3; }
}

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

.form { display: grid; gap: 22px; }
.field label { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0; border-radius: 0; -webkit-appearance: none; appearance: none;
  transition: border-color .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.form .btn { cursor: pointer; font-family: var(--sans); margin-top: 8px; justify-self: start; }
.form .btn[disabled] { opacity: .5; cursor: wait; }
.form-status { font-size: 15px; min-height: 1.5em; margin: 0; }
.hp { position: absolute; left: -9999px; }

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

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14px; color: var(--ink-soft); }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.footer-grid .brand-name { color: var(--ink); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { margin-top: 36px; font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

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

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 18, 16, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  touch-action: pan-y;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #f6f2ec; cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  padding: 16px; min-width: 48px; min-height: 48px;
}
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 28px !important; }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 28px !important; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #b9b1a6; font-size: 12px; letter-spacing: .14em; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; } }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
