/* ============================================================
   GenTech Construction — visual system
   Cinematic, architectural, premium
   ============================================================ */

:root {
  /* Palette — moody forest + bronze (default dark) */
  --bg:        #13140F;     /* deep charcoal-green */
  --bg-2:      #1B1D17;     /* surface */
  --bg-3:      #24281E;     /* raised */
  --line:      #2F342A;     /* hairline */
  --line-2:    #3A4034;     /* moss line */
  --moss:      #3A4034;     /* deep moss */
  --sage:      #7A8569;     /* muted sage */
  --bronze:    #B0825A;     /* warm bronze */
  --bronze-2:  #C39A6B;     /* lit bronze */
  --bone:      #EDE8DC;     /* primary text */
  --bone-2:    #C8C3B6;     /* secondary text */
  --bone-3:    #8C887C;     /* tertiary / muted */
  --bone-4:    #5A5A50;     /* deep muted */

  /* Type */
  --serif:  "Cormorant Garamond", "Cormorant", "Times New Roman", serif;
  --sans:   "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:   "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Scale */
  --pad:    clamp(20px, 4vw, 72px);
  --gap:    clamp(16px, 2vw, 32px);
  --radius: 2px;
}

[data-theme="light"] {
  --bg:        #F4F1EA;
  --bg-2:      #ECE7DA;
  --bg-3:      #E1DBCB;
  --line:      #D6CFBD;
  --line-2:    #BFB69E;
  --moss:      #3A4034;
  --sage:      #6E7A5C;
  --bronze:    #8B6234;
  --bronze-2:  #A37544;
  --bone:      #1A1B16;
  --bone-2:    #3D3D34;
  --bone-3:    #6B6A5D;
  --bone-4:    #8E8D7F;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--bone); }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Selection */
::selection { background: var(--bronze); color: var(--bg); }

/* Scrollbar — barely there */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* Headings */
h1, h2, h3, h4, .serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.italic { font-style: italic; }

/* Eyebrows / micro labels */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bronze); margin-right: 10px; vertical-align: middle;
  transform: translateY(-1px);
}

a { color: inherit; text-decoration: none; }

/* Layout helpers */
.page { width: 100%; }
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section.tight { padding: clamp(48px, 6vw, 96px) 0; }
.divider { height: 1px; background: var(--line); width: 100%; }

/* Hairline rule */
.rule { height: 1px; background: var(--line); width: 100%; margin: 0; border: 0; }

/* Image base */
.img {
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.img::after {
  /* film grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.4'/></svg>");
  mix-blend-mode: overlay;
  opacity: .22;
  pointer-events: none;
}

/* Cinematic hero gradient overlay */
.cine-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,16,12,.55) 0%, rgba(15,16,12,.10) 30%, rgba(15,16,12,.20) 60%, rgba(15,16,12,.90) 100%);
  pointer-events: none;
}

/* Buttons */
.btn {
  --bd: var(--bone);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  border-radius: 0;
  transition: background .35s ease, color .35s ease, border-color .35s ease, padding .35s ease;
  position: relative;
  overflow: hidden;
  font-weight: 500;
}
.btn:hover { background: var(--bone); color: var(--bg); }
.btn.bronze { --bd: var(--bronze); color: var(--bone); }
.btn.bronze:hover { background: var(--bronze); color: var(--bg); border-color: var(--bronze); }
.btn.ghost { border-color: var(--line-2); color: var(--bone-2); }
.btn.ghost:hover { border-color: var(--bone); color: var(--bone); background: transparent; }
.btn.sm { padding: 10px 14px; font-size: 10.5px; }
.btn .arr {
  display: inline-block; transition: transform .35s ease;
}
.btn:hover .arr { transform: translateX(4px); }

/* Inline link */
.lnk {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--bone);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--bone-4);
  padding-bottom: 3px;
  transition: border-color .3s ease, color .3s ease;
}
.lnk:hover { border-color: var(--bronze); color: var(--bronze-2); }

/* Marquee underline link */
.uline {
  position: relative; display: inline-block;
}
.uline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s cubic-bezier(.7,0,.2,1);
}
.uline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Card */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 24px;
}

/* Number ticker */
.num {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .35s ease, backdrop-filter .35s ease, padding .35s ease;
  color: var(--bone);
}
.nav.scrolled {
  background: rgba(19,20,15,.72);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
[data-theme="light"] .nav.scrolled { background: rgba(244,241,234,.82); }

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
}
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1px solid var(--bone);
  font-family: var(--serif); font-size: 16px; font-style: italic; font-weight: 500;
  line-height: 1;
}
.brand .name { display: flex; flex-direction: column; line-height: 1.1; }
.brand .name b { font-weight: 600; letter-spacing: .22em; }
.brand .name small { font-size: 9px; letter-spacing: .3em; color: var(--bone-3); font-weight: 400; }

.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-2); font-weight: 500;
  padding: 6px 0;
  position: relative;
  cursor: pointer;
  transition: color .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--bone); }
