:root{
  --bg:#0b0b0c;
  --fg:#f2f2f2;
  --muted:rgba(242,242,242,.68);
  --line:rgba(242,242,242,.18);
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.10);
  --radius:18px;
  --max:1100px;

  /* HERO CROPPING CONTROLS (adjust these) */
  --hero-x: 50%;  /* left/right focus */
  --hero-y: 18%;  /* top/bottom focus (lower number = show more top) */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font:16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.frame{
  min-height:100vh;
  width:100%;
}

/* HERO FRAME */
.frame--hero{
  position:relative;
  overflow:hidden;
  min-height:100vh; /* ensures full-screen hero */
}

/* Hero image */
.hero{
  position:absolute;
  inset:0;

  background-image: url("images/hero.jpg");
  background-repeat:no-repeat;
  background-size:cover;

  /* Control the focal point */
  background-position: var(--hero-x) var(--hero-y);

  transform:scale(1.02);
  animation: fadein 900ms ease-out both;
}

@keyframes fadein{
  from{ opacity:0; filter:blur(4px); }
  to{ opacity:1; filter:blur(0); }
}

/* --------------------------------------------
   TWIST: organic drift + fade on scroll + pause on hover
   -------------------------------------------- */

/* Multi-direction drift (subtle, cinematic) */
@keyframes float {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4px, -6px); }
  50%  { transform: translate(3px, -10px); }
  75%  { transform: translate(6px, -4px); }
  100% { transform: translate(0, 0); }
}

/* Twist: silent, subtle */
.twist{
  position:absolute;
  left:24px;
  bottom:18px;
  width:min(240px, 34vw);
  opacity:.88;

  filter: drop-shadow(0 10px 20px rgba(0,0,0,.35));

  /* Allow hover to work */
  pointer-events:auto;

  /* Drift */
  animation: float 8s ease-in-out infinite;

  /* Smooth opacity change while scrolling (CSS-only fade) */
  transition: opacity 220ms ease;
}

/* Pause drift on hover */
.twist:hover{
  animation-play-state: paused;
}

/* Fade on scroll (CSS-only technique)
   As you scroll down the page, the hero is pushed up/out of view.
   This uses scroll-linked animation if supported. If not supported,
   Twist will still float and pause on hover (no harm). */
@supports (animation-timeline: scroll()) {
  .twist{
    animation:
      float 8s ease-in-out infinite,
      twistFade 1s linear both;
    animation-timeline: auto, scroll();
    animation-range: auto, 0 60vh; /* fade within first ~60% of a screen */
  }

  @keyframes twistFade {
    from { opacity: .88; }
    to   { opacity: 0; }
  }
}

/* Scroll cue */
.scrollcue{
  position:absolute;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  opacity:.65;
  padding:14px 18px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
}
.scrollcue:hover{ opacity:.9; }
.scrollcue__line{
  display:block;
  width:26px;
  height:34px;
  border-left:1px solid var(--fg);
  margin:0 auto;
  opacity:.7;
}

/* HUB (second frame) */
.frame--hub{
  padding:40px 18px 24px;
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(255,255,255,.05), transparent 55%),
    var(--bg);
}

.hub{
  width:min(var(--max), 100%);
  margin:0 auto;
}

.brandrow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding:6px 2px 22px;
  border-bottom:1px solid var(--line);
}

.brand{
  font-size:18px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.92;
}

.nav{
  display:flex;
  gap:16px;
  font-size:14px;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.88;
}
.nav a{
  padding:10px 10px;
  border-radius:999px;
}
.nav a:hover{
  background:var(--card);
  outline:1px solid var(--line);
}

.tiles{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  padding:22px 0 18px;
}

.tile{
  border-radius:var(--radius);
  background:var(--card);
  border:1px solid var(--line);
  padding:18px 18px 16px;
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  transition: transform 140ms ease, background 140ms ease;
}
.tile:hover{
  transform: translateY(-2px);
  background:var(--card2);
}

.tile__title{
  font-size:20px;
  letter-spacing:.04em;
}
.tile__sub{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}

.panel{
  margin:14px 0;
  padding:18px 18px;
  border-radius:var(--radius);
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}

.panel h2{
  margin:0 0 8px;
  font-size:16px;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.92;
}
.panel p{
  margin:0;
  color:var(--muted);
}

.panel__actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.btn{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
}
.btn:hover{ background:var(--card); }

.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.chip{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
}
.chip:hover{
  color:var(--fg);
  background:var(--card);
}

.footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:22px 2px 10px;
  color:var(--muted);
  font-size:13px;
  border-top:1px solid var(--line);
  margin-top:18px;
}
.footer a{ color:var(--muted); }
.footer a:hover{ color:var(--fg); }

@media (max-width: 860px){
  .tiles{ grid-template-columns:1fr; }
  .brandrow{ align-items:flex-start; flex-direction:column; }
  .nav{ flex-wrap:wrap; }
  .twist{ width:min(220px, 52vw); }

  /* Mobile often crops differently — push focus even higher */
  :root{
    --hero-y: 12%;
  }
}
