:root{color-scheme:dark;--lime:#b4ff32;--cyan:#5beaff;--pink:#f754c7;--ink:#07081c}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#070516;color:#fff;font-family:Trebuchet MS,Arial,sans-serif}
body{display:grid;place-items:center;overflow-x:hidden}
button{font:inherit;cursor:pointer}
a{color:inherit}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.v4-stage{position:relative;width:min(100vw, 159.879dvh);aspect-ratio:1586/992;background-image:url('/assets/homepage-v4/ravegoat_main_page_background.webp');background-size:100% 100%;background-position:center;background-repeat:no-repeat;isolation:isolate;overflow:hidden}
.v4-stage::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(12,8,28,.1),transparent 22% 80%,rgba(12,8,28,.10));z-index:0}
.v4-header,.v4-hero,.v4-cards{position:absolute;inset:0;pointer-events:none}
.v4-header>* ,.v4-hero>*,.v4-cards>*{pointer-events:auto}
.v4-brand{position:absolute;left:1.15%;top:1.1%;width:22%;height:10%;display:block;z-index:3}
.v4-brand img{width:100%;height:100%;object-fit:fill}
.v4-nav{position:absolute;left:28%;top:2.2%;width:70.5%;height:9.4%;z-index:3}
.v4-nav-shell{position:absolute;width:100%;height:100%;object-fit:fill;inset:0;pointer-events:none}
.v4-nav-items{position:absolute;inset:15% 4% 15% 8%;display:flex;align-items:center;gap:clamp(4px,.6vw,13px);justify-content:space-around}
.v4-nav-home{width:13%;height:90%;display:block;position:relative;flex:0 0 auto}
.v4-nav-home>img:first-child{height:100%;width:100%;object-fit:fill}
.v4-active-bar{position:absolute;left:14%;bottom:-14%;width:72%;height:18%;object-fit:fill}
.v4-nav-text{display:flex;align-items:center;justify-content:center;gap:.15em;text-decoration:none;border:0;background:transparent;color:#fff;font-size:clamp(9px,1.05vw,20px);font-weight:800;white-space:nowrap;padding:0;line-height:1}
.v4-nav-text img{height:1.35em;width:1.35em;object-fit:contain;filter:drop-shadow(0 0 4px #64e6ff)}
.v4-nav-image{height:90%;width:5.5%;display:block;flex:0 0 auto;padding:0;border:0;background:none}
.v4-nav-image img{height:100%;width:100%;object-fit:contain}
.v4-nav-button{appearance:none;border:0;background:none;padding:0;color:inherit}
.v4-hero-wordmark{position:absolute;left:34.7%;top:27%;width:34%;height:17.8%;object-fit:fill;filter:drop-shadow(0 5px 6px #09051788)}
.v4-hero-tagline{position:absolute;left:36.3%;top:41.6%;width:32%;height:11.7%;object-fit:fill;filter:drop-shadow(0 2px 5px #100822aa)}
.v4-actions{position:absolute;left:37.6%;top:53.2%;width:30.6%;height:8.4%;display:flex;gap:4.8%;align-items:center;justify-content:center}
.v4-cta{display:block;width:48%;height:100%;padding:0;transition:transform .15s ease,filter .15s ease}
.v4-cta img{width:100%;height:100%;object-fit:fill}
.v4-cta:hover,.v4-cta:focus-visible{transform:translateY(-2px) scale(1.025);filter:brightness(1.17)}
.v4-cards{left:0;right:0;top:68.2%;bottom:1.5%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75%;padding:0 .3%}
.v4-card{position:relative;min-width:0;display:block;text-decoration:none;transition:transform .15s ease,filter .15s ease}
.v4-card:hover,.v4-card:focus-visible{transform:translateY(-4px);filter:brightness(1.10)}
.v4-card-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;z-index:2;pointer-events:none}
.v4-card-thumbnail{position:absolute;left:8%;top:32%;width:84%;height:35%;object-fit:cover;z-index:1;border-radius:6%}
.v4-card-description{position:absolute;left:9%;top:74%;width:70%;max-height:18%;overflow:hidden;color:#e0e0e8;font-size:clamp(8px,.88vw,16px);line-height:1.22;z-index:3;pointer-events:none;text-shadow:0 1px 2px #000}
.v4-noscript{position:absolute;left:5%;bottom:3%;background:#08081ecc;padding:.5rem 1rem}
:where(a,button):focus-visible{outline:2px solid #fff;outline-offset:3px;border-radius:5px}
/* Live terminal logic and selectors remain in /js/landing.js. */
#goatnet-terminal{border:1px solid var(--cyan);border-radius:12px;background:#040816;color:#d1f5ff;padding:0;max-width:min(92vw,1200px);width:1100px;box-shadow:0 0 70px #00dfff4d}
#goatnet-terminal::backdrop,#v4-preview-destination::backdrop{background:#030512d9;backdrop-filter:blur(6px)}
.terminal-window{display:flex;flex-direction:column;width:100%;height:min(82vh,780px)}
.terminal-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;background:#0c1527;border-bottom:1px solid #1f758f;font-family:monospace}
.close-terminal{border:1px solid #55d9eb;color:#bdfdff;background:#101c30;border-radius:5px;padding:.4rem .75rem}
.terminal-frame{height:100%;width:100%;border:0;background:#02040b}
#v4-preview-destination{width:min(90vw,700px);border:1px solid var(--pink);border-radius:14px;background:linear-gradient(145deg,#12102c,#050916);box-shadow:0 0 50px #ff54e94f;color:#f6f7ff;padding:0}
.v4-destination-panel{position:relative;padding:2.1rem}
.v4-eyebrow{color:#67efff;letter-spacing:.14em;font-size:.75rem;font-weight:700}
.v4-destination-panel h2{font-size:clamp(1.3rem,3vw,2.25rem);color:var(--pink);margin:.8rem 0 1rem}
.v4-destination-panel p{line-height:1.6}
.v4-destination-panel a{color:#82eaff}
.v4-destination-close{position:absolute;right:1rem;top:1rem;color:#fff;background:transparent;border:0;font-size:2rem}
.v4-return{display:inline-block;margin-top:1rem}
@media(max-width:820px){
 body{display:block}
 .v4-stage{width:100%;aspect-ratio:auto;min-height:100dvh;overflow:visible;padding-bottom:2rem;background-size:auto 750px;background-position:center top;background-color:#100b29}
 .v4-header,.v4-hero,.v4-cards{position:relative;inset:auto}
 .v4-header{min-height:142px;display:flex;flex-direction:column;align-items:center}
 .v4-brand{position:relative;left:auto;top:auto;width:min(70vw,250px);height:80px;flex:0 0 auto}
 .v4-nav{position:relative;left:auto;top:auto;width:98%;height:60px;margin:0 auto}
 .v4-nav-items{inset:14% 2%;justify-content:space-around;gap:4px}
 .v4-nav-home{width:15%;max-width:83px;height:85%}
 .v4-nav-text{font-size:clamp(7px,1.8vw,13px)}
 .v4-nav-text img{height:1.5em;width:1.5em}
 .v4-nav-image{height:75%;width:7%}
 .v4-hero{min-height:390px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;position:relative;padding-top:30px}
 .v4-hero::before{content:"";position:absolute;inset:13% 5% 3%;border-radius:50%;background:#150d2ca8;filter:blur(32px);pointer-events:none}
 .v4-hero-wordmark,.v4-hero-tagline,.v4-actions{position:relative;left:auto;top:auto;z-index:1}
 .v4-hero-wordmark{width:min(86%,520px);height:auto;aspect-ratio:1983/793}
 .v4-hero-tagline{width:min(81%,490px);height:auto;aspect-ratio:3 / 1;margin-top:-30px}
 .v4-actions{width:min(90%,440px);height:74px;margin-top:-9px;gap:2%}
 .v4-cta{width:49%}
 .v4-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 8px;position:relative;z-index:3}
 .v4-card{aspect-ratio:1.34}
 .v4-card-description{font-size:clamp(9px,2.2vw,15px)}
}
@media(max-width:450px){.v4-nav-text{gap:0;font-size:8px}.v4-nav-text img{height:1.2em;width:1.2em}.v4-nav-home{width:17%}.v4-card-description{font-size:9px;line-height:1.15}.v4-hero{min-height:330px}.v4-hero-tagline{margin-top:-16px}.v4-actions{height:56px}}
@media(prefers-reduced-motion:reduce){.v4-cta,.v4-card{transition:none}}

/* Desktop V4: approved layout values consolidated from c21beb1.
   Do not change without a visual regression check at 1920x1080. */
@media (min-width: 821px) {
  html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  body { display: block; }

  .v4-stage {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    aspect-ratio: auto;
    background-size: cover;
    background-position: center;
    --hero-center: 62%;
  }

  .v4-nav {
    left: 0;
    top: 0;
    width: 100%;
    height: 9%;
    z-index: 3;
  }

  .v4-nav-shell {
    inset: 0;
    left: 15%;
    right: 10%;
    width: 75%;
    height: 100%;
    object-fit: fill;
    object-position: center;
  }

  .v4-brand {
    left: 11.5%;
    top: 50%;
    width: 23%;
    height: min(76%, 3.85vw);
    z-index: 5;
    transform: translateY(-50%);
  }

  .v4-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
  }

  .v4-nav-items {
    inset: 20% 12% 20% 35%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(4px, 0.45vw, 9px);
  }

  .v4-nav-home {
    width: 13%;
    height: 100%;
    flex: 0 0 13%;
  }

  .v4-nav-home > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .v4-nav-text {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  .v4-nav-image {
    width: 4.5%;
    height: 90%;
    flex: 0 0 4.5%;
  }

  .v4-nav-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .v4-hero-wordmark {
    left: var(--hero-center);
    top: 17%;
    width: 41%;
    height: 24%;
    transform: translateX(-50%);
    object-fit: contain;
  }

  .v4-hero-tagline {
    left: var(--hero-center);
    top: calc(36% + 38px);
    width: calc(36% + 10px);
    height: 12%;
    transform: translateX(-50%);
    object-fit: contain;
  }

  .v4-actions {
    left: var(--hero-center);
    top: calc(40.5% + 106px);
    width: 28%;
    height: auto;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3%;
  }

  .v4-cta {
    width: 48.5%;
    height: auto;
    flex: 0 0 48.5%;
  }

  .v4-cta img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .v4-cards {
    left: 16%;
    right: 16%;
    top: calc(68.2% + 38px);
    bottom: auto;
    width: 68%;
    height: auto;
    gap: 1%;
    padding: 0;
  }

  .v4-card {
    width: 100%;
    height: auto;
    aspect-ratio: 1.34;
  }

  .v4-card-frame {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .v4-card-thumbnail {
    left: 6%;
    top: 24%;
    width: 88%;
    height: 50%;
    object-fit: cover;
    object-position: center;
  }
}

/* Mobile v4 layout — desktop remains untouched */
@media screen and (max-width: 820px) {

  /* Hero already carries the RaveGoat branding */
  .v4-brand {
    display: none;
  }

  /* Header only needs room for the navigation */
  .v4-header {
    min-height: 60px;
    height: 60px;
    padding: 0;
  }

  .v4-nav {
    margin: 0 auto;
  }

  /* Remove the large reserved space above the hero artwork */
  .v4-hero {
    min-height: 0;
    padding-top: 0;
    justify-content: flex-start;
  }
}

/* Mobile Home button: proportional scaling */
@media screen and (max-width: 820px) {
  .v4-nav-home {
    width: 15%;
    max-width: none;
    height: 75%;
    aspect-ratio: auto;
    flex: 0 0 15%;
  }

  .v4-nav-home > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
