/* ═══════════════════════════════════════════════════════
   Minas Esquadrias — Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ─── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --off-white: #F7F5F2;
  --white:     #FFFFFF;
  --black:     #0B0B0B;
  --dark:      #1A1A1A;
  --mid:       #3D3D3D;
  --muted:     #8A8A8A;
  --silver:    #C8C8C8;
  --border:    rgba(0,0,0,0.08);
  --serif:     'Cormorant Garamond', serif;
  --sans:      'Inter', sans-serif;
  --ease:      cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--off-white);
  color: var(--black);
  overflow-x: hidden;
  cursor: none;
}

/* ─── Custom Cursor ──────────────────────────────────── */
/* top/left stay at 0; position is handled entirely via
   transform so the browser never triggers layout.        */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s;
}
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(11,11,11,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  transition: width 0.5s var(--ease), height 0.5s var(--ease), border-color 0.3s;
}
body.cursor-hover #cursor { width: 16px; height: 16px; }
body.cursor-hover #cursor-ring { width: 56px; height: 56px; border-color: rgba(11,11,11,0.2); }

/* Cursor inverts on dark sections */
body.cursor-dark #cursor { background: var(--white); }
body.cursor-dark #cursor-ring { border-color: rgba(255,255,255,0.4); }
body.cursor-dark.cursor-hover #cursor-ring { border-color: rgba(255,255,255,0.2); }

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--silver); }

/* ─── Progress Bar ───────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, rgba(255,255,255,0.5), rgba(200,200,200,0.8));
  z-index: 200;
  transition: width 0.1s;
}

/* ─── Navigation ─────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.5s var(--ease), background 0.5s var(--ease), backdrop-filter 0.5s;
}
nav.scrolled {
  padding: 14px 60px;
  background: rgba(247,245,242,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
  /* White on dark hero */
  filter: invert(1);
  transition: filter 0.5s var(--ease), height 0.5s var(--ease);
}
nav.scrolled .nav-logo-img {
  /* Black on light nav */
  filter: invert(0);
  height: 32px;
}
.nav-logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-logo-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
  transition: color 0.5s;
}
nav.scrolled .nav-logo-name { color: var(--black); }
.nav-logo-sub {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  transition: color 0.5s;
}
nav.scrolled .nav-logo-sub { color: var(--muted); }

/* Links */
.nav-links-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  position: relative;
  z-index: 1;
}
.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  position: relative;
  padding: 7px 20px;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--white); }
nav.scrolled .nav-links a { color: var(--muted); }
nav.scrolled .nav-links a:hover { color: var(--black); }
.nav-links a.nav-active { color: var(--white); }
nav.scrolled .nav-links a.nav-active { color: var(--black); }

/* ── Tubelight lamp ──────────────────────────────────── */
.nav-lamp {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  /* Spring-like cubic-bezier with slight overshoot */
  transition:
    left  0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}
.nav-lamp.lamp-visible { opacity: 1; }
nav.scrolled .nav-lamp { background: rgba(0,0,0,0.06); }

/* Tubelight glow bar — sits at the top of the pill */
.nav-lamp::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: rgba(255,255,255,0.95);
  border-radius: 0 0 3px 3px;
  box-shadow:
    0 0  6px 2px  rgba(255,255,255,0.55),
    0 0 18px 6px  rgba(255,255,255,0.22),
    0 0 36px 10px rgba(255,255,255,0.08);
}
nav.scrolled .nav-lamp::before {
  background: rgba(11,11,11,0.7);
  box-shadow:
    0 0  6px 2px rgba(0,0,0,0.18),
    0 0 18px 6px rgba(0,0,0,0.07);
}

/* CTA */
.nav-cta {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  background: rgba(255,255,255,0.9);
  padding: 11px 26px;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.nav-cta:hover {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
nav.scrolled .nav-cta {
  color: var(--off-white);
  background: var(--black);
  border-color: var(--black);
}
nav.scrolled .nav-cta:hover {
  background: transparent;
  color: var(--black);
}

/* ─── Hero ───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 60px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--black);
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.018) 2px,
    rgba(255,255,255,0.018) 4px
  );
  z-index: 1;
}
.hero-bg::after {
  content: '';
  position: absolute;
  width: 60vw; height: 60vw;
  top: -20vw; right: -10vw;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  z-index: 2;
  animation: ambient 8s ease-in-out infinite alternate;
}
@keyframes ambient {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-3vw, 4vw) scale(1.1); }
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(255,255,255,0.03) 80px),
    repeating-linear-gradient(90deg, transparent, transparent 119px, rgba(255,255,255,0.03) 120px);
}

.hero-line {
  position: absolute;
  top: 0; right: 160px;
  width: 1px;
  height: 100vh;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
  transform-origin: top center;
  /* Hidden until hero-ready fires */
  opacity: 0;
  transform: scaleY(0);
  z-index: 3;
  will-change: transform;
}
@keyframes line-grow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 52%;
  will-change: transform, opacity;
}

