/* =========
   Design tokens & layout
   ========= */
:root{
  --bg: #000;           /* video fallback */
  --brand: #f15a24;     /* orange */
  --accent: #19459e;    /* blue */
  --white: #fff;
  --fg: #fff;
  --fg-muted: #cfcfcf;
  --font-ui: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-graphik-ish: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --fs-base: 16px; /* reverted smaller */
  --fs-bio: clamp(16px, 2vw, 18px); /* reverted smaller */
  --lh-bio: 1.5;
  --gap: 24px;
  --dur: 420ms;
  --easing: cubic-bezier(.2,.7,.2,1);
  --bp-mobile: 768px;

  /* Responsive, proportional margins following best practices */
  --pad: clamp(14px, 3vw, 36px);   /* global safe area */
  --bottom-gap: clamp(10px, 1.2vw, 18px); /* inner spacing between desc and chat on wrap */
}

html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: var(--fs-base); overflow-x: hidden; }

/* ========= Background videos ========= */
.video-wrap { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: var(--brand); }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-video--desktop { display: block; }
.bg-video--mobile { display: none; }
@media (max-width: 768px){
  .bg-video--desktop { display: none; }
  .bg-video--mobile { display: block; }
}

/* Glitch visual */
.fx-glitch { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
body.is-glitching .fx-glitch { opacity: 1; animation: glitch-fx 180ms steps(3, end); background: repeating-linear-gradient(transparent 0 2px, rgba(255,255,255,0.06) 2px 3px), linear-gradient(90deg, rgba(255,0,0,0.12), rgba(0,255,255,0.12)); mix-blend-mode: screen; }
@keyframes glitch-fx { 0%{transform:translate(0,0)} 33%{transform:translate(-2px,-1px)} 66%{transform:translate(2px,1px)} 100%{transform:translate(0,0)} }

/* ========= Header + button ========= */
.plus-toggle { position: fixed; top: var(--pad); left: var(--pad); width: 64px; height: 64px; background: transparent; border: none; padding: 0; cursor: pointer; z-index: 10; }
.plus-icon, .plus-icon::before { position: absolute; inset: 0; margin: auto; width: 36px; height: 2px; background: var(--white); content: ''; display: block; transition: transform var(--dur) var(--easing), background 0.25s; }
.plus-icon::before { transform: rotate(90deg); }
.plus-toggle:hover .plus-icon, .plus-toggle:hover .plus-icon::before { background: var(--brand); }
body.bio-open .plus-icon { transform: rotate(45deg); background: var(--brand); }
body.bio-open .plus-icon::before { transform: rotate(90deg); background: var(--brand); }
body.bio-open .plus-toggle:hover .plus-icon, body.bio-open .plus-toggle:hover .plus-icon::before { background: var(--brand); }

/* Hint label next to + */
.plus-hint {
  position: fixed;
  top: var(--pad);
  left: calc(var(--pad) + 64px + 4px);
  height: 64px;
  display: flex; align-items: center;
  font-family: var(--font-graphik-ish);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  animation: hint-pulse 4s 2.5s ease both;
}
@keyframes hint-pulse {
  0%   { opacity: 0; transform: translateX(-6px); }
  15%  { opacity: 1; transform: translateX(0); }
  85%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-6px); }
}
body.bio-open .plus-hint { display: none; }

/* ========= Right vertical metadata — treated as ONE unit, perfectly centered ========= */
.vmeta-col { position: fixed; right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: clamp(24px, 4vh, 52px); }
.vmeta { color: var(--white); font-family: var(--font-graphik-ish); font-weight: 40; letter-spacing: .12em; text-transform: uppercase; font-size: clamp(10px, 1.2vw, 12px); writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }

/* ========= Entrance animation ========= */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up-centered {
  from { opacity: 0; transform: translateY(calc(-50% + 12px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}
.landing-desc, .cta-wrap, .plus-toggle {
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
}
.vmeta-col {
  opacity: 0;
  animation: fade-up-centered 0.8s ease forwards;
}
.plus-toggle  { animation-delay: 0.3s; }
.vmeta-col    { animation-delay: 0.6s; }
.landing-desc { animation-delay: 0.9s; }
.cta-wrap     { animation-delay: 1.1s; }

/* ========= Bottom bar: description + chat act together and never overlap ========= */
.bottom-bar {
  position: fixed; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--bottom-gap);
}
.landing-desc { flex: 1 1 auto; min-width: 60%; font-family: var(--font-graphik-ish); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--white); font-size: clamp(16px, 2.2vw, 21px); }
.cta-wrap { flex: 0 0 auto; position: relative; }
.cta-chat { font-family: var(--font-graphik-ish); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--white); font-size: clamp(12px, 1.8vw, 18px); background: none; border: none; cursor: pointer; padding: 0; transition: color 0.25s; }
.cta-chat:hover { color: var(--brand); }

