/* styles.css — FULL drop-in, Option A alignment + working creations grid/cards/modal */

:root{
  --bg: #000;
  --text: #fff;
  --muted: rgba(255,255,255,.78);
  --line: rgba(255,255,255,.12);

  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.04);

  --accent: #ff6a00;
  --accentHover: #ff7f24;
  --accentInk: #000;

  --radius: 16px;
  --radius2: 20px;
  --shadow: 0 18px 60px rgba(0,0,0,.65);

  /* Option A: shared left/right alignment padding */
  --contentPad: 26px;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================
   Header / Banner / Intro
========================= */
.site-header{
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 80%);
}

/* Banner (supports your current HTML: .banner.banner-image > img + .banner-overlay) */
.banner{
  position: relative;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #000;
  min-height: 160px;
}

/* Banner image as background layer */
.banner-image > img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .60;
  z-index: 0;
  pointer-events: none;
}

/* Dark overlay for readability */
.banner::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.45) 55%,
    rgba(0,0,0,.20) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Banner content */
.banner-overlay{
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;     /* vertical centring */
  gap: 18px;

  height: 100%;            /* THIS is the key line */
  padding: var(--contentPad);
}


.site-logo{
  height: 180px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

/* If you add text next to the logo (optional) */
.banner-text{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.banner-title{
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.1;
}
.banner-subtitle{
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 70ch;
}

/* Intro (Option A aligned to banner) */
.intro{
  padding: 18px var(--contentPad) 16px;
}

.intro-title{
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: .2px;
}

.intro-body{
  margin: 10px 0 16px;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.55;
}

/* Mobile banner/intro */
@media (max-width: 640px){
  :root{ --contentPad: 18px; } /* keep alignment but tighter */

  .banner-overlay{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-logo{ height: 64px; }
  .banner-title{ font-size: 22px; }
}

/* =========================
   Controls (filters)
========================= */
.controls{
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr;
  gap: 12px;
}

@media (max-width: 820px){
  .controls{ grid-template-columns: 1fr; }
}

.control{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label{
  font-size: 12px;
  color: rgba(255,255,255,.90);
}

input[type="search"], select{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
}

input[type="search"]::placeholder{
  color: rgba(255,255,255,.55);
}

input[type="search"]:focus,
select:focus{
  border-color: rgba(255,106,0,.85);
  box-shadow: 0 0 0 4px rgba(255,106,0,.20);
}

/* =========================
   Meta
========================= */
.meta{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0 6px;
}

.result-count, .status{
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   Grid / Cards (THIS is what app.js expects)
========================= */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 10px 0 40px;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--radius2);
  overflow:hidden;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}

.card:focus-within, .card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,106,0,.55);
}

.card-top{
  display:flex;
  gap: 12px;
  padding: 14px 14px 10px;
}

.icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  object-fit: cover;
  flex: 0 0 auto;
}

.card-title{
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  color: var(--text);
}

.card-meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.card-desc{
  padding: 0 14px 12px;
  margin: 0;
  color: rgba(255,255,255,.90);
  font-size: 13px;
  line-height: 1.45;
  min-height: 38px;
}

.card-bottom{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.chips{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip{
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.10);
}

/* =========================
   Buttons / CTAs
========================= */
.btn{
  border: 1px solid rgba(255,106,0,.65);
  background: var(--accent);
  color: var(--accentInk);
  border-radius: 12px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 800;
}

.btn:hover{
  background: var(--accentHover);
  border-color: rgba(255,106,0,.90);
}

.btn-secondary{
  background: var(--accent);
}

/* Links */
a{
  color: var(--text);
  text-decoration-color: rgba(255,106,0,.55);
}
a:hover{
  text-decoration-color: rgba(255,106,0,.95);
}

/* =========================
   Modal / backdrop (app.js expects these IDs/classes)
========================= */
.backdrop{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
  z-index: 10;
}
.hidden{ display:none; }

.modal{
  width: min(920px, calc(100% - 24px));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: #050505;
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  z-index: 11;
}
.modal::backdrop{ background: transparent; }

.modal-header{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.modal-title{ margin:0; font-size: 18px; }
.modal-meta{ margin-top: 6px; color: var(--muted); font-size: 12px; }

.modal-body{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 16px;
}

@media (max-width: 860px){
  .modal-body{ grid-template-columns: 1fr; }
}

.qr-wrap{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.03);
}

.qr{
  width: 100%;
  display:grid;
  place-items: center;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
}

.qr-img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.modal-desc{
  margin: 0 0 12px;
  color: rgba(255,255,255,.92);
  line-height: 1.55;
}

.kv{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  overflow:hidden;
}

.kv-row{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.kv-row:first-child{ border-top: none; }

.kv-key{
  color: var(--muted);
  font-size: 12px;
}

.kv-val{
  font-size: 13px;
  color: rgba(255,255,255,.94);
  overflow-wrap: anywhere;
}

.tags{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
}
