/* KantoParty - lightweight responsive theme (no external deps) */

:root{
  --bg: #0b0f17;
  --bg2:#0d1424;
  --card:#0f1a2f;
  --text:#e8eefc;
  --muted:#a7b3cf;
  --border:rgba(255,255,255,.10);
  --shadow: 0 14px 50px rgba(0,0,0,.45);

  /* Brand accents (adjust if you want to match logo colors precisely) */
  --accent:#ff4bd4;
  --accent2:#6ae4ff;
  --accent3:#a4ff7a;

  --radius:18px;
  --radius2:24px;
  --container: 1100px;

  --focus: 0 0 0 3px rgba(106,228,255,.35);

  --grad: radial-gradient(1100px 700px at 12% -10%, rgba(255,75,212,.22) 0, rgba(255,75,212,0) 55%),
          radial-gradient(900px 600px at 85% 0%, rgba(106,228,255,.18) 0, rgba(106,228,255,0) 60%),
          radial-gradient(1000px 700px at 60% 110%, rgba(164,255,122,.12) 0, rgba(164,255,122,0) 60%);
}

*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  background: var(--grad), linear-gradient(180deg, var(--bg) 0, var(--bg2) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height:1.55;
  text-rendering: optimizeLegibility;
}

img{ max-width:100%; height:auto; display:block }

a{ color:inherit; text-decoration: none }

.container{ max-width: var(--container); margin:0 auto; padding: 0 18px }

.skip{
  position:absolute; left:-999px; top:10px;
  background:#111827; color:#fff;
  padding:10px 12px; border-radius:12px;
  border:1px solid var(--border);
}
.skip:focus{ left:10px; outline:none; box-shadow: var(--focus) }