/* ── Hero inline form — absolutely positioned right half */
.hero-form-wrap {
  position: absolute;
  top: 0;
  right: 60px;
  bottom: 0;
  width: 42%;
  z-index: 8;
  display: flex;
  align-items: center;
  visibility: hidden;   /* prevents backdrop-filter from flashing */
  transform: translateY(20px);
}
.hero-form-wrap > form { width: 100%; }
.hero-ready .hero-form-wrap {
  visibility: visible;
  animation: fade-up 1s var(--ease) 1.1s both;
}
/* These now live inside the glass card */
.hero-form-eyebrow {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}
.hero-form-sub {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  margin-bottom: 28px;
}

.hero-tag {
  position: absolute;
  left: 60px;
  /* align with form card top: form is vertically centred (~258px half-height), minus 20px to sit just above */
  top: calc(50% - 248px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
  opacity: 0;           /* stays hidden until hero-ready */
}
.hero-tag::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--silver);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 110px);
  font-weight: 300;
  line-height: 0.92;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}
.hero-title em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.5);
}
.hero-title .word { display: inline-block; overflow: hidden; }
.hero-title .word span {
  display: inline-block;
  transform: translateY(110%); /* stays clipped until hero-ready */
}
@keyframes word-reveal { to { transform: translateY(0); } }

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  opacity: 0;           /* stays hidden until hero-ready */
}
.hero-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 340px;
  letter-spacing: 0.02em;
}
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero animations — fire only after intro closes ─────
   All delays are relative to when .hero-ready is added.  */
.hero-ready .hero-line {
  animation: line-grow 2s var(--ease) 0s both;
}
.hero-ready .hero-tag {
  animation: fade-up 0.9s var(--ease) 0.2s both;
}
.hero-ready .hero-title .word span {
  animation: word-reveal 1.1s var(--ease) both;
}
.hero-ready .hero-title .word:nth-child(1) span { animation-delay: 0.4s; }
.hero-ready .hero-title .word:nth-child(2) span { animation-delay: 0.55s; }
.hero-ready .hero-title .word:nth-child(3) span { animation-delay: 0.7s; }
.hero-ready .hero-title .word:nth-child(4) span { animation-delay: 0.85s; }
.hero-ready .hero-title .word:nth-child(5) span { animation-delay: 1.0s; }
.hero-ready .hero-bottom {
  animation: fade-up 1s var(--ease) 1.3s both;
}
.hero-ready .hero-scroll-line {
  animation: scroll-pulse 2s ease-in-out 2s infinite;
}

/* ─── Section Base ───────────────────────────────────── */
section { padding: 120px 60px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--muted);
}

/* ─── Reveal Animations ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─── About ──────────────────────────────────────────── */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
  background: var(--off-white);
}
.about-visual {
  position: relative;
  height: 600px;
}
.about-img-main {
  position: absolute;
  inset: 0;
  background: var(--dark);
  overflow: hidden;
}
.about-img-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
  /* removed mix-blend-mode — forces separate compositor layer */
}
.about-img-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(45deg,  rgba(255,255,255,0.02) 25%, transparent 25%);
  background-size: 40px 40px;
}
.about-img-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(200,200,200,0.12) 0%, transparent 50%, rgba(100,100,100,0.08) 100%);
}
.about-grid-lines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(255,255,255,0.06) 80px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,0.06) 80px);
  z-index: 1;
}
.about-img-accent {
  position: absolute;
  width: 180px; height: 180px;
  bottom: -30px; right: -30px;
  background: var(--off-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.about-badge { text-align: center; }
.about-badge .num {
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  display: block;
}
.about-badge .label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.about-content { padding-right: 20px; }
.about-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 28px;
}
.about-title em { font-style: italic; color: var(--muted); }
.about-text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--mid);
  margin-bottom: 20px;
}
.about-divider {
  width: 40px; height: 1px;
  background: var(--silver);
  margin: 36px 0;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stat-num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--black);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Products ───────────────────────────────────────── */
