/* ============================================================
   A&M Masonry — Homepage Stylesheet
   ============================================================ */

:root {
  --crimson: #C8102E;
  --crimson-deep: #A60C25;
  --ink: #14171C;
  --ink-2: #1B1F26;
  --ink-3: #262B33;
  --paper: #F4F1EB;
  --paper-2: #EAE4D8;
  --line: rgba(20,23,28,0.10);
  --line-d: rgba(244,241,235,0.10);
  --muted: #5F6573;
  --muted-d: rgba(244,241,235,0.62);
  --maxw: 1280px;
  --gut: clamp(28px,4vw,44px);
  --display: 'Archivo', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--crimson); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--crimson); font-weight: 500; }
.lede { font-size: clamp(15px,1.1vw,17px); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.section { padding: clamp(104px,12vw,200px) 0; }
.accent { color: var(--crimson); }
.it { font-family: var(--serif); font-style: italic; font-weight: 600; white-space: nowrap; }

/* ── NAV ─────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,0.08); transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease, box-shadow .3s ease; }
.nav.is-scrolled { background: rgba(20,23,28,0.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom-color: rgba(255,255,255,0.04); box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 8px 24px -16px rgba(0,0,0,0.4); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; height: 68px; gap: 32px; color: #fff; transition: height .3s ease; }
.nav.is-scrolled .nav-inner { height: 60px; }
.nav-brand { display: flex; align-items: center; flex-shrink: 0; }
.nav-brand img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links a { padding: 8px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.68); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta { padding: 10px 20px; border-radius: 4px; background: var(--crimson); color: #fff; font-weight: 700; font-size: 13.5px; transition: background .2s, opacity .2s; flex-shrink: 0; }
.nav-cta:hover { background: var(--crimson-deep); }

.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: transparent; padding: 0; cursor: pointer; color: #fff; flex-shrink: 0; }
.nav-toggle-bars { position: relative; display: block; width: 22px; height: 16px; margin: 0 auto; }
.nav-toggle-bars span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px; transition: transform .25s, opacity .25s, top .25s; }
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 7px; }
.nav-toggle-bars span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

.nav-mobile-cta { display: none; }
.nav-mobile-phone { display: none; }

@media (max-width: 760px) {
  .nav-inner { gap: 12px; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: auto; padding: 8px 14px; font-size: 12.5px; }
  body.nav-open .nav-cta { opacity: 0; pointer-events: none; }
  /* backdrop-filter makes .nav a containing block for fixed children,
     which breaks the fixed menu panel — drop it while the menu is open */
  body.nav-open .nav { background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 28px 24px 40px;
    z-index: 99;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
    overflow-y: auto;
  }
  .nav-links.is-open { opacity: 1; pointer-events: auto; }
  .nav-links a {
    padding: 18px 4px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    color: rgba(255,255,255,0.78);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
  }
  .nav-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
    padding-top: 8px;
  }
  .nav-mobile-cta .btn {
    justify-content: center;
    padding: 16px 26px;
    font-size: 14.5px;
    border-radius: 6px;
    border: 1.5px solid transparent;
    color: #fff;
  }
  .nav-mobile-cta .nav-mobile-phone {
    display: block;
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-family: var(--mono);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .04em;
    padding: 12px 0 4px;
    border-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links { transition: none; }
  .nav-toggle-bars span { transition: none; }
}