/* Header */
.site-header{
  position: sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,23,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 180px;
}
.brand-mark{
  position:relative;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
.brand-mark img{
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05 }
.wordmark{
  font-weight: 950;
  letter-spacing: -0.4px;
  font-size: 18px;
  color: rgba(232,238,252,.96);
}
.slogan{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(232,238,252,.72);
}

/* Hero brand block (home) */
.hero-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 10px;
}
.hero-brand .logo{
  width: 96px;
  height: 96px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.hero-brand .logo img{ width:100%; height:100%; object-fit:contain }
.hero-brand .name{
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 950;
  letter-spacing: -0.6px;
  margin: 0;
  color: rgba(232,238,252,.98);
}
.hero-brand .sub{
  margin: 4px 0 0;
  color: rgba(232,238,252,.78);
  font-size: 13px;
}

/* Elegant logo watermark (home hero) */
.brand-watermark{ position: relative; overflow: hidden; }
.brand-watermark::after{
  content:"";
  position:absolute;
  right: -26px;
  top: 18px;
  width: 320px;
  height: 320px;
  background-image: url("../assets/logokantoparty.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .10;
  transform: rotate(-8deg);
  pointer-events:none;
  filter: saturate(1.05);
}
.brand-watermark > *{ position: relative; z-index: 1; }

.nav{
  display:flex;
  align-items:center;
  gap: 12px;
}
.nav a{
  font-size:14px;
  color: rgba(232,238,252,.88);
  padding: 9px 10px;
  border-radius: 12px;
}
.nav a:hover{ background: rgba(255,255,255,.06) }
.nav a[aria-current="page"]{
  background: rgba(106,228,255,.10);
  border: 1px solid rgba(106,228,255,.22);
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px;
  font-weight: 700;
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
  user-select:none;
}
.btn:hover{ background: rgba(255,255,255,.08) }
.btn:focus{ outline:none; box-shadow: var(--focus) }
.btn.primary{
  border-color: rgba(255,75,212,.30);
  background: linear-gradient(135deg, rgba(255,75,212,.18), rgba(106,228,255,.12));
}
.btn.primary:hover{ background: linear-gradient(135deg, rgba(255,75,212,.25), rgba(106,228,255,.16)) }

.icon-btn{
  width: 44px;
  height: 44px;
  padding: 0;
}

/* Mobile nav */
.mobile-toggle{ display:none }
.mobile-sheet{
  display:none;
  border-top:1px solid rgba(255,255,255,.08);
  background: rgba(11,15,23,.82);
}
.mobile-sheet.open{ display:block }
.mobile-sheet a{
  display:flex;
  padding: 12px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  color: rgba(232,238,252,.92);
}
.mobile-sheet a:hover{ background: rgba(255,255,255,.06) }

/* Sections */
main{ padding-bottom: 60px }
.section{ padding: 28px 0 }

.hero{
  padding: 28px 0 22px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 18px;
  align-items: stretch;
}
.hero-card{
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  border-radius: var(--radius2);
  overflow:hidden;
}
.hero-copy{
  padding: 22px;
}
.h-eyebrow{
  display:inline-flex;
  gap:10px;
  align-items:center;
  color: rgba(232,238,252,.88);
  font-weight:700;
  font-size:13px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  padding: 6px 10px;
  border-radius: 999px;
}
.h1{
  margin: 12px 0 10px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.6px;
}
.lead{
  color: rgba(232,238,252,.82);
  font-size: 15px;
  max-width: 60ch;
}
.hero-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Carousel */
.carousel{
  height: 100%;
  display:flex;
  flex-direction:column;
}
.carousel-viewport{
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 260px;
  background: #0a1222;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.slide{
  position:absolute;
  inset:0;
  opacity:0;
  transform: scale(1.01);
  transition: opacity .35s ease, transform .5s ease;
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  padding: 18px;
}
.slide.is-active{ opacity:1; transform: scale(1) }
.slide::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 520px at 20% 15%, rgba(255,75,212,.28), transparent 60%),
    radial-gradient(800px 520px at 90% 25%, rgba(106,228,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,.55) 70%, rgba(0,0,0,.70) 100%);
}
.slide .media{
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
}
.slide .caption{
  position: relative;
  z-index:2;
  max-width: 62ch;
}
.slide .caption h3{ margin:0 0 6px; font-size: 18px }
.slide .caption p{ margin:0; color: rgba(232,238,252,.82); font-size: 13px }

.carousel-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  gap: 12px;
}
.dots{ display:flex; gap:8px; align-items:center; flex-wrap:wrap }
.dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.dot[aria-current="true"]{
  width: 22px;
  background: linear-gradient(90deg, rgba(255,75,212,.65), rgba(106,228,255,.55));
  border-color: rgba(106,228,255,.28);
}

/* Cards */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.card{
  grid-column: span 4;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.card h3{ margin:0 0 8px }
.card p{ margin:0; color: rgba(232,238,252,.78) }

.kpi{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.kpi .badge{
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,75,212,.22), rgba(106,228,255,.14));
  border: 1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; justify-content:center;
}

/* Page header */
.page-head{
  padding: 18px 0 6px;
}
.page-head h1{ margin: 0 0 6px; font-size: 28px }
.page-head p{ margin: 0; color: rgba(232,238,252,.80) }

/* History page */
.history-hero{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  align-items: stretch;
}
.history-hero .photo{
  grid-column: span 7;
  border-radius: var(--radius2);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background:#0a1222;
  aspect-ratio: 16 / 10;
  box-shadow: 0 16px 50px rgba(0,0,0,.30);
}
.history-hero .photo img{ width:100%; height:100%; object-fit: cover }
.history-hero .intro{ grid-column: span 5; }

.history-card-media{
  margin: 10px 0 12px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background:#0a1222;
  aspect-ratio: 16 / 9;
}
.history-card-media img{ width:100%; height:100%; object-fit: cover }

.flag-row{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 12px }
.flag{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}
.flag img{
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.35);
}
.flag span{ font-weight: 800; font-size: 13px; color: rgba(232,238,252,.86) }