#products { background: var(--black); color: var(--white); }
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 80px;
}
.products-title {
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 300;
  line-height: 1.05;
  max-width: 500px;
}
.products-title em { font-style: italic; color: rgba(255,255,255,0.4); }
.products-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(255,255,255,0.45);
  max-width: 280px;
  text-align: right;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
}
.product-card {
  background: var(--black);
  padding: 52px 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease);
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}
.product-card:hover::before { transform: scaleY(1); }
.product-card > * { position: relative; z-index: 1; }
.product-num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em;
  margin-bottom: 36px;
}
.product-icon {
  width: 48px; height: 48px;
  margin-bottom: 32px;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.product-card:hover .product-icon { opacity: 1; transform: scale(1.05); }
.product-name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.2;
}
.product-text {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,0.4);
  margin-bottom: 40px;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.3s, gap 0.3s;
}
.product-link::after { content: '→'; transition: transform 0.3s var(--ease); }
.product-card:hover .product-link { color: var(--white); gap: 14px; }
.product-card:hover .product-link::after { transform: translateX(4px); }

/* ─── Glowing border effect (product cards + process steps) ────
   Conic-gradient border arc tracks the mouse position.
   The mask trick: padding-box mask = hides card interior,
   border-box mask = conic arc → only the arc on the border shows. */
.product-card,
.process-step { --active: 0; --start: 0; }

.product-card::after,
.process-step::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background-attachment: fixed;
  opacity: var(--active);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 3;

  -webkit-mask-clip: padding-box, border-box;
          mask-clip: padding-box, border-box;
  -webkit-mask-composite: destination-in;
          mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--start) - 28) * 1deg),
      transparent 0deg, #fff, transparent 56deg
    );
          mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--start) - 28) * 1deg),
      transparent 0deg, #fff, transparent 56deg
    );
}

/* Dark cards → silver/white glow */
.product-card::after {
  background:
    radial-gradient(circle, rgba(220,220,220,0.7) 10%, transparent 20%),
    repeating-conic-gradient(
      from 236.84deg at 50% 50%,
      rgba(160,160,160,0.55)   0%,
      rgba(255,255,255,0.95)  25%,
      rgba(120,120,120,0.35)  50%,
      rgba(160,160,160,0.55) 100%
    );
}

/* Light cards → dark/charcoal glow */
.process-step::after {
  background:
    repeating-conic-gradient(
      from 236.84deg at 50% 50%,
      rgba(60,60,60,0.4)   0%,
      rgba(11,11,11,0.85) 25%,
      rgba(40,40,40,0.2)  50%,
      rgba(11,11,11,0.6) 100%
    );
  -webkit-mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--start) - 28) * 1deg),
      transparent 0deg, #000, transparent 56deg
    );
          mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--start) - 28) * 1deg),
      transparent 0deg, #000, transparent 56deg
    );
}

/* ─── Process ────────────────────────────────────────── */
#process { background: var(--off-white); }
.process-header { margin-bottom: 80px; }
.process-title {
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 300;
  line-height: 1.05;
  max-width: 600px;
  margin-bottom: 20px;
}
.process-title em { font-style: italic; color: var(--muted); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.process-step {
  background: var(--off-white);
  padding: 52px 36px;
  transition: background 0.4s var(--ease);
}
.process-step:hover { background: var(--white); }
.step-num {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 300;
  color: var(--silver);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}
.step-line {
  width: 32px; height: 1px;
  background: var(--silver);
  margin-bottom: 28px;
  transition: width 0.4s var(--ease);
}
.process-step:hover .step-line { width: 52px; }
.step-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--black);
  margin-bottom: 14px;
  line-height: 1.2;
}
.step-text {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
}

/* ─── Marquee ────────────────────────────────────────── */
#marquee {
  padding: 0;
  overflow: hidden;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 28px 40px;
  white-space: nowrap;
}
.marquee-text {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.04em;
}
.marquee-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

/* ─── Projects ───────────────────────────────────────── */
#projects { background: var(--off-white); }
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}
.projects-title {
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 300;
  line-height: 1.05;
}
.projects-title em { font-style: italic; color: var(--muted); }
.projects-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s, gap 0.3s;
}
.projects-all::after { content: '→'; transition: transform 0.3s var(--ease); }
.projects-all:hover { color: var(--black); gap: 14px; }
.projects-all:hover::after { transform: translateX(4px); }

.projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.project-item {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  background-size: cover;
  background-position: center;
  cursor: none;
}
.project-item:nth-child(1) { grid-row: 1 / 3; height: 680px; }
.project-item:nth-child(2) { height: 332px; }
.project-item:nth-child(3) { height: 332px; }
.project-item::before {
  content: '';
  position: absolute;
  inset: 0;
  transition: transform 0.8s var(--ease);
}
.project-item:nth-child(1)::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.72) 100%);
}
.project-item:nth-child(2)::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.75) 100%);
}
.project-item:nth-child(3)::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.75) 100%);
}
.project-item:hover::before { transform: scale(1.05); }
.project-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px;
  z-index: 2;
  transform: translateY(8px);
  transition: transform 0.4s var(--ease);
}
.project-item:hover .project-info { transform: translateY(0); }
.project-cat {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}
.project-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
}

/* ─── Testimonials — Animated Tooltip ───────────────── */
#testimonials {
  background: var(--black);
  color: var(--white);
  padding: 140px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 60px;
}
.tt-content { max-width: 560px; }
.tt-heading {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 300;
  line-height: 1.1;
  margin-top: 16px;
  margin-bottom: 20px;
}
.tt-heading em { font-style: italic; color: rgba(255,255,255,0.35); }
.tt-sub {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.4);
}

/* ── Overlapping avatar row ──────────────────────────── */
.tt-row {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-item {
  position: relative;
  margin-right: -16px;
  cursor: pointer;
  z-index: 1;
}
.tt-item:last-child { margin-right: 0; }
.tt-item:hover { z-index: 10; }

.tt-avatar {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1a1a1a;
  transition: transform 0.35s var(--ease);
}
.tt-item:hover .tt-avatar { transform: scale(1.1); }

/* ── Spring tooltip ──────────────────────────────────── */
.tt-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  background: var(--white);
  color: var(--black);
  border-radius: 8px;
  padding: 10px 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.18s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  transform: translateX(-50%) rotate(0deg);
}
.tt-item:hover .tt-tooltip { opacity: 1; }

.tt-tip-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  line-height: 1.2;
}
.tt-tip-role {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.4);
  margin-top: 4px;
}

/* ── Rating ──────────────────────────────────────────── */
.tt-rating { display: flex; align-items: center; gap: 12px; }
.tt-stars  { font-size: 16px; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); }
.tt-rating-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ─── Contact ────────────────────────────────────────── */
#contact {
  background: var(--off-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

/* ── Contact form — dark-on-light overrides ─────────────
   The shared .form-card and .field styles are white-on-dark
   (designed for the hero). Override everything for the
   light #contact background.                             */
#contact .form-card {
  background: var(--white);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.08);
  border-top-color: rgba(0,0,0,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
#contact .field input,
#contact .field textarea,
#contact .field select {
  color: var(--black);
  border-bottom-color: rgba(0,0,0,0.15);
}
#contact .field label {
  color: rgba(0,0,0,0.35);
}
#contact .field input:focus        ~ label,
#contact .field input:not(:placeholder-shown) ~ label,
#contact .field textarea:focus     ~ label,
#contact .field textarea:not(:placeholder-shown) ~ label,
#contact .field select:focus       ~ label,
#contact .field select.sel-filled  ~ label {
  color: rgba(0,0,0,0.5);
}
#contact .field-line {
  background: var(--black);
}
#contact .select-chevron {
  color: rgba(0,0,0,0.3);
}
#contact .btn-submit {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
#contact .btn-submit:hover {
  background: var(--dark);
  border-color: var(--dark);
}
#contact .field input.field-error {
  border-bottom-color: rgba(200, 40, 40, 0.5);
}
#contact .field input.field-error ~ label {
  color: rgba(180, 40, 40, 0.7);
}
#contact .field input.field-error ~ .field-line {
  background: rgba(200, 40, 40, 0.7);
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 28px;
}
.contact-title em { font-style: italic; color: var(--muted); }
.contact-text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--mid);
  margin-bottom: 52px;
}
.contact-details { display: flex; flex-direction: column; gap: 24px; }
.contact-item-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-item-value {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--black);
  text-decoration: none;
  transition: color 0.3s;
  display: block;
}
.contact-item-value:hover { color: var(--muted); }

/* ── Form card — frosted glass ───────────────────────────── */
.form-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,255,255,0.22);
  padding: 36px 40px 40px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.08) inset;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

/* ── Floating-label field ────────────────────────────────── */
.field {
  position: relative;
  margin-bottom: 32px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  padding: 22px 0 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--white);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s;
}
.field textarea { resize: none; height: 80px; }
.field select   { cursor: none; padding-right: 22px; }