/* ── HERO ────────────────────────────────────────────────── */
.hero { position: relative; background: var(--ink); color: var(--paper); overflow: hidden; padding: 120px 0 80px; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity 1.6s cubic-bezier(.4,0,.2,1); }
.hero-bg-img.is-playing { opacity: 1; }
.hero-bg-img--secondary { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg-img { transition: none; }
}
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(20,23,28,0.90) 0%, rgba(20,23,28,0.70) 55%, rgba(20,23,28,0.25) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-center { position: relative; z-index: 2; max-width: 620px; }
.hero-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(244,241,235,0.55); margin-bottom: 24px; animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) .35s both; }
.hero-h { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-size: clamp(42px,5vw,76px); margin: 0; }
.hero-h .accent { font-family: var(--serif); font-style: italic; font-weight: 600; letter-spacing: -0.02em; color: var(--crimson); }
.hero-h .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero-h .word > span { display: inline-block; animation: rise 1s cubic-bezier(.2,.85,.2,1) both; }
.hero-sub { margin: 24px 0 0; max-width: 50ch; font-size: 16px; line-height: 1.6; color: rgba(244,241,235,0.72); animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) .9s both; }
.hero-cta { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 36px; animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) 1.1s both; }
.hero-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 14px; color: rgba(244,241,235,0.82); padding: 6px 2px; border-bottom: 1px solid rgba(244,241,235,0.28); transition: color .2s, border-color .2s, gap .2s; }
.hero-link:hover { color: #fff; border-color: #fff; gap: 12px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 6px; font-family: var(--display); font-weight: 700; font-size: 14.5px; transition: transform .2s, background .2s, color .2s, border-color .2s; border: 1.5px solid transparent; cursor: pointer; }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-deep); }
.btn--out { border-color: var(--ink); color: var(--ink); }
.btn--out:hover { background: var(--ink); color: #fff; }

/* ── INTRO ──────────────────────────────────────────────── */
.intro-sec { background: var(--paper); padding: clamp(104px,12vw,200px) 0; }
.intro-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.intro-h { font-family: var(--display); font-weight: 800; font-size: clamp(32px,4vw,54px); letter-spacing: -0.025em; line-height: 1.12; color: var(--ink); margin: 0 0 24px; }
.intro-h .accent { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--crimson); }
.intro-p { font-family: var(--body); font-size: clamp(16px,1.3vw,18px); line-height: 1.7; color: var(--muted); margin: 0 auto; max-width: 58ch; }

/* ── SERVICES ────────────────────────────────────────────── */
.svc { background: var(--paper); padding-bottom: clamp(128px,14vw,200px); }
.svc-head { text-align: center; margin-bottom: clamp(48px,5vw,72px); }
.svc-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(40px,5vw,68px); letter-spacing: -0.025em; line-height: 1; margin: 8px 0 0; }
.svc-head h2 .accent { font-family: var(--serif); font-style: italic; font-weight: 600; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1180px; margin: 0 auto; }
.svc-card { display: flex; flex-direction: column; gap: 18px; }
.svc-card-img { aspect-ratio: 3/2; position: relative; overflow: hidden; border-radius: 10px; background: var(--paper-2); box-shadow: 0 1px 2px rgba(20,23,28,0.04), 0 14px 32px -16px rgba(20,23,28,0.18); transition: box-shadow .55s cubic-bezier(.22,.61,.36,1); }
.svc-card:hover .svc-card-img { box-shadow: 0 2px 8px rgba(20,23,28,0.07), 0 26px 50px -20px rgba(20,23,28,0.30); }
.svc-card-img img { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); object-fit: cover; display: block; }
.coming-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--paper-2); color: var(--muted); }
.coming-soon svg { opacity: 0.55; }
.coming-soon span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.coming-soon--dark { background: #0E1014; color: rgba(244,241,235,0.55); }
.svc-card-info { padding: 0 2px; }
.svc-card-title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 6px; }
.svc-card-sub { font-family: var(--body); font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 34ch; }
.svc-foot { display: flex; justify-content: center; margin-top: 56px; }
.svc-foot .btn { box-shadow: 0 12px 28px -10px rgba(200,16,46,0.55); }
.svc-foot .btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(200,16,46,0.65); }
@media (max-width: 760px) {
  .svc-grid { grid-template-columns: 1fr; gap: 24px; max-width: 460px; }
  .svc-card-title { font-size: 18px; }
  .svc-foot { margin-top: 36px; }
}