.credits{ color: rgba(232,238,252,.74); font-size: 12px }
.credits a{ text-decoration: underline; text-decoration-color: rgba(106,228,255,.35) }
.credits ul, ul.credits{ margin: 10px 0 0; padding-left: 18px }
.credits li{ margin: 6px 0 }

/* Media gallery */
.gallery-toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  padding: 10px 0 6px;
}
.pager{
  display:flex;
  align-items:center;
  gap: 10px;
}
.pager .muted{ color: var(--muted); font-size: 13px }

.gallery{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.tile{
  grid-column: span 4;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  overflow:hidden;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease;
}
.tile:hover{ transform: translateY(-2px); background: rgba(255,255,255,.05) }
.tile .thumb{
  aspect-ratio: 16 / 10;
  background:#0a1222;
  position:relative;
}
.tile .thumb img{ width:100%; height:100%; object-fit:cover }
.tile .meta{ padding: 12px }
.tile .meta .t{ font-weight:800; margin:0 0 4px }
.tile .meta .d{ margin:0; color: rgba(232,238,252,.76); font-size: 13px }

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  display:none;
  z-index:90;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.68);
}
.lightbox.open{ display:flex }
.lightbox .panel{
  width: min(980px, 100%);
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(14,20,36,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.lightbox .panel header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.lightbox .panel header .title{
  font-weight: 900;
  font-size: 14px;
  color: rgba(232,238,252,.90);
}
.lightbox .content{
  padding: 0;
  background:#070b12;
}
.lightbox img, .lightbox iframe{
  width:100%;
  height: auto;
  display:block;
}
.lightbox iframe{
  aspect-ratio: 16 / 9;
  height: auto;
  border:0;
}

/* Forms */
.form{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius2);
  padding: 16px;
}
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px }
.label{ font-weight:800; font-size: 13px; color: rgba(232,238,252,.92) }
.input, textarea{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding: 12px 12px;
  font-size: 14px;
}
textarea{ min-height: 140px; resize: vertical }
.input:focus, textarea:focus{ outline:none; box-shadow: var(--focus) }
.help{ color: var(--muted); font-size: 12px }

/* Footer */
.site-footer{
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(11,15,23,.55);
  padding: 18px 0;
}
.footer-inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.footer-inner .mini{
  display:flex;
  align-items:center;
  gap: 10px;
}
.footer-inner img{ width:34px; height:34px }
.small{ color: rgba(232,238,252,.70); font-size: 12px }

/* Animations */
.reveal{
  opacity:0;
  transform: translateY(10px);
}
.reveal.is-visible{
  opacity:1;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .carousel-viewport{ min-height: 240px }
  .history-hero .photo,
  .history-hero .intro{ grid-column: span 12; }
  .card{ grid-column: span 6; }
  .tile{ grid-column: span 6; }
}
@media (max-width: 760px){
  .nav{ display:none }
  .mobile-toggle{ display:inline-flex }
  /* Force stacking on mobile even when pages use inline `grid-column: span X` */
  .grid > *{ grid-column: 1 / -1 !important; }

  /* Page-specific grids */
  .history-hero{ grid-template-columns: 1fr; }
  .history-hero .photo,
  .history-hero .intro{ grid-column: 1 / -1; }

  .card{ grid-column: span 12; }
  .tile{ grid-column: span 12; }
  .carousel-controls{ flex-direction:column; align-items:stretch }
  .dots{ justify-content:center }
  .brand-mark{ width: 44px; height: 44px }
  .wordmark{ font-size: 16px }
  .slogan{ display:none }
  .hero-brand .logo{ width: 84px; height: 84px }
  .brand-watermark::after{ width: 260px; height: 260px; opacity: .08; }
}
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important }
  .slide{ transition:none }
  .reveal, .reveal.is-visible{ transition:none; transform:none; opacity:1 }
}
