/* Maxime — Portfolio v2 / Hero */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root{
  --bg: #050507;
  --bg-1: #0a0a0d;
  --bg-2: #121217;
  --bg-3: #16161c;
  --fg: #fafafa;
  --fg-2: #b4b4be;
  --fg-3: #6e6e7a;
  --border: #2a2a32;
  --border-soft: #1a1a20;
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.16);
  --maxw: 1440px;
  --pad-x: clamp(20px, 4vw, 56px);
}

*{ box-sizing: border-box; }
html, body{
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body{
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 1200px 800px at 80% -10%, rgba(168,85,247,0.06), transparent 60%),
    radial-gradient(ellipse 900px 600px at 0% 100%, rgba(56,189,248,0.04), transparent 60%),
    var(--bg);
}
a{ color: inherit; text-decoration: none; }
.dim{ color: var(--fg-2); }
.small{ font-size: 11px; }
.mono{ font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
       letter-spacing: 0.01em; font-size: 12px; }
.serif{ font-family: 'Instrument Serif', 'Times New Roman', serif;
        font-style: italic; font-weight: 400; letter-spacing: -0.005em; }

/* ───── Page shell ───────────────────────────────────────────────── */
.page{
  position: relative;
  width: 100%;
  isolation: isolate;
}
.page > .hero-section{
  position: relative;
  min-height: 100vh;
}
body.cursor-hidden, body.cursor-hidden *{ cursor: none !important; }

