:root {
  /* Studio Palette: Monochrome & Natural */
  --bg: #FDFCFB;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #57534E;
  --border: #E7E5E4;
  --border-strong: #1A1A1A;
  
  /* Accent is now used very sparingly */
  --accent: #658fd3; /* Deep Clay/Rust */
  
  /* Spacing & Type */
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========== HEADER ========== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  /* clear background over hero */
  background: transparent;  
  backdrop-filter: blur(0%);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.nav-contact {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  transition: color 0.2s ease;
  color: #FFFFFF;
}

.nav-contact:focus-visible,
.hero-caption-floating:focus-visible,
.modal-close:focus-visible,
.modal-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-contact:hover {
  color: var(--accent);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

header.scrolled .nav-logo {
  color: var(--ink);
}

header.scrolled .nav-contact {
  color: var(--ink);
}

/* ========== HERO (FULL SCREEN) ========== */
.hero {
  position: relative;
  height: 100vh;     /* Full viewport height */
  min-height: 600px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  color: #FFFFFF;    /* Text is now white */
  overflow: hidden;
}

/* The Background Image */
.hero-background {
  position: absolute;
  inset: 0;          /* Top, Right, Bottom, Left = 0 */
  z-index: 1;
  will-change: transform;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills screen without stretching */
  will-change: transform;
  transform: scale(1.05);
}

/* The Dimmer Overlay (Crucial for readability) */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.5) 100%
  );
  z-index: 2;
}

/* Content Layout */
.hero-inner {
  position: relative;
  z-index: 3;        /* sits on top of overlay */
  max-width: 1400px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center; /* Vertically center the text */
}

/* Content Layout (UPDATED TO USE GRID) */
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1400px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end; /* Vertically center the text */
}

/* ------------------------------------------- */
/* THE NEW GRID LAYOUT FOR THE TEXT CONTAINER  */
/* ------------------------------------------- */
.hero-content {
  width: 100%;
  /* Removed old constraint so we use the full width */
  max-width: 100%; 
  
  /* Switch to Grid for precise placement */
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  grid-template-areas:
    "eyebrow eyebrow"
    "title title"
    "buttons subtitle"; /* Buttons left, Subtitle right */
  
  column-gap: 4rem;
  align-items: start; /* Top-align content */
}

.hero-eyebrow {
  grid-area: eyebrow;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
  display: inline-block;
  border-left: 1px solid var(--accent);
  padding-left: 1rem;
}

.hero-title {
  grid-area: title;
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 2.5rem; /* Space below title to separate from lower content */
  color: #FFFFFF;
  letter-spacing: -0.02em;
  max-width: 850px; 
}

.hero-title .highlight {
  font-style: italic;
  color: var(--accent); 
}

.hero-subtitle {
  grid-area: subtitle;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  
  /* Alignment Fixes for the Right Column */
  justify-self: end;      /* Pushes the subtitle box to the right edge */
  text-align: left;       /* Keeps the text flow readable */
  max-width: 400px;       
  margin-bottom: 0;       
  margin-top: 0.5rem;     
}

.hero-cta-group {
  grid-area: buttons;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-self: start; 
}

/* Floating Caption */
.hero-caption-floating {
  position: absolute;
  bottom: 2rem;
  right: 0;
  text-align: right;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.hero-caption-floating:hover { opacity: 1; }

.caption-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  color: var(--accent);
}
.caption-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

/* ========== BUTTONS (INVERTED FOR DARK BG) ========== */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Reset Base */
.btn-primary, .btn-secondary {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 1, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* White Button (Inverted) */
.btn-primary {
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #FFFFFF;
  padding: 1.1rem 2.4rem;
  min-width: 200px;
}

.btn-primary:hover {
  background: transparent;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Transparent/White Link */
.btn-secondary {
  background: transparent;
  color: #FFFFFF;
  padding: 1.1rem 0;
  border: none;
  position: relative;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.6);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.btn-secondary:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-secondary .arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.btn-secondary:hover .arrow {
  transform: translateX(5px);
}/* ========== SERVICES ========== */
.services-section {
  padding: 6rem 2rem;
}
/* Modal-specific button styling */
.modal-cta.btn-primary {
  background: var(--accent);       /* blue accent from your palette */
  color: #FFFFFF;
  border: 1px solid var(--accent);
}

.modal-cta.btn-primary:hover {
  background: #1A1A1A;             /* darker on hover (or tweak) */
  color: #FFFFFF;
  border-color: #1A1A1A;
}

.services-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.services-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.services-header-text {
  max-width: 900px;
}

.services-subtitle {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 1000px;
  margin: 0 auto 3rem auto;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
}

.services-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.services-gallery-stack {
  position: relative;
  width: 260px;
  height: 340px;
}

.gallery-card {
  --offset: 0px;
  --rot: 0deg;
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.28s ease, z-index 0s linear;
  background: #fff;
  cursor: pointer;
  transform-origin: center;
  transform: translateX(var(--offset)) rotate(var(--rot));
  will-change: transform;
  touch-action: manipulation;
}

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

.gallery-card:nth-child(1) { --offset: 0px; --rot: -3deg; z-index: 4; }
.gallery-card:nth-child(2) { --offset: 24px; --rot: 2deg; z-index: 3; }
.gallery-card:nth-child(3) { --offset: 48px; --rot: -1deg; z-index: 2; }
.gallery-card:nth-child(4) { --offset: 72px; --rot: 3deg; z-index: 1; }

.gallery-card:focus-visible,
.gallery-card:hover {
  transform: translateX(var(--offset)) translateY(-6px) scale(1.03) rotate(var(--rot));
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
  z-index: 10;
  outline: none;
}
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.services-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 4rem;
  max-width: 800px;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-strong);
}