.nav-links a.active::before {
  content: ""; position: absolute; left: 50%; bottom: -2px;
  width: 4px; height: 4px; background: var(--bronze); border-radius: 50%;
  transform: translateX(-50%);
}

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-meta {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-3); font-weight: 500;
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

/* ============================================================
   DENSITY MODE
   ============================================================ */
[data-density="compact"] {
  --pad: clamp(16px, 2.5vw, 48px);
  --gap: clamp(12px, 1.5vw, 22px);
}
[data-density="compact"] .section { padding: clamp(56px, 7vw, 96px) 0; }
[data-density="compact"] body { font-size: 14px; }

/* ============================================================
   MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
[data-motion="off"] .reveal { opacity: 1; transform: none; transition: none; }
[data-motion="off"] * { animation-duration: 0s !important; transition-duration: 0s !important; }

/* Footer */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 96px var(--pad) 32px;
}
.footer .ft-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px;
  padding-bottom: 64px; border-bottom: 1px solid var(--line);
}
.footer h6 {
  font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-3); font-weight: 500; margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; color: var(--bone-2); }
.footer ul a:hover { color: var(--bone); }
.footer .ft-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-3);
}

/* Project tile */
.tile { position: relative; overflow: hidden; cursor: pointer; }
.tile .tile-img { transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.tile:hover .tile-img { transform: scale(1.04); }
.tile .tile-meta {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  display: flex; justify-content: space-between; align-items: flex-end;
  color: var(--bone);
}
.tile .tile-meta h3 {
  font-size: clamp(22px, 2vw, 32px);
}
.tile .tile-meta .meta-r { text-align: right; }
.tile .ti-num {
  position: absolute; top: 24px; left: 24px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--bone-2);
}
.tile .ti-cat {
  position: absolute; top: 24px; right: 24px;
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-2);
  padding: 5px 10px; border: 1px solid var(--bone-4);
  background: rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* Aspect ratios */
.ar-4-5 { aspect-ratio: 4 / 5; }
.ar-3-4 { aspect-ratio: 3 / 4; }
.ar-1-1 { aspect-ratio: 1 / 1; }
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-21-9 { aspect-ratio: 21 / 9; }
.ar-2-3 { aspect-ratio: 2 / 3; }
.ar-3-2 { aspect-ratio: 3 / 2; }

/* Marquee */
.marquee {
  overflow: hidden; position: relative;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 28px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .track {
  display: flex; gap: 64px; width: max-content;
  animation: scroll 50s linear infinite;
  font-family: var(--serif); font-size: clamp(28px, 3vw, 44px);
  align-items: center;
}
.marquee .track span.dot { color: var(--bronze); }
@keyframes scroll {
  to { transform: translateX(-50%); }
}
[data-motion="off"] .marquee .track { animation: none; }

/* Subtle vertical mark on the side */
.side-mark {
  position: fixed; left: 28px; bottom: 28px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em;
  color: var(--bone-3); writing-mode: vertical-rl; transform: rotate(180deg);
  z-index: 50; pointer-events: none;
}

/* Map */
.map-wrap { position: relative; background: var(--bg-2); border: 1px solid var(--line); }
.map-pin {
  position: absolute; width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.map-pin::before {
  content: ""; position: absolute; inset: 4px; background: var(--bronze); border-radius: 50%;
}
.map-pin::after {
  content: ""; position: absolute; inset: 0; border: 1px solid var(--bronze);
  border-radius: 50%; animation: ping 2.4s ease-out infinite;
}
.map-pin.active::before { background: var(--bone); box-shadow: 0 0 0 4px rgba(176,130,90,.35); }
@keyframes ping {
  0% { transform: scale(.6); opacity: .9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Tabs / chips */
.chip {
  font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 8px 14px; border: 1px solid var(--line-2); color: var(--bone-2);
  background: transparent; cursor: pointer; transition: all .25s ease;
  font-weight: 500;
}
.chip:hover { color: var(--bone); border-color: var(--bone-3); }
.chip.active { background: var(--bone); color: var(--bg); border-color: var(--bone); }

/* Portal */
.portal-bg { background: var(--bg-2); border: 1px solid var(--line); }
.progress-bar { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.progress-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0; background: var(--bronze);
}

/* Phone frame */
.phone {
  width: 360px; height: 740px;
  background: #0A0B08;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 0 0 1px var(--line-2);
  position: relative;
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
  background: var(--bg); position: relative;
}
.phone .notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 28px; background: #000; border-radius: 16px; z-index: 10;
}

/* Section title block */
.s-title {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--gap);
  margin-bottom: 64px; align-items: end;
}
.s-title h2 {
  font-size: clamp(40px, 5vw, 76px);
}
.s-title .s-sub { color: var(--bone-2); max-width: 520px; font-size: 15px; line-height: 1.65; }

@media (max-width: 900px) {
  .s-title { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  .grid-3, .grid-4, .grid-12 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer .ft-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .side-mark { display: none; }
}