/* ── PROJECTS ────────────────────────────────────────────── */
.proj-sec { background: var(--paper); padding-bottom: clamp(120px,14vw,200px); }
.proj-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(48px,5vw,80px); }
.proj-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(40px,5vw,64px); letter-spacing: -0.025em; line-height: 1; margin: 8px 0 0; }
.proj-head h2 .accent { font-family: var(--serif); font-style: italic; font-weight: 600; }
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; }
.proj-card-mini { grid-column: span 4; display: flex; flex-direction: column; gap: 16px; }
.proj-card-mini--wide { grid-column: span 7; }
.proj-card-mini--tall { grid-column: span 5; }
.proj-card-media { aspect-ratio: 4/5; position: relative; overflow: hidden; border-radius: 10px; background: var(--paper-2); box-shadow: 0 1px 2px rgba(20,23,28,0.04), 0 14px 32px -16px rgba(20,23,28,0.18); transition: box-shadow .55s cubic-bezier(.22,.61,.36,1); }
.proj-card-mini--wide .proj-card-media { aspect-ratio: 4/3; }
.proj-card-media video, .proj-card-media img { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); object-fit: cover; display: block; }
.proj-card-media video.pcv { opacity: 0; transition: opacity 1.5s ease; }
.proj-card-media video.pcv.is-active { opacity: 1; }
.proj-card-mini:hover .proj-card-media { box-shadow: 0 2px 8px rgba(20,23,28,0.07), 0 26px 50px -20px rgba(20,23,28,0.30); }
.proj-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 2px; }
.proj-card-title { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.proj-card-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.proj-foot { display: flex; justify-content: center; margin-top: clamp(48px,5vw,72px); }
@media (max-width: 880px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .proj-card-mini, .proj-card-mini--wide, .proj-card-mini--tall { grid-column: span 1; }
  .proj-card-media, .proj-card-mini--wide .proj-card-media { aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-card-mini, .proj-card-mini--wide, .proj-card-mini--tall { grid-column: 1 / -1; }
}

/* ── WHY US ──────────────────────────────────────────────── */
.why-sec { background: var(--ink-2); color: var(--paper); }
.why-head { text-align: left; margin-bottom: clamp(52px,6vw,80px); max-width: 720px; }
.why-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(40px,5vw,68px); letter-spacing: -0.025em; line-height: 1; margin: 8px 0 0; color: #fff; }
.why-head h2 .accent { font-family: var(--serif); font-style: italic; font-weight: 600; }
.why-head .lede { margin: 14px 0 0; max-width: 560px; color: rgba(244,241,235,0.72); }
.why-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: stretch; }
.why-photo { display: flex; flex-direction: column; gap: 14px; }
.why-photo-frame { flex: 1 1 auto; border-radius: 10px; overflow: hidden; position: relative; background: #0E1014; min-height: 360px; border: 1px solid rgba(255,255,255,0.06); }
.why-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.why-photo-caption { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(244,241,235,0.5); }
.why-items { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 48px; }
.why-item { transition: transform .25s ease; }
.why-item:hover { transform: translateY(-3px); }
.why-item:hover .why-icon { background: var(--crimson); color: #fff; transform: scale(1.05); }
.why-icon { width: 36px; height: 36px; border-radius: 7px; background: rgba(200,16,46,0.16); color: var(--crimson); display: grid; place-items: center; margin-bottom: 14px; transition: all .25s; }
.why-item h3 { font-family: var(--display); font-weight: 700; font-size: 17px; margin: 0 0 6px; letter-spacing: -0.005em; color: #fff; }
.why-item p { margin: 0; font-size: 14px; color: rgba(244,241,235,0.62); line-height: 1.55; }
@media (max-width: 880px) { .why-grid { grid-template-columns: 1fr; } .why-photo-frame { min-height: 280px; } }
@media (max-width: 600px) { .why-items { grid-template-columns: 1fr; gap: 36px; } }

/* ── CLOSING CTA ────────────────────────────────────────── */
.close-sec { background: var(--paper); padding: clamp(104px,12vw,200px) 0 clamp(144px,15vw,240px); }
.close-inner { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.close-h { font-family: var(--display); font-weight: 800; font-size: clamp(36px,4.5vw,60px); letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); margin: 0 0 18px; }
.close-h .accent { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--crimson); }
.close-p { font-family: var(--body); font-size: clamp(16px,1.3vw,18px); line-height: 1.7; color: var(--muted); margin: 0 0 36px; max-width: 52ch; }
.close-btn { box-shadow: 0 12px 28px -10px rgba(200,16,46,0.55); }
.close-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(200,16,46,0.65); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(44px,5vw,60px) 0; }
.sf-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 36px; }
.sf-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--paper); }
.sf-dot { width: 10px; height: 10px; background: var(--crimson); border-radius: 3px; flex-shrink: 0; }
.sf-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.sf-nav a { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--paper); opacity: .66; transition: opacity .2s ease, color .2s ease; }
.sf-nav a:hover { opacity: 1; color: var(--crimson); }
.sf-base { margin-top: clamp(26px,3vw,34px); padding-top: 22px; border-top: 1px solid var(--line-d); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted-d); }
.sf-meta a { color: var(--muted-d); transition: color .2s ease; }
.sf-meta a:hover { color: var(--crimson); }
@media (max-width: 560px) {
  .sf-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sf-base { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── REVEAL ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.2s cubic-bezier(.16,1,.3,1), transform 1.2s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── LAZY IMAGE FADE-IN ──────────────────────────────────── */
.js img[loading="lazy"] { opacity: 0; transition: opacity .6s ease; }
.js img[loading="lazy"].is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js img[loading="lazy"] { opacity: 1; transition: none; }
}

/* ── KEYFRAMES ───────────────────────────────────────────── */
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