/* Label floats above on focus / fill */
.field label {
  position: absolute;
  top: 22px;
  left: 0;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  pointer-events: none;
  transition: top .25s var(--ease), font-size .25s var(--ease),
              letter-spacing .25s var(--ease), color .25s var(--ease);
}
.field input:focus        ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus     ~ label,
.field textarea:not(:placeholder-shown) ~ label,
.field select:focus       ~ label,
.field select.sel-filled  ~ label {
  top: 4px;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* Error state — red underline + label tint */
.field input.field-error {
  border-bottom-color: rgba(255, 80, 80, 0.6);
}
.field input.field-error ~ label {
  color: rgba(255, 100, 100, 0.7);
}
.field input.field-error ~ .field-line {
  background: rgba(255, 80, 80, 0.8);
  transform: scaleX(1);
}

/* Animated focus underline — scales from left */
.field-line {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
  pointer-events: none;
}
.field:focus-within .field-line { transform: scaleX(1); }

/* Select chevron */
.select-chevron {
  position: absolute;
  right: 2px;
  top: 26px;
  width: 10px;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  transition: transform 0.3s var(--ease);
}
.field select:focus ~ .select-chevron { transform: rotate(180deg); }

/* ── Submit button ─────────────────────────────────────── */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px 32px;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.btn-submit:hover {
  background: transparent;
  color: var(--white);
}
.btn-submit:disabled {
  opacity: 0.6;
  pointer-events: none;
}
.btn-submit.btn-success {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.2);
}
.btn-icon {
  width: 14px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}
.btn-submit:hover .btn-icon { transform: translateX(4px); }

/* ── Form success state ────────────────────────────────── */
.form-card.card-sent {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}
.form-card.card-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease);
}
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  animation: success-in 0.6s var(--ease) both;
}
@keyframes success-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-success-check {
  width: 72px;
  height: 72px;
}
.form-success-check svg {
  width: 100%;
  height: 100%;
}
.check-path {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}
.form-success-title {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
}
.form-success-text {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
}

/* ─── Footer ─────────────────────────────────────────── */
footer {
  background: var(--black);
  color: var(--white);
  padding: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.footer-logo-img {
  height: 28px;
  width: auto;
  filter: invert(1);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.footer-logo:hover .footer-logo-img { opacity: 1; }
.footer-logo-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s;
}
.footer-logo:hover .footer-logo-name { color: var(--white); }
.footer-copy {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.2);
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 32px;
  justify-content: flex-end;
}
.footer-links a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--white); }

/* ─── Responsive ─────────────────────────────────────── */

