/*
Theme Name: TechLambo Lamp
Theme URI: https://techlambo.com
Author: Jayson
Description: Single-lamp workshop landing page for TechLambo. Cinematic storytelling and intelligent automation, everything under one warm sodium light.
Version: 1.4.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techlambo-lamp
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --gold: #c89a3d;
  --sodium: #f7c96b;
  --text: #f5f5f5;
  --muted: #9e9e9e;
  --line: rgba(245, 245, 245, 0.08);
  --line-warm: rgba(200, 154, 61, 0.28);
  --radius: 18px;
  --font-head: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  --light: 1; /* 0 = lamp off, 1 = full warm light */
  --lamp-x: 62%;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

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

::selection { background: rgba(200, 154, 61, 0.35); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 36px;
  padding-right: 36px;
}

/* ------------------------------------------------------------------
   Stage (all page content lives here, under the light)
------------------------------------------------------------------ */
.stage { position: relative; z-index: 1; }

/* Darkness veil: sits above content, below the lamp rig */
.veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #090909;
  opacity: calc((1 - var(--light)) * 0.94);
  pointer-events: none;
  transition: opacity 1.15s cubic-bezier(0.4, 0, 0.2, 1);
}
html.dragging .veil { transition-duration: 0.05s; }

/* ------------------------------------------------------------------
   Lamp rig: cable, shade, chain, dimmer, light cone, dust
------------------------------------------------------------------ */
.lamp-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  /* promote to its own GPU layer so scrolling content doesn't repaint the
     expensive blurred cone/hotspot every frame */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.lamp-swing {
  position: absolute;
  top: 0;
  left: var(--lamp-x);
  width: 0;
  height: 100%;
  transform-origin: top center;
  animation: sway 11s ease-in-out infinite alternate;
  /* travels sideways to spotlight the section being read */
  transition: left 1.6s cubic-bezier(0.33, 0, 0.2, 1);
  will-change: left;
}

@keyframes sway {
  from { transform: rotate(-0.35deg); }
  to   { transform: rotate(0.4deg); }
}