/* ───── Aurora ───────────────────────────────────────────────────── */
.aurora-wrap{ position: absolute; inset: 0; z-index: 0; pointer-events: none; will-change: transform; }
.aurora{
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.aurora-grad{
  position: absolute;
  top: -30%; left: -20%; right: -20%; height: 90%;
  background:
    radial-gradient(40% 60% at 30% 40%, var(--accent) 0%, transparent 60%),
    radial-gradient(35% 50% at 70% 60%, color-mix(in oklch, var(--accent) 60%, #6366f1) 0%, transparent 65%),
    radial-gradient(30% 40% at 55% 30%, color-mix(in oklch, var(--accent) 40%, #ec4899) 0%, transparent 60%);
  filter: blur(80px) saturate(120%);
  mix-blend-mode: screen;
  animation: aurora-drift 60s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}
.aurora-grad-2{
  top: 20%; left: 10%; right: -10%;
  height: 70%;
  background:
    radial-gradient(45% 55% at 60% 50%, var(--accent) 0%, transparent 55%),
    radial-gradient(30% 40% at 20% 70%, color-mix(in oklch, var(--accent) 50%, #3b82f6) 0%, transparent 60%);
  filter: blur(100px) saturate(110%);
  animation-direction: alternate-reverse;
}
@keyframes aurora-drift{
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.05) rotate(-3deg); }
  50%  { transform: translate3d(4%,  2%, 0) scale(1.15) rotate(2deg); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.08) rotate(-1deg); }
}
.aurora-vignette{
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 30%, rgba(10,10,10,0.55) 75%, var(--bg) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.35) 0%, transparent 30%, transparent 70%, rgba(10,10,10,0.55) 100%);
}

/* ───── Grain ────────────────────────────────────────────────────── */
.grain{
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* ───── Crosshair frame ──────────────────────────────────────────── */
.frame{
  position: absolute;
  top: 18px; left: 18px; right: 18px; bottom: 18px;
  pointer-events: none;
  z-index: 2;
}
.cx{
  position: absolute;
  width: 14px; height: 14px;
  opacity: 0.25;
}
.cx::before, .cx::after{
  content: ""; position: absolute; background: var(--fg);
}
.cx::before{ width: 14px; height: 1px; top: 50%; }
.cx::after { width: 1px; height: 14px; left: 50%; }
.cx.tl{ top: 0; left: 0; }
.cx.tr{ top: 0; right: 0; }
.cx.bl{ bottom: 0; left: 0; }
.cx.br{ bottom: 0; right: 0; }

/* ───── Topbar ───────────────────────────────────────────────────── */
.topbar{
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad-x);
  background: linear-gradient(180deg, rgba(10,10,10,0.6), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.brand{ display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.brand-mark{ color: var(--fg); display: inline-flex; }
.brand-name .dim{ color: var(--fg-3); font-weight: 400; }

.topnav{ display: flex; gap: 28px; justify-content: center; }

.top-right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.topnav a{
  font-size: 13px; color: var(--fg-2);
  position: relative; padding: 4px 0;
  transition: color .25s ease;
}
.topnav a::after{
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--fg); transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.topnav a:hover{ color: var(--fg); }
.topnav a:hover::after{ transform: scaleX(1); }

/* Lang switch */
.lang-switch{
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
.lang-btn{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 6px;
  font: inherit;
  color: var(--fg-3);
  cursor: pointer;
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}
.lang-btn:hover{ color: var(--fg-2); }
.lang-btn.is-on{
  color: var(--fg);
  background: rgba(255,255,255,0.06);
}
.lang-sep{ color: var(--fg-3); pointer-events: none; }
.btn-mini{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  background: rgba(255,255,255,0.02);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.btn-mini:hover{
  border-color: var(--fg-3);
  background: rgba(255,255,255,0.05);
}
.btn-mini svg{ opacity: 0.7; transition: transform .3s ease; }
.btn-mini:hover svg{ transform: translate(2px, -2px); }

/* ───── Hero ─────────────────────────────────────────────────────── */
.hero{
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: 78px var(--pad-x) 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 460px);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  flex: 1;
  padding-top: 18px;
}

/* ── Badge ─────────────────────────────────────────────── */
.badge{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  background: rgba(255,255,255,0.02);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(8px);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) .1s forwards;
  transition: border-color .3s ease;
}
.badge:hover{ border-color: var(--fg-3); }
.badge-sep{ color: var(--fg-3); }
.pulse{ position: relative; width: 8px; height: 8px; display: inline-block; }
.pulse-dot{
  position: absolute; inset: 0;
  background: #22c55e; border-radius: 50%;
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
}
.pulse-ring{
  position: absolute; inset: -3px;
  border: 1px solid #22c55e; border-radius: 50%;
  animation: pulse-out 2s ease-out infinite;
  opacity: 0.6;
}
@keyframes pulse-out{
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── Title ─────────────────────────────────────────────── */
.hero-title{
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 8.2vw, 7.4rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 22px 0 24px;
  color: var(--fg);
}
.hero-title.t-serif{
  font-family: 'Instrument Serif', serif;
  font-style: normal; font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.96;
}
.hero-title .serif{
  font-size: 1.04em;
  line-height: 0.85;
  letter-spacing: -0.025em;
  color: var(--accent);
  padding-right: 0.04em;
}
.hero-title .line{ display: block; }
.hero-title .line-wrap{
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em; /* allow descenders */
}
.line-mask{
  display: inline-block;
  transform: translateY(110%);
  animation: line-rise 1.1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes line-rise{
  to { transform: translateY(0); }
}
.hero-title .w-wrap{ display: inline-block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .w{
  display: inline-block;
  transform: translateY(110%);
  filter: blur(8px);
  opacity: 0;
  animation: word-rise .9s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes word-rise{
  to { transform: translateY(0); filter: blur(0); opacity: 1; }
}
.ltr-wrap{ display: inline-block; }
.hero-title .ltr{
  display: inline-block;
  opacity: 0;
  transform: translateY(0.2em);
  animation: ltr-fade .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes ltr-fade{
  to { opacity: 1; transform: translateY(0); }
}
.hero-title.no-reveal .line{
  opacity: 1; transform: none; animation: none;
}

/* ── Sub ───────────────────────────────────────────────── */
.hero-sub{
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 38ch;
  margin: 0 0 28px;
  letter-spacing: -0.005em;
  opacity: 0; transform: translateY(8px);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.hero-sub br{ }

/* ── CTAs ──────────────────────────────────────────────── */
.cta-row{
  display: flex; align-items: center; gap: 28px;
  margin-bottom: 28px;
  opacity: 0; transform: translateY(8px);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.btn-primary{
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 24px;
  background: var(--fg);
  color: #0a0a0a;
  font-size: 14px; font-weight: 500;
  border-radius: 999px;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
  isolation: isolate;
}
.btn-primary:hover{ transform: translateY(-1px); }
.btn-shimmer{
  position: absolute; inset: 0;
  background: linear-gradient(120deg,
    transparent 25%,
    rgba(168, 85, 247, 0.35) 45%,
    rgba(255,255,255,0.5) 50%,
    rgba(168, 85, 247, 0.35) 55%,
    transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 5.5s cubic-bezier(.4,.0,.2,1) infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes shimmer{
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(140%); }
  100% { transform: translateX(140%); }
}
.btn-arrow{ display: inline-flex; transition: transform .3s ease; }
.btn-primary:hover .btn-arrow{ transform: translateX(3px); }

.btn-text{
  position: relative;
  display: inline-flex; align-items: center;
  font-size: 14px; color: var(--fg);
  padding: 6px 0;
}
.btn-text .ul{
  position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--fg);
  transform: scaleX(1); transform-origin: right;
  transition: transform .45s cubic-bezier(.7,0,.2,1);
}
.btn-text:hover .ul{
  transform-origin: left;
  animation: ul-cycle .7s cubic-bezier(.7,0,.2,1);
}
@keyframes ul-cycle{
  0%   { transform: scaleX(1); transform-origin: right; }
  49%  { transform: scaleX(0); transform-origin: right; }
  50%  { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

/* ── Kicker ────────────────────────────────────────────── */
.kicker{
  opacity: 0;
  margin-top: 8px;
  margin-bottom: 12px;
  animation: fade-in 1s ease both;
  animation-fill-mode: forwards;
}

/* ── Spec sheet ────────────────────────────────────────── */
.hero-right{
  opacity: 0; transform: translateY(12px);
  animation: rise 1s cubic-bezier(.2,.7,.2,1) both;
  align-self: center;
  padding-top: 0;
}
.spec{
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.spec-h{
  display: flex; align-items: center; gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.spec-id{ color: var(--fg-2); }
.spec-dot{
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.spec-cap{ margin-left: auto; }

.spec-list{ margin: 0; display: flex; flex-direction: column; gap: 12px; }
.spec-row{
  display: grid; grid-template-columns: 78px 1fr;
  gap: 12px;
  font-size: 12.5px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-soft);
  opacity: 0;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.spec-row:last-child{ border-bottom: 0; padding-bottom: 0; }
.spec-row dt{
  font-family: 'Geist Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.spec-row dd{ margin: 0; color: var(--fg); }

/* ───── Section rail ─────────────────────────────────────────────── */
.rail{
  position: absolute;
  right: 38px; top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex; flex-direction: column; gap: 14px;
  pointer-events: none;
}
.rail-item{
  display: flex; align-items: center; gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3);
  justify-content: flex-end;
}
.rail-num{ font-size: 9.5px; opacity: 0.7; }
.rail-line{
  display: inline-block; height: 1px; width: 18px;
  background: var(--fg-3);
  opacity: 0.4;
}
.rail-item.active{ color: var(--fg); }
.rail-item.active .rail-line{ background: var(--fg); opacity: 1; width: 28px; }
.rail-lbl{ min-width: 64px; text-align: right; }

/* ───── Hero footer ──────────────────────────────────────────────── */
.hero-foot{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  opacity: 0;
  animation: fade-in 1s ease 1.4s both;
}
.foot-l{ display: flex; gap: 12px; }
.foot-c{ display: flex; justify-content: center; }
.foot-r{ display: flex; gap: 8px; justify-content: flex-end; }
.scroll-cue{
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--fg-2);
}
.scroll-line{
  display: inline-block; width: 1px; height: 28px;
  background: linear-gradient(180deg, transparent, var(--fg-2));
  position: relative; overflow: hidden;
}
.scroll-line::after{
  content: ""; position: absolute; left: 0; right: 0; top: -100%;
  height: 50%; background: var(--fg);
  animation: scroll-pulse 2.4s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes scroll-pulse{
  0%   { top: -100%; }
  100% { top: 200%; }
}

/* ───── Custom cursor ────────────────────────────────────────────── */
.cur-ring, .cur-dot{
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 2147483647;
  will-change: transform;
}
.cur-ring{
  width: 32px; height: 32px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease, border-color .25s ease,
              background .25s ease;
}
.cur-ring[data-hover="1"]{
  width: 44px; height: 44px;
  margin-left: -6px; margin-top: -6px;
  background: var(--accent);
  border-color: var(--accent);
  mix-blend-mode: normal;
  opacity: 0.85;
}
.cur-dot{
  width: 4px; height: 4px;
  background: var(--fg);
  border-radius: 50%;
  mix-blend-mode: difference;
}

/* ───── Animations ───────────────────────────────────────────────── */
@keyframes rise{
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in{
  to { opacity: 1; }
}

/* ───── Responsive ───────────────────────────────────────────────── */
@media (max-width: 920px){
  .topnav{ display: none; }
  .topbar{ grid-template-columns: 1fr auto; padding: 14px 20px; }
  .hero-grid{ grid-template-columns: 1fr; gap: 32px; padding-top: 0; }
  .hero-right{ display: none; }
  .rail{ display: none; }
  .frame{ top: 10px; left: 10px; right: 10px; bottom: 10px; }
  .hero{ padding: 70px 20px 24px; }
  .hero-foot{ grid-template-columns: 1fr 1fr; padding-top: 18px; }
  .foot-c{ display: none; }
  .aurora-grad{ animation: none; opacity: 0.4 !important; }
  .aurora-grad-2{ animation: none; opacity: 0.25 !important; }
}
@media (max-width: 600px){
  .cta-row{ flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-sub br{ display: none; }
  .top-right .mono{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .aurora-grad, .aurora-grad-2{ animation: none; }
}
