/* =========================================================
   AUTUMN COMEDY SITE — FULL STYLES
   Uses SVG mask (#leafMaskSvg) as single source of truth
   ========================================================= */

/* ---------- Root theme ---------- */
:root{
  --bg-deep: #7a2b00;
  --bg-dark: #4b1700;

  --leaf-light: #f0a15b;
  --leaf-mid: #d96f2b;
  --leaf-dark: #5a2a0f;

  --panel-bg: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.06);

  --text: #fff8f2;
  --muted: rgba(255,245,235,0.7);
  --accent: #ffd6a5;

  --radius: 12px;

  font-family: Inter, "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

*,*::before,*::after{ box-sizing: inherit; }

/* ---------- Page base ---------- */
html,body{
  height:100%;
  margin:0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-dark) 100%);
  color:var(--text);
  overflow:hidden;
}

/* ---------- Accessibility ---------- */
.skip-link{
  position:absolute;
  left:-999px;
}
.skip-link:focus{
  left:12px;
  top:12px;
  background:white;
  color:black;
  padding:.5rem .75rem;
  border-radius:6px;
  z-index:9999;
}

/* ---------- Header ---------- */
.site-header{
  position:absolute;
  top:16px;
  left:16px;
  right:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:50;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-icon{
  width:44px;
  height:44px;
  border-radius:8px;
  object-fit:cover;
  box-shadow:0 6px 18px rgba(0,0,0,.4);
  border:2px solid rgba(255,255,255,.06);
}

.site-title{
  font-size:1.15rem;
  letter-spacing:.4px;
  color:var(--accent);
  margin:0;
}

/* ---------- Layout ---------- */
.page-main{
  width:100vw;
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

/* =========================================================
   LEAF SYSTEM
   Visual leaf + HTML mask share SAME path
   ========================================================= */

.leaf-wrapper{
  position:relative;
  width:min(1100px,92vw);
  height:calc(min(1100px,92vw) * 1.15);
  max-height:95vh;
}

/* hidden defs svg */
.leaf-defs{
  position:absolute;
  width:0;
  height:0;
}

/* visible leaf */
.leaf-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
}

/* HTML masked layer */
.leaf-mask{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:auto;
  overflow:hidden;

  mask:url(#leafMaskSvg);
  -webkit-mask:url(#leafMaskSvg);
  mask-repeat:no-repeat;
  -webkit-mask-repeat:no-repeat;
}

/* scroll container */
.leaf-content-inner{
  width:100%;
  height:100%;
  padding:38px 38px 30px 38px;
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;

  background:linear-gradient(180deg,
    rgba(255,255,255,0.03),
    rgba(0,0,0,0.05));
}

/* ---------- Heading ---------- */
.page-heading{
  margin:0 0 6px 0;
  font-size:1.6rem;
  color:var(--accent);
  text-shadow:0 2px 8px rgba(0,0,0,.45);
}

/* ---------- Controls ---------- */
.controls{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.search input{
  background:var(--glass);
  border:1px solid rgba(255,255,255,.05);
  color:var(--text);
  padding:.6rem .75rem;
  border-radius:10px;
  min-width:200px;
  outline:none;
}

.btn{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.05);
  padding:.5rem .7rem;
  border-radius:8px;
  cursor:pointer;
  color:var(--muted);
  font-weight:600;
}

/* ---------- Comedian Cards ---------- */
.comedian-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}

.comedian-card{
  display:flex;
  gap:12px;
  padding:12px;
  border-radius:10px;

  background:linear-gradient(
    180deg,
    rgba(255,255,255,0.03),
    rgba(0,0,0,0.06)
  );

  box-shadow:0 6px 18px rgba(0,0,0,.25);
}

.avatar{
  width:56px;
  height:56px;
  border-radius:8px;
  background:linear-gradient(180deg,#ffd6a5,#ff9f3b);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
  color:#4b1700;
  flex-shrink:0;
}

.name{
  margin:0;
  font-weight:700;
  color:var(--accent);
}

.meta{
  margin:6px 0 0 0;
  font-size:.9rem;
  color:var(--muted);
}

/* ---------- Footer ---------- */
.site-footer{
  margin-top:auto;
  color:var(--muted);
  font-size:.9rem;
}

/* ---------- Falling Leaves ---------- */
.falling-leaves{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:3;
}

.leaf-anim{
  position:absolute;
  left:calc(10% * var(--i));
  top:-15%;
  width:26px;
  height:26px;
  background:linear-gradient(180deg,#ffd6a5,#ff9f3b);
  border-radius:4px;
  animation:fall 8s linear infinite;
  animation-delay:calc(var(--i)*1s);
  opacity:.85;
}

@keyframes fall{
  0%{ transform:translateY(-10vh) rotate(0deg); opacity:1;}
  50%{ transform:translateY(40vh) rotate(90deg);}
  100%{ transform:translateY(110vh) rotate(160deg); opacity:0;}
}

/* ---------- Responsive ---------- */
@media (max-width:800px){
  .leaf-content-inner{ padding:28px 22px 22px 22px; }
  .comedian-card{ padding:10px; }
  .search input{ min-width:140px; }
}

/* ---------- Utility ---------- */
.visually-hidden{
  position:absolute!important;
  height:1px;width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}
