:root {
  --bg:           #F4EFE7;
  --bg-surface:   #ECE7DE;
  --bg-card:      #E7E2D8;
  --text-primary: #1C1916;
  --text-muted:   #8A8178;
  --accent:       #C85228;
  --accent-hover: #E06038;
  --border:       rgba(28, 25, 22, 0.1);
  --border-hi:    rgba(200, 82, 40, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(244, 239, 231, 0.70);
  backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.65rem;
  letter-spacing: 0.1em;
  color: #F0EAE0;   /* light — readable on hero image */
  text-decoration: none;
  transition: color 0.4s;
}
.nav-logo em { color: var(--accent); font-style: normal; }
.logo-short { display: none; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 234, 224, 0.78);  /* light — readable on hero image */
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
/* When scrolled onto light-bg content, flip to dark */
nav.scrolled .nav-logo { color: var(--text-primary); }
nav.scrolled .nav-links a { color: var(--text-muted); }
nav.scrolled .nav-links a:hover { color: var(--text-primary); }

/* ── HERO ── */
#hero {
  min-height: min(710px, 100vh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5.5rem;
  position: relative;
  overflow: hidden;

  /* Hero image — gradient darkens toward bottom where text sits,
     leaving the brilliant sky exposed at top.
     background-position: center 35% crops a little off the bottom
     dark water and keeps the golden sky prominent. */
  background-image:
    linear-gradient(
      to bottom,
      rgba(8,  6,  4, 0.06) 0%,
      rgba(8,  6,  4, 0.28) 45%,
      rgba(8,  6,  4, 0.62) 72%,
      rgba(8,  6,  4, 0.80) 100%
    ),
    url('./images/hero-bg.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;

  /* Override text-related custom properties so all
     child elements automatically get light colors */
  --text-primary: #F0EAE0;
  --text-muted:   rgba(240, 234, 224, 0.62);
  --border-hi:    rgba(200, 82, 40, 0.7);
}

/* Large watermark word behind everything */
.hero-bg-word {
  position: absolute;
  top: 50%;
  right: -4vw;
  transform: translateY(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(12rem, 34vw, 50rem);
  color: rgba(255, 255, 255, 0.1);  /* white tint on image */
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Two-column inner layout */
.hero-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: flex-end;
}

.hero-left {
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.5rem, 13vw, 15rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.hero-headline .hollow {
  -webkit-text-stroke: 1.5px rgba(240, 234, 224, 0.45);  /* light stroke on image */
  color: transparent;
}

/* Right panel: badge, tagline, CTA stacked */
.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2rem;
  padding-bottom: 0.5rem;
}

.hero-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-badge::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-hi);
  padding: 1.1rem 2.2rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  align-self: flex-start;
  white-space: nowrap;
}
.hero-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero-cta svg { transition: transform 0.3s; }
.hero-cta:hover svg { transform: translateX(5px); }

.scroll-hint {
  position: absolute;
  bottom: 2.25rem;
  left: 3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.scroll-hint::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; width: 2.5rem; }
  50%       { opacity: 1;   width: 4rem; }
}

/* ── SECTION BASE ── */
section { padding: 8rem 3rem; position: relative; }
.ruled { border-top: 1px solid var(--border); }

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.section-label::after {
  content: '';
  display: block;
  flex: 0 0 2rem;
  height: 1px;
  background: var(--accent);
}

.ghost-num {
  position: absolute;
  top: 3.5rem;
  right: 2.5rem;
  width: clamp(6rem, 14vw, 14rem);
  height: clamp(6rem, 14vw, 14rem);
  color: rgba(28, 25, 22, 0.05);
  pointer-events: none;
  user-select: none;
}

/* ── SERVICES ── */
/* Two-column header: label+title left, intro right */
.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-end;
  margin-bottom: 5rem;
}

.services-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 6.5rem);
  line-height: 0.93;
}