.service-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 1.75rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s ease;
}

.service-item:hover {
  background: #F5F5F4;
}

.service-meta {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.service-main h3 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.service-main p {
  color: var(--ink-soft);
  max-width: 600px;
  margin-bottom: 1rem;
}

.tags {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  line-height: 1.6;
  min-height: 2.2rem;
}

/* ========== CLIENTS ========== */
.clients-section {
  padding: 5rem 2rem;
  background: #F5F5F4;
}

.clients-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.clients-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 4rem;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 6rem;
  border-top: 1px solid var(--border-strong);
  padding-top: 2rem;
}

.client-sector h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.client-sector p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.clients-testimonial blockquote {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  line-height: 1.2;
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.testimonial-source {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ========== MODAL ========== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.open { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 600px;      /* how wide the modal can get */
  max-height: 80vh;      /* ✱ how tall it can get (80% of screen) */
  padding: 3rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  overflow-y: auto;      /* ✱ scroll inside if content is too tall */
}


.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 2rem; line-height: 1;
  opacity: 0.5; transition: opacity 0.2s;
}
.modal-close:hover { opacity: 1; }

.modal-eyebrow {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 1rem;
}

.modal-content h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem; font-weight: 400;
  margin-bottom: 1.5rem;
}

.contact-modal .modal-lede {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-group span {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #FCFCFC;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(101, 143, 211, 0.2);
}

.form-grid .input-group.input-full {
  grid-column: 1 / -1;
}

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

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.form-status {
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

.form-success-banner {
  display: none;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background: #e5f6ea;
  border: 1px solid #b7e3c3;
  color: #1f5f3b;
  font-size: 0.95rem;
}

.form-success-banner.show {
  display: block;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal-details {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #FAFAFA;
  border-left: 2px solid var(--accent);
}
.modal-details ul { list-style: none; }
.modal-details li { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--ink-soft); }

.modal-gallery {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-top: 2rem;
}
.modal-gallery img {
  width: 100%; height: 150px; object-fit: cover;
}

.modal-image {
  width: 100%;
  max-height: 40vh;       /* ✱ cap how tall the image can be */
  height: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  object-fit: cover;      /* keeps it nicely cropped */
}

.modal-image-clickable {
  cursor: zoom-in;
}

.modal-image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-image-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-image-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  background: #fff;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.lightbox.open .lightbox-content {
  transform: translateY(0);
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain; /* keeps the whole image visible */
  display: block;
}


.lightbox-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-caption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ========== FOOTER ========== */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase;
}

/* ========== UTILS & RESPONSIVE ========== */
.reveal { opacity: 0; transform: translateY(20px); transition: 0.6s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-title { font-size: 3.5rem; }
  .clients-grid { grid-template-columns: 1fr 1fr; }
  .services-header { grid-template-columns: 1fr; }
  .services-header-text { text-align: center; margin: 0 auto; }
  .services-gallery { justify-content: center; }
  .services-gallery-stack { width: 220px; height: 300px; margin: 0 auto; }
  .modal-content { max-width: 520px; padding: 2.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .hero { padding-top: 6rem; }
  .service-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .service-meta { font-size: 0.9rem; }
  .clients-grid { grid-template-columns: 1fr; }
  .modal-content { height: 90vh; padding: 2rem; overflow-y: auto; }
  .services-subtitle { margin: 0 auto 3rem auto; text-align: center; }
  .services-gallery-stack { width: 200px; height: 260px; }
  .gallery-card { width: 200px; height: 260px; }
  .gallery-card:nth-child(n+2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .hero-background { will-change: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
