/* =============================================================
   Iremia Holdings — shared stylesheet
   Aesthetic: refined dark, warm undertones, generous whitespace
   ============================================================= */

:root {
  --bg: #15130f;
  --bg-2: #1c1915;
  --bg-3: #25211c;
  --line: #34302a;
  --text: #ece4d4;
  --text-dim: #948b7e;
  --text-faint: #8a8275;
  --accent: #b89968;
  --accent-soft: #c8b896;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --max: 1240px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Subtle ambient background glow — non-home pages only.
   Echoes the cursor glow concept but static. */
body.bg-glow {
  background:
    radial-gradient(
      ellipse 90% 55% at 50% 0%,
      rgba(184, 153, 104, 0.06),
      transparent 65%
    ),
    var(--bg);
  background-attachment: fixed;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease;
}

/* ---------- ACCENT (styling hook, not semantic emphasis) ---------- */
.accent {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

/* ---------- FOCUS-VISIBLE (keyboard users) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--bg-2);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--accent);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: top 180ms ease;
}
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 19, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand .accent { font-size: 22px; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-dim);
  font-weight: 400;
  position: relative;
  padding: 10px 0;
}

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

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

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 720px) {
  .nav-inner > nav { display: contents; }
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease, padding 280ms ease;
  }
  .nav-links.open {
    max-height: 480px;
    padding: 8px 0;
  }
  .nav-links li {
    padding: 14px var(--pad);
    border-top: 1px solid var(--line);
  }
  .menu-btn { display: inline-flex; }
}

/* ---------- LAYOUT ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(72px, 12vh, 140px) 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
}

h1 .accent {
  font-size: inherit;
  font-weight: 300;
}

h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  margin-bottom: 32px;
}

h2 .accent { font-size: inherit; }

h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

p { color: var(--text-dim); max-width: 64ch; }
p.lead { color: var(--text); font-size: 19px; line-height: 1.5; }

.link-inline {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}
.link-inline:hover { color: var(--accent-soft); }

/* ---------- HERO ---------- */
.hero {
  padding: clamp(100px, 18vh, 200px) 0 clamp(80px, 12vh, 140px);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%; left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  max-width: 900px;
  height: 70vw;
  max-height: 900px;
  background: radial-gradient(circle, rgba(184, 153, 104, 0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero h1 { margin-bottom: 40px; }

.hero-tag {
  font-size: 18px;
  max-width: 560px;
  color: var(--text);
  margin-bottom: 56px;
  line-height: 1.55;
}

/* ---------- BUTTONS ---------- */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 200ms ease;
  border: 1px solid var(--accent);
}

.btn {
  color: var(--accent);
  background: transparent;
}
.btn:hover { color: var(--bg); }

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

.btn .arrow,
.btn-primary .arrow {
  transition: transform 200ms ease;
}
.btn:hover .arrow,
.btn-primary:hover .arrow { transform: translateX(4px); }

/* ---------- QUOTE STRIP ---------- */
.quote {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
  text-align: center;
}

.quote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  color: var(--text);
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.3;
}

/* ---------- OPERATIONS GRID ---------- */
.ops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}

.op-card {
  background: var(--bg);
  padding: 44px 36px;
  transition: background 200ms ease;
}

.op-card:hover { background: var(--bg-2); }

.op-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 24px;
  display: block;
}

.op-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.op-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* ---------- CRITERIA LIST ---------- */
.criteria {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}

@media (max-width: 760px) {
  .criteria { grid-template-columns: 1fr; gap: 32px; }
}

.criteria ul {
  list-style: none;
  display: grid;
  gap: 4px;
  counter-reset: crit;
}

.criteria li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.criteria li:last-child { border-bottom: none; }

.criteria li::before {
  content: counter(crit, decimal-leading-zero);
  counter-increment: crit;
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 13px;
  min-width: 28px;
}

/* ---------- PROSE SECTION ---------- */
.prose {
  max-width: 720px;
}

.prose p { color: var(--text); margin-bottom: 24px; font-size: 18px; line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- PORTFOLIO GRID ---------- */
.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 56px;
}

.company {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 250ms ease, border-color 250ms ease;
}

.company:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.company-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

.company-tag {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.company p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
}

/* ---------- TEAM ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 56px;
  margin-top: 56px;
}

.member h3 {
  font-size: 24px;
  margin-bottom: 4px;
}

.member .role {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 16px;
  display: block;
}

.member p {
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: stretch;
}

.contact-grid > div {
  display: flex;
  flex-direction: column;
}

.contact-grid > div > .mt-32 {
  margin-top: auto;
  padding-top: 56px;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid > div > .mt-32 { margin-top: 32px; padding-top: 0; }
}

.address {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--text);
  font-weight: 300;
}

.address span {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ---------- EMAIL FALLBACK (under mailto buttons) ---------- */
.email-fallback {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.email-fallback a {
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}
.email-fallback a:hover { color: var(--accent); }

/* ---------- LEGAL / PROSE PAGE ---------- */
.legal {
  max-width: 720px;
  padding-top: 0;
}

.legal h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  margin-top: 56px;
  margin-bottom: 16px;
}

.legal h2:first-of-type { margin-top: 0; }

.legal p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.7;
  max-width: 64ch;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 60px var(--pad) 40px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.footer-links a:hover { color: var(--text); }

.footer-meta {
  max-width: var(--max);
  margin: 32px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.footer-meta a { color: var(--text-faint); }
.footer-meta a:hover { color: var(--text-dim); }

.footer-meta-links {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: wrap;
}
.footer-meta-links li { display: inline-flex; align-items: center; }
.footer-meta-links li + li::before {
  content: '·';
  margin: 0 12px;
  color: var(--text-faint);
}

/* ---------- UTILITIES ---------- */
.pt-0 { padding-top: 0 !important; }
.mt-32 { margin-top: 32px; }
.mt-56 { margin-top: 56px; }
.mt-80 { margin-top: 80px; }
.center { text-align: center; }

/* ---------- SCROLL REVEALS (JS adds .reveal + .is-visible) ---------- */
.reveal > * {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal.is-visible > *:nth-child(2) { transition-delay: 90ms; }
.reveal.is-visible > *:nth-child(3) { transition-delay: 180ms; }
.reveal.is-visible > *:nth-child(4) { transition-delay: 270ms; }
.reveal.is-visible > *:nth-child(5) { transition-delay: 360ms; }
.reveal.is-visible > *:nth-child(n+6) { transition-delay: 450ms; }

/* Hero h1 self-animates word-by-word, so don't double-fade it */
.reveal > h1:has(.h1-word) {
  opacity: 1;
  transform: none;
  transition: none;
}
.h1-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: word-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Home hero only: static layout, only the .accent words (Calm, Present.) reveal. */
.hero-static.reveal > * {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---------- CURSOR-FOLLOW GLOW (hero/glow-zone, extends across full viewport width) ---------- */
.glow-zone { position: relative; }
.hero::after,
.glow-zone::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    460px circle at var(--hx, 50vw) var(--hy, 50%),
    rgba(184, 153, 104, 0.12),
    transparent 65%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hero.is-hovered::after,
.glow-zone.is-hovered::after { opacity: 1; }
.glow-zone > * { position: relative; z-index: 1; }

/* ---------- NAV SHRINK ON SCROLL ---------- */
.nav-inner {
  transition: padding 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav.is-scrolled {
  background: rgba(21, 19, 15, 0.92);
}
.nav.is-scrolled .nav-inner {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* ---------- BUTTON HOVER: subtle tint + border (matches EXPLORE THE STUDIO) ---------- */
.btn, .btn-primary {
  transition:
    background-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
    color 200ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  background-color: rgba(184, 153, 104, 0.10);
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}
.btn-primary:hover {
  background-color: var(--accent-soft);
  border-color: var(--accent-soft);
}

/* ---------- REFINED HOVER: OP-CARD (accent line grows from top) ---------- */
.op-card {
  position: relative;
  overflow: hidden;
}
.op-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.op-card:hover::after { transform: scaleY(1); }

/* ---------- REFINED HOVER: COMPANY CARD (warm overlay) ---------- */
.company { position: relative; overflow: hidden; }
.company::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(184, 153, 104, 0.05));
  opacity: 0;
  transition: opacity 450ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.company:hover::after { opacity: 1; }
.company > * { position: relative; z-index: 1; }

/* ---------- PAGE TRANSITIONS (View Transitions API) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: vt-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-in 320ms cubic-bezier(0, 0, 0.2, 1) both;
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; } }

/* ---------- REDUCED MOTION (overrides all the above) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .nav-links { transition: none !important; }
  .reveal > * { opacity: 1 !important; transform: none !important; }
  .h1-word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero::after { display: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
