*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:#fff;
  background:#0b0b0b;
}
a{color:#fff; text-decoration:none}
:root{
  --stroke: rgba(255,255,255,.16);
  --glass: rgba(0,0,0,.26);
  --shadow: 0 18px 70px rgba(0,0,0,.38);
  --radius: 22px;
}

.hero{
  min-height:100svh;
  position:relative;
  display:flex;
  align-items:center;
  padding:28px 18px 64px;
  overflow:hidden;
}

.hero picture, .hero img.bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
  transform: scale(1.02);
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(0,0,0,.70), rgba(0,0,0,.30) 55%, rgba(0,0,0,.72)),
    linear-gradient(180deg, rgba(0,0,0,.70), rgba(0,0,0,.20) 45%, rgba(0,0,0,.76));
}

.top{
  position:absolute;
  top:16px; left:16px; right:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:3;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:950;
  letter-spacing:.2px;
  text-shadow: 0 14px 60px rgba(0,0,0,.5);
}
.brand img{width:34px; height:34px}
.brand span{font-size:20px}
.contact{
  font-size:16px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(0,0,0,.22);
  border:1px solid var(--stroke);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.contact:hover{background: rgba(0,0,0,.32)}

.hero-inner{
  position:relative;
  z-index:3;
  max-width: 980px;
  margin:0 auto;
  text-align:left;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  padding:18px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

h1{
  margin:0;
  font-weight:950;
  font-size:clamp(40px, 6.5vw, 86px);
  line-height:1.03;
  letter-spacing:-.8px;
  text-shadow: 0 18px 70px rgba(0,0,0,.5);
}
.sub{
  margin-top:10px;
  font-family: "Bradley Hand","Segoe Print","Marker Felt","Comic Sans MS",cursive;
  font-size: clamp(22px, 3.2vw, 36px);
  opacity:.96;
  text-shadow: 0 18px 70px rgba(0,0,0,.5);
}
.list{
  margin-top:18px;
  font-family: "Bradley Hand","Segoe Print","Marker Felt","Comic Sans MS",cursive;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height:1.25;
  opacity:.96;
  text-shadow: 0 18px 70px rgba(0,0,0,.5);
}
.ctaRow{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  font-weight:950;
}
.btn:hover{background: rgba(255,255,255,.16)}
.btn.primary{background: rgba(255,255,255,.18)}
.small{
  margin-top:12px;
  opacity:.88;
  font-size:16px;
}

.down{
  position:absolute;
  bottom:18px;
  right:18px;
  z-index:3;
  font-size:40px;
  opacity:.92;
  text-shadow: 0 18px 70px rgba(0,0,0,.5);
}

.section{
  padding:72px 18px;
  border-top:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(1000px 500px at 10% 0%, rgba(255,90,95,.16), transparent 55%),
    radial-gradient(1000px 500px at 90% 30%, rgba(91,192,235,.16), transparent 55%),
    #0b0b0b;
}
.wrap{max-width:1100px; margin:0 auto}
.h2{
  margin:0;
  font-size:clamp(30px, 4.2vw, 54px);
  font-weight:950;
  letter-spacing:-.4px;
}
.p{
  margin:12px 0 0;
  opacity:.9;
  font-size:18px;
  line-height:1.55;
  max-width: 78ch;
}
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-top:22px;
}
.card{
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  padding:18px;
}
.card .k{
  font-weight:950;
  font-size:18px;
}
.card .d{
  margin-top:8px;
  opacity:.88;
  line-height:1.45;
}

.mini{
  margin-top:20px;
  display:inline-block;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  font-weight:900;
  opacity:.95;
}

.contactSection{
  padding:72px 18px;
  border-top:1px solid rgba(255,255,255,.10);
  background:#0b0b0b;
}
.form{display:grid; gap:12px; max-width:720px}
label{font-weight:900; opacity:.9; font-size:14px}
input, textarea{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color:white;
  outline:none;
}
textarea{min-height:120px; resize:vertical}
button{
  width:max-content;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.26);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-weight:950;
  cursor:pointer;
}
button:hover{background:rgba(255,255,255,.18)}

@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
  .hero-inner{text-align:left}
}


/* --- v9: closable hero card --- */
.hero-inner{ position:relative; }
.closeCard{
  position:absolute;
  top:12px; right:12px;
  width:40px; height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  color:#fff;
  font-size:26px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.closeCard:hover{ background: rgba(0,0,0,.32); }
.hero-inner.collapsed{ display:none; }

.openCard{
  position:absolute;
  left:16px;
  bottom:18px;
  z-index:3;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  color:#fff;
  font-weight:950;
  cursor:pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity:0;
  pointer-events:none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.openCard.show{
  opacity:1;
  pointer-events:auto;
  transform: translateY(0);
}
.openCard:hover{ background: rgba(0,0,0,.32); }


/* --- v10: ensure close button is clickable above overlays --- */
.closeCard{
  z-index: 10;
  pointer-events: auto;
}
.openCard{
  z-index: 10;
  pointer-events: auto;
}


/* --- v11: brighten background when intro is closed --- */
body.bg-bright .hero::before{
  opacity: 0.15; /* was darker, now lighter */
}


/* --- v12: make hero work in portrait + landscape --- */

/* Make hero content usable on short viewports (mobile portrait) */
@media (max-width: 640px){
  .hero{
    padding: 22px 12px 54px;
    align-items: flex-end; /* keep card low so image is visible */
  }
  .top{
    top: 12px; left: 12px; right: 12px;
  }
  .brand span{font-size:18px}
  .contact{padding:9px 10px; font-size:15px}

  .hero-inner{
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 14px 14px 14px;
    border-radius: 18px;
  }

  /* Scale typography down a touch so it fits portrait without forcing landscape */
  h1{
    font-size: clamp(30px, 8.6vw, 46px);
    line-height: 1.04;
    letter-spacing: -0.6px;
  }
  .sub{
    font-size: clamp(18px, 5.6vw, 26px);
  }
  .list{
    font-size: clamp(18px, 5.2vw, 24px);
    line-height: 1.22;
  }
  .ctaRow{gap:10px}
  .btn{padding:11px 12px; font-size:15px}
  .small{font-size:14px; line-height:1.35}

  /* Ensure card never exceeds the viewport height */
  .hero-inner{
    max-height: calc(100svh - 86px); /* leave room for top bar */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Down arrow stays visible */
  .down{
    right: 12px;
    bottom: 10px;
    font-size: 34px;
  }

  /* Open/Intro button positioning */
  .openCard{
    left: 12px;
    bottom: 10px;
  }

  /* Close button slightly smaller */
  .closeCard{
    width: 36px; height: 36px;
    font-size: 24px;
    top: 10px; right: 10px;
  }
}

/* Handle ultra-short heights (landscape phones) */
@media (max-height: 520px){
  .hero{ align-items: center; padding-bottom: 22px; }
  .hero-inner{ max-height: calc(100svh - 64px); }
  .small{ display:none; } /* optional: reduce clutter */
}

/* --- v12: overlay opacity variable for bright/dim --- */
.hero::before{ opacity: var(--overlayOpacity, 1); }
body.bg-bright{ --overlayOpacity: 0.45; }