/* past the hero the lamp tucks up so it stops covering content */
.lamp-lift {
  position: absolute;
  inset: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
html.lamp-tucked .lamp-lift { transform: translateY(-118px) scale(0.88); transform-origin: top center; }

.lamp-svg {
  position: absolute;
  top: 0;
  left: -170px;
  width: 340px;
  max-width: none;
  height: 330px;
  overflow: visible;
}

/* clay lamp artwork: dome rim scaled to land exactly at SVG y213 */
.clay-lamp {
  position: absolute;
  top: 0;
  left: -170px;
  width: 340px;
  max-width: none;
  height: auto;
  filter: brightness(calc(0.3 + var(--light) * 0.7));
  transition: filter 1.15s ease;
}
html.dragging .clay-lamp { transition-duration: 0.05s; }

.chain-btn, .dimmer-knob { pointer-events: auto; cursor: pointer; outline: none; }
.dimmer-knob { cursor: grab; }
.dimmer-knob:active { cursor: grabbing; }
.chain-btn:focus-visible circle.chain-ball,
.dimmer-knob:focus-visible .knob-face {
  stroke: var(--sodium);
  stroke-width: 2;
}

/* chain pull animation */
.chain-group { transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.chain-group.pulled { transform: translateY(14px); }

/* bulb + inner shade react to light */
.bulb-core { transition: opacity 1.1s ease; opacity: var(--light); }
.bulb-halo { transition: opacity 1.1s ease; opacity: var(--light); }
.shade-inner-glow { transition: opacity 1.1s ease; opacity: var(--light); }
html.dragging .bulb-core,
html.dragging .bulb-halo,
html.dragging .shade-inner-glow { transition-duration: 0.05s; }

/* standby LED, only alive in the dark */
.standby-led {
  opacity: calc((1 - var(--light)) * 1);
  transition: opacity 1.4s ease;
}

/* pull-me paper tag */
.pull-tag { transition: opacity 0.8s ease; }
.pull-tag.hidden { opacity: 0; }

/* the site loads dark: only the lamp silhouette and the glowing PULL tag
   invite the first pull (JS-only; no-JS visitors get the lit page) */
html.tl-js.lamp-start-off { --light: 0; }

body.lamp-off .pull-tag rect {
  filter: drop-shadow(0 0 9px rgba(247, 201, 107, 0.75));
}
body.lamp-off .chain-ball { stroke: #8a867c; }
body.lamp-off .chain-group:not(.pulled) {
  animation: chain-nudge 3.4s ease-in-out infinite;
}
@keyframes chain-nudge {
  0%, 86%, 100% { transform: translateY(0); }
  91% { transform: translateY(7px); }
  95% { transform: translateY(-2px); }
}

/* "Let there be light." — the invitation, dark-state only */
.invitation {
  position: fixed;
  left: 50%;
  bottom: 16vh;
  transform: translate(-50%, 8px);
  z-index: 45;
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.4vw, 1.65rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--sodium);
  text-shadow: 0 0 22px rgba(247, 201, 107, 0.35);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
body.lamp-off .invitation {
  animation: invite-in 1.1s ease 0.7s forwards, invite-breathe 4s ease-in-out 1.8s infinite;
}
/* once lit, it is gone for good */
body:not(.lamp-off) .invitation { opacity: 0; transition: opacity 0.5s ease; }

@keyframes invite-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 0.92; transform: translate(-50%, 0); }
}
@keyframes invite-breathe {
  0%, 100% { opacity: 0.62; }
  50%      { opacity: 0.95; }
}

/* Light cone */
.cone {
  position: absolute;
  top: 236px;
  left: -46vw;
  width: 92vw;
  height: calc(100vh - 210px);
  background:
    radial-gradient(ellipse 52% 105% at 50% 0%,
      rgba(247, 201, 107, 0.20),
      rgba(247, 201, 107, 0.055) 52%,
      rgba(247, 201, 107, 0) 76%);
  clip-path: polygon(50% 0%, 6% 100%, 94% 100%);
  filter: blur(16px);
  mix-blend-mode: screen;
  opacity: var(--light);
  transition: opacity 1.15s ease;
}
html.dragging .cone { transition-duration: 0.05s; }

/* warm pool where the light lands */
.hotspot {
  position: absolute;
  top: 52vh;
  left: -30vw;
  width: 60vw;
  height: 46vh;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(247, 201, 107, 0.13), rgba(247, 201, 107, 0) 70%);
  filter: blur(30px);
  mix-blend-mode: screen;
  opacity: var(--light);
  transition: opacity 1.15s ease;
}
html.dragging .hotspot { transition-duration: 0.05s; }

#dust {
  position: absolute;
  top: 230px;
  left: -280px;
  width: 560px;
  height: 70vh;
  mix-blend-mode: screen;
}

/* ------------------------------------------------------------------
   Nav
------------------------------------------------------------------ */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 44px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.04em;
}
.logo em { font-style: normal; color: var(--gold); }

.nav-left { display: flex; align-items: center; gap: 52px; }

.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.22s ease, background 0.25s ease,
    border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: #141109;
  box-shadow: 0 6px 24px rgba(200, 154, 61, 0.18);
}
.btn-gold:hover { background: #d6a94b; box-shadow: 0 10px 30px rgba(200, 154, 61, 0.26); }

.btn-ghost {
  border-color: rgba(245, 245, 245, 0.18);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--line-warm); color: var(--sodium); }

.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  align-items: center;
  gap: 24px;
  padding-top: 120px;
  padding-bottom: 60px;
}

.kicker {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  margin-bottom: 26px;
}
.hero h1 .gold { color: var(--gold); }

.hero .lede {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 36px;
  font-size: 18px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.hero-hint {
  margin-top: 40px;
  font-size: 13.5px;
  color: rgba(158, 158, 158, 0.75);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-hint .tick {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--line-warm);
}

/* workspace composition sits in the pool of light */
.hero-scene {
  position: relative;
  align-self: end;
  padding-top: 34vh;
}
.hero-scene svg { width: 100%; height: auto; }

/* ------------------------------------------------------------------
   Value strip
------------------------------------------------------------------ */
.values { padding: 26px 0 10px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.value {
  padding: 30px 26px;
  border-left: 1px solid var(--line);
}
.value:first-child { border-left: none; }
.value h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.value p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------------
   Sections, shared
------------------------------------------------------------------ */
.section { padding: 110px 0; position: relative; }

.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin-bottom: 18px; }
.section-head h2 .gold { color: var(--gold); }
.section-head p { color: var(--muted); }

.divider {
  border: none;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: visible;
}
.divider::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
}