/* ── Tablet landscape (≤ 1024px) ─────────────────────── */
@media (max-width: 1024px) {
  nav, nav.scrolled  { padding-left: 36px; padding-right: 36px; }
  section            { padding: 90px 36px; }
  #hero              { padding: 0 36px 60px; column-gap: 36px; }
  #about             { grid-template-columns: 1fr; gap: 60px; }
  .about-content     { padding-right: 0; }
  .products-grid     { grid-template-columns: 1fr; }
  .process-steps     { grid-template-columns: 1fr 1fr; }
  #contact           { grid-template-columns: 1fr; gap: 60px; }
  footer             { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-links      { grid-column: 1 / -1; justify-content: flex-start; }
  .footer-copy       { text-align: left; }
}

/* ── Tablet portrait / large phones (≤ 768px) ──────────── */
@media (max-width: 768px) {
  /* Nav */
  nav, nav.scrolled  { padding-left: 20px; padding-right: 20px; height: 60px; }
  .nav-links-wrap    { display: none; }
  .nav-cta           { font-size: 9px; padding: 9px 18px; }

  /* Base */
  section            { padding: 72px 24px; }
  #hero              { padding: 0 24px 56px; }

  /* Hero */
  .hero-form-wrap    { display: none; }
  .hero-line         { display: none; }
  /* hero-tag: restore to normal flow, aligned above title */
  .hero-tag          { position: static; top: auto; left: auto; margin-bottom: 20px; }
  .hero-title        { font-size: clamp(40px, 11vw, 68px); }
  .hero-bottom       { flex-direction: column; align-items: flex-start; gap: 32px; }

  /* About */
  #about             { grid-template-columns: 1fr; gap: 48px; }
  .about-content     { padding-right: 0; }

  /* Products */
  .products-header   { flex-direction: column; align-items: flex-start; gap: 20px; }
  .products-desc     { text-align: left; }
  .products-grid     { grid-template-columns: 1fr; }

  /* Process */
  .process-steps     { grid-template-columns: 1fr; }

  /* Projects */
  .projects-grid     { grid-template-columns: 1fr; }
  .projects-header   { flex-direction: column; align-items: flex-start; gap: 20px; }
  .project-item      { height: 300px !important; grid-row: auto !important; }

  /* Testimonials */
  #testimonials      { padding: 80px 24px; gap: 40px; }
  .tt-avatar         { width: 48px; height: 48px; }
  .tt-item           { margin-right: -14px; }

  /* Contact */
  #contact           { grid-template-columns: 1fr; gap: 48px; }
  .form-card         { padding: 32px 24px; border-radius: 16px; }
  .form-grid         { grid-template-columns: 1fr; }
  .field select      { cursor: pointer; }

  /* Footer */
  footer             { grid-template-columns: 1fr; gap: 28px; padding: 40px 24px; }
  .footer-copy       { text-align: left; }
  .footer-links      { justify-content: flex-start; flex-wrap: wrap; gap: 14px 24px; }

  /* Cursor: off on touch devices */
  body               { cursor: auto; }
  #cursor,
  #cursor-ring       { display: none; }
  .form-select,
  .btn-submit,
  .intro-skip        { cursor: pointer; }

  /* Intro — keep canvas visible, tune text for mobile */
  .intro-text        { padding: 0 28px; width: 100%; }
  .intro-title       { font-size: clamp(52px, 13vw, 96px); }
  .intro-tagline     { font-size: clamp(14px, 4vw, 20px); }
  .intro-skip        { margin-top: 40px; cursor: pointer; }
}

/* ── Phones (≤ 480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  section            { padding: 60px 20px; }
  #hero              { padding: 0 20px 48px; }
  .hero-title        { font-size: clamp(34px, 12vw, 52px); }
  nav, nav.scrolled  { padding-left: 16px; padding-right: 16px; }

  /* Testimonials: tighter overlap */
  .tt-avatar         { width: 42px; height: 42px; }
  .tt-item           { margin-right: -12px; }
  .tt-tip-name       { font-size: 12px; }
  .tt-tip-role       { font-size: 8px; }

  /* Footer */
  footer             { padding: 36px 20px; }
  .footer-links      { gap: 12px 18px; }

  /* Intro */
  .intro-title       { font-size: clamp(44px, 14vw, 80px); }
  .intro-text        { padding: 0 20px; }
  .intro-eyebrow     { letter-spacing: 0.16em; font-size: 8px; }
}

/* ── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
  #intro { display: none !important; }
}


/* ─── Intro Screen ───────────────────────────────────── */
#intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
/* Zoom-in exit: overlay punches forward and dissolves */
#intro.intro-out {
  opacity: 0;
  transform: scale(1.5);
  pointer-events: none;
}
#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.intro-text {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.intro-logo {
  width: clamp(48px, 6vw, 72px);
  height: auto;
  filter: invert(1);
  opacity: 0;
  margin-bottom: 32px;
  animation: intro-up 1s var(--ease) 0.1s forwards;
}
.intro-eyebrow {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 24px;
  opacity: 0;
  animation: intro-up 0.9s var(--ease) 0.4s forwards;
}
.intro-title {
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 32px;
  opacity: 0;
  animation: intro-up 1.1s var(--ease) 0.65s forwards;
}
.intro-tagline {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  opacity: 0;
  animation: intro-up 1s var(--ease) 1.0s forwards;
}
.intro-tagline em {
  font-style: normal;
  color: rgba(255,255,255,0.85);
}
/* Button lives inside .intro-text, centered below tagline */
.intro-skip {
  pointer-events: auto;
  margin-top: 52px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  color: rgba(255,255,255,0.35);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 12px 28px;
  cursor: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s, border-color 0.3s;
  opacity: 0;
  animation: intro-up 0.8s var(--ease) 1.7s forwards;
}
.intro-skip:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.5);
}
@keyframes intro-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cursor stays white while intro is in the DOM */
body:has(#intro) #cursor      { background: var(--white); }
body:has(#intro) #cursor-ring { border-color: rgba(255,255,255,0.4); }

/* ─── Stat labels update ─────────────────────────────── */
.stat-num sup {
  font-size: 0.5em;
  vertical-align: super;
  font-family: var(--sans);
  font-weight: 300;
}