/* Contact popover */
.cta-popover {
  position: absolute;
  bottom: calc(100% + 14px); right: 0;
  display: flex; gap: 10px;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.cta-popover.is-open {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.cta-option {
  display: block;
  font-family: var(--font-graphik-ish); font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--accent);
  text-decoration: none;
  padding: 0;
  white-space: nowrap;
  border: none;
  transition: color 0.25s;
}
.cta-option:first-child { border-radius: 0; }
.cta-option:last-child  { border-radius: 0; }
.cta-option:hover { color: var(--brand); }

/* On very narrow screens, ensure a clean wrap with spacing */
@media (max-width: 768px){
  .cta-chat { font-size: clamp(16px, 4.5vw, 22px); }
  .cta-option { font-size: clamp(14px, 3.8vw, 18px); }
  .vmeta-col { display: none; }
}
@media (max-width: 520px){
  .landing-desc { min-width: 100%; }
}

/* ========= BIO Panel ========= */
.bio-panel {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  background: rgba(255,255,255,0.98); color: #111;
  transform: translate(-100%, -100%);
  transition: transform var(--dur) var(--easing);
  z-index: 7;
}
body.bio-open .bio-panel { transform: translate(0, 0); }
body.bio-open { overflow: hidden; }

/* Two-column grid */
.bio-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  height: 100%;
}

/* Left column */
.bio-left {
  height: 100%;
  overflow: hidden;
}
.bio-left .bio-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: min(5vw, 48px);
  padding-top: calc(var(--pad) + 64px + 20px);
  box-sizing: border-box;
}

/* Logo */
.bio-logo {
  margin: 0 0 6px;
  line-height: 0;
}
.bio-logo svg {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  color: var(--accent);
}
.bio-sub { margin: 0 0 4px; color: #6b6b6b; font-size: clamp(13px, 2.2vw, 14px); }

/* Bio header: logo left, CTA right */
.bio-header {
  margin-bottom: calc(var(--gap) * 0.75);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.bio-header-left { flex: 1 1 auto; }
.bio-cta-wrap { flex: 0 0 auto; position: relative; align-self: flex-start; margin-top: 4px; }
.bio-header-cta {
  font-family: var(--font-graphik-ish);
  font-weight: 800; font-size: clamp(16px, 2.1vw, 22px);
  letter-spacing: .04em; text-transform: uppercase;
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--accent);
  transition: color 0.25s;
}
.bio-header-cta:hover { color: var(--brand); }

/* Bio header popover */
.bio-cta-popover {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  display: flex; gap: 10px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.bio-cta-popover.is-open {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.bio-cta-option {
  display: block;
  font-family: var(--font-graphik-ish); font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(11px, 1.4vw, 14px);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s;
}
.bio-cta-option:hover { color: var(--brand); }

/* Body text */
.bio-body {
  font-size: var(--fs-bio); line-height: var(--lh-bio);
  display: grid; gap: 0.5em;
  margin-bottom: calc(var(--gap) * 0.75);
}

/* Services */
.bio-services { margin-bottom: calc(var(--gap) * 1.25); }
.bio-h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; font-family: var(--font-graphik-ish); }
.bio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: clamp(14px, 1.6vw, 16px); }
.bio-list a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.12); }
.bio-list a:hover { border-color: var(--brand); }

/* Brands */
.bio-brands { margin-bottom: calc(var(--gap) * 1.5); }
.bio-brands-list { margin: 0; font-size: inherit; color: inherit; line-height: inherit; font-weight: 700; }

/* Contact & Social */
.bio-meta { display: grid; grid-template-columns: auto auto; justify-content: start; gap: var(--gap) clamp(32px, 4vw, 60px); }

/* ========= Right column: Slideshow ========= */
.bio-right {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #f0f0f0;
}
.slideshow {
  position: absolute;
  inset: 0;
}
.slideshow-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.6s ease;
  /* Image protection */
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* Transparent shield over images — blocks right-click, drag, long-press */
.slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.slideshow-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 64px; height: 64px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
/* Arrow icon via inline SVG background — closed chevron, 2px stroke to match + icon */
.slideshow-btn::before {
  content: '';
  display: block;
  width: 18px; height: 18px;
}
.slideshow-prev::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23d64321' stroke-width='2' stroke-linecap='square'%3E%3Cpolyline points='12,2 4,9 12,16'/%3E%3C/svg%3E") no-repeat center / contain;
}
.slideshow-next::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23d64321' stroke-width='2' stroke-linecap='square'%3E%3Cpolyline points='6,2 14,9 6,16'/%3E%3C/svg%3E") no-repeat center / contain;
}
.slideshow-btn:hover { opacity: 0.7; }
.slideshow-prev { left: 8px; }
.slideshow-next { right: 8px; }

/* Slide counter */
.slideshow-counter {
  position: absolute;
  bottom: 20px; right: 20px;
  font-family: var(--font-graphik-ish);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.7);
  z-index: 2;
  pointer-events: none;
}

/* Bio panel CTA (legacy — now in header) */
.bio-cta { display: none; }

/* ========= Mobile: single scrollable column ========= */
@media (max-width: 768px){
  .bio-grid {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
  }
  .bio-panel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bio-right {
    order: -1;
    height: 55vmax;
    min-height: 280px;
    max-height: 50vh;
    flex-shrink: 0;
  }
  .bio-left {
    height: auto;
    overflow: visible;
  }
  .bio-left .bio-scroll {
    height: auto;
    overflow: visible;
    padding: var(--gap);
    padding-top: calc(var(--gap) + 12px);
  }
  .bio-meta { grid-template-columns: 1fr; }
  .bio-logo svg { width: 120px; }
  .bio-header-cta { font-size: clamp(14px, 4vw, 18px); }
}