.services-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-style: italic;
  padding-bottom: 0.25rem; /* align baseline with title bottom */
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.service-card {
  padding: 3rem 2.5rem 3.5rem;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}
.service-card:last-child { border-right: none; }
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover::after { transform: scaleX(1); }
.service-card:hover { background: rgba(200, 82, 40, 0.05); }

.svc-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: rgba(28, 25, 22, 0.22);
  margin-bottom: 2rem;
  flex-shrink: 0;
}
.svc-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1;
}
.svc-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
}

.pull-quote {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.25;
  color: var(--text-primary);
  position: relative;
  padding-left: 1.5rem;
}
.pull-quote::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.about-copy p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.about-copy p strong { color: var(--text-primary); font-weight: 600; }
.about-copy p:last-child { margin-bottom: 0; }

/* ── WORK ── */
/* Two-column header: label+title left, intro right */
.work-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.work-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 6.5rem);
  line-height: 0.93;
}

.work-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-style: italic;
  padding-bottom: 0.25rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s;
  cursor: default;
}
.work-card:hover {
  border-color: rgba(200, 82, 40, 0.5);
  transform: translateY(-6px);
}

.work-thumb {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Real screenshot thumbnails */
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.work-card:hover .work-thumb img { transform: scale(1.04); }

.work-mono {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5rem;
  color: rgba(255,255,255,0.1);
  letter-spacing: 0.1em;
  transition: transform 0.4s;
}
.work-card:hover .work-mono { transform: scale(1.08); }

.work-body { padding: 1.75rem 2rem 2.25rem; }
.work-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.work-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1;
}
.work-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 7rem;
  align-items: start;
}
.contact-left h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: 0.92;
  margin-bottom: 2rem;
}
.contact-left p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 3rem;
}
.contact-meta { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1em; }
.contact-meta-item { display: flex; align-items: flex-start; gap: 1rem; }
.meta-icon {
  width: 1.1rem; height: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.meta-text strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.meta-text span { font-size: 0.95rem; color: var(--text-primary); line-height: 1.5; }

/* Form */
form { display: flex; flex-direction: column; }
.field {
  position: relative;
  border: 1px solid var(--border);
  margin-bottom: -1px;
  background: rgba(28, 25, 22, 0.02);
  transition: border-color 0.25s;
}
.field:focus-within { border-color: var(--border-hi); z-index: 2; }
.field label {
  position: absolute;
  top: 0.9rem;
  left: 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 2.4rem 1.5rem 1rem;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: var(--text-primary);
  resize: none;
}
.field textarea { min-height: 10rem; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); opacity: 0.45; }

/* Validation error state */
.field.error { border-color: #B0362A; }
.field-error {
  display: none;
  padding: 0.4rem 1.5rem 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: #B0362A;
}
.field.error .field-error { display: block; }

.submit-btn {
  margin-top: 1.5rem;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1.15rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.submit-btn:hover { background: var(--accent-hover); }
.submit-btn svg { transition: transform 0.3s; }
.submit-btn:hover svg { transform: translateX(4px); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.footer-copy {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ── REVEAL ── */
.r {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.85s cubic-bezier(0.4,0,0.2,1),
              transform 0.85s cubic-bezier(0.4,0,0.2,1);
}
.r.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-right { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; }
  .hero-tagline { flex: 1 1 24ch; }
  .services-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .work-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.5rem; border: none; }
  .service-card { border: 1px solid var(--border); }
  .service-card:last-child { border-right: 1px solid var(--border); }
  .about-grid { grid-template-columns: 1fr; gap: 4rem; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
}
@media (max-width: 768px) {
  section { padding: 5rem 1.5rem; }
  nav { padding: 1.25rem 1.5rem; }
  #hero { padding: 0 1.5rem 4rem; }
  .scroll-hint { left: 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .ghost-num { width: 5rem; height: 5rem; }
  footer { padding: 1.5rem; }
  .logo-full { display: none; }
  .logo-short { display: inline; }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
  .hero-right { flex-direction: column; align-items: flex-start; }
}