/* reveal on scroll (only hidden when JS is running, so no-JS still reads) */
html.tl-js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
html.tl-js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------
   What we do
------------------------------------------------------------------ */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px;
  transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-warm);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.card .card-icon { margin-bottom: 26px; }

/* clay artwork */
.clay-icon {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 20px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 78%);
}
.step .clay-icon { width: 74px; height: 74px; margin-bottom: 14px; }
.value .clay-icon { width: 60px; height: 60px; margin-bottom: 12px; }
.hero-scene .clay-hero {
  width: 100%;
  height: auto;
  /* transparent cutout — clay elements float directly on the dark hero,
     grounded by a soft warm shadow instead of a baked backdrop */
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.55));
}
.case-visual .clay-case { width: 100%; height: 100%; object-fit: cover; }

.card h3 { font-size: 24px; margin-bottom: 12px; }
.card .card-sub { color: var(--muted); font-size: 15.5px; margin-bottom: 26px; }

.card ul { list-style: none; }
.card li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: #cfcfcf;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--gold);
}

/* ------------------------------------------------------------------
   Process
------------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, border-color 0.3s ease;
}
.step:hover { transform: translateY(-2px); border-color: var(--line-warm); }

.step .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------------
   Case studies
------------------------------------------------------------------ */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.case:hover {
  transform: translateY(-2px);
  border-color: var(--line-warm);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.case-visual {
  height: 190px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-visual svg { width: 66%; height: auto; }

.case-body { padding: 28px; }
.case-body .tag {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 10px;
}
.case-body h3 { font-size: 20px; margin-bottom: 10px; }
.case-body p { font-size: 14.5px; color: var(--muted); }

/* stat strip */
.stats {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stat { padding: 34px 26px 6px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .n {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  color: var(--sodium);
  letter-spacing: -0.02em;
}
.stat .l { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* ------------------------------------------------------------------
   CTA
------------------------------------------------------------------ */
.cta-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-warm);
  border-radius: calc(var(--radius) + 6px);
  padding: 84px 60px;
  text-align: center;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 320px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(247, 201, 107, 0.16), rgba(247, 201, 107, 0) 70%);
  pointer-events: none;
}
.cta-card h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  max-width: 18ch;
  margin: 0 auto 18px;
}
.cta-card h2 .gold { color: var(--gold); }
.cta-card p { color: var(--muted); margin-bottom: 38px; }
.cta-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  padding: 70px 0 40px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  max-width: 32ch;
  margin-top: 14px;
}
.footer h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a {
  font-size: 14.5px;
  color: #cfcfcf;
  transition: color 0.25s ease;
}
.footer li a:hover { color: var(--sodium); }

.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1020px) {
  .values-grid { grid-template-columns: 1fr 1fr; }
  .value { border-left: none; border-top: 1px solid var(--line); }
  .value:nth-child(-n+2) { border-top: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  :root { --lamp-x: 50%; }
  .lamp-svg, .clay-lamp { transform: scale(0.78); transform-origin: top center; }
  .cone { top: 190px; }
  #dust { top: 185px; }

  .nav { padding: 22px 24px; }
  .nav-links { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 40vh;
    min-height: auto;
    padding-bottom: 30px;
  }
  .hero-scene { padding-top: 0; order: -1; margin-top: -8vh; margin-bottom: 30px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }

  .duo { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .cta-card { padding: 60px 28px; }
  .wrap { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ------------------------------------------------------------------
   Reduced motion
------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lamp-swing { animation: none; }
  body.lamp-off .chain-group:not(.pulled) { animation: none; }
  body.lamp-off .invitation { animation: none; opacity: 0.9; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .veil, .cone, .hotspot, .bulb-core, .bulb-halo, .shade-inner-glow {
    transition-duration: 0.2s;
  }
}
