/* =========================
   8TURN — Editorial Theme
   Same layout in light/dark
========================= */

/* ---- THEME TOKENS (LIGHT DEFAULT) ---- */
:root{
  --bg: #f5efe6;
  --paper: rgba(255,255,255,0.85);
  --ink: #1f1f1f;
  --muted: rgba(31,31,31,0.65);
  --rule: rgba(31,31,31,0.16);
  --rule2: rgba(31,31,31,0.22);
  --accent: #b21e23;
  --radius: 18px;
}

/* ---- DARK OVERRIDES ---- */
html[data-theme="dark"]{
  --bg: #0f0f10;
  --paper: rgba(255,255,255,0.06);
  --ink: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --rule: rgba(255,255,255,0.14);
  --rule2: rgba(255,255,255,0.22);
  --accent: #d33a3a;
}

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

body{
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;

  /* keeps footer visible on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* subtle print texture */
body:before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.22;
}

/* ---- HEADER ---- */
header{
  max-width: 1100px;
  margin: 2.25rem auto 1rem;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--rule2);
  text-align: center;
}

header h1{
  font-family: "Playfair Display", serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.35rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--accent);
}

header p{
  margin: 0.2rem 0 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

/* ---- NAV ---- */
nav{
  max-width: 1100px;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

nav button{
  font-family: "Inter", sans-serif;
  border: 1px solid var(--rule2);
  background: transparent;
  color: var(--ink);
  padding: 0.55rem 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  cursor: pointer;
  border-radius: 999px;
}

nav button:hover{
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

/* ---- MAIN / SECTIONS ---- */
main{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  flex: 1;
}

.section{
  display: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.section.active{ display: block; }

.section h2{
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

/* generic “paper” container used in your HTML */
.paper{ background: transparent; }

.subtle{
  margin: 0 0 1rem;
  color: var(--ink);
  opacity: 0.92;
}
.muted{ color: var(--muted); }

/* ---- RULES ---- */
.rule{
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.6rem 0;
}
.rule.tight{ margin: 1rem 0; }
.rule.red{
  border-top-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* ---- BUTTONS ---- */
.btn{
  border: 1px solid var(--rule2);
  background: transparent;
  padding: 0.55rem 0.95rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  color: var(--ink);
}

.btn:hover{
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.btn-outline{ opacity: 0.9; }

.btn-stamp{
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0.5px 0.5px 0 color-mix(in srgb, var(--accent) 65%, transparent);
}
.btn-stamp:hover{
  transform: translate(0.5px, 0.5px);
  box-shadow: none;
}

/* ---- MESSAGES ---- */
.form input,
.form textarea{
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  padding: 0.55rem 0;
}

#username{
  border-bottom: 1px solid var(--rule2);
  margin-bottom: 1rem;
}

#messageInput{
  min-height: 120px;
  line-height: 1.85;
  resize: vertical;
  background-image: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--ink) 12%, transparent) 1px,
    transparent 1px
  );
  background-size: 100% 34px;
}

.actions{
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.message-list{
  margin-top: 2rem;
  column-count: 2;
  column-gap: 2rem;
}

.message-item{
  break-inside: avoid;
  padding: 0 0 1rem 0;
  margin: 0 0 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.message-top{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 0.35rem;
}

.message-name{
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.message-time{
  font-size: 0.75rem;
  font-style: italic;
  color: var(--muted);
}

.message-text{
  font-family: "Playfair Display", serif;
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0.2rem 0 0;
}

/* ---- UPDATES ---- */
.front-page{
  max-width: 980px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 16px 44px rgba(0,0,0,0.08);
  padding: 2rem;
  border-radius: var(--radius);
}

.kicker{
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.front-headline{
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0.4rem 0 0.35rem;
}

.deck{
  max-width: 60ch;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.update-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.update-card{
  border: 1px solid var(--rule);
  padding: 1.2rem;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  border-radius: 14px;
}
.update-card a {
  color: var(--accent);
  text-decoration: none;
}

.update-card a:hover {
  color: var(--accent);
  opacity: 0.85;
}


.stamp{
  display: inline-block;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  text-transform: uppercase;
  margin: 0;
  border-radius: 999px;
}

.update-card h4{
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  margin: 0.35rem 0 0.35rem;
}

.update-card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.pullquote{
  border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  padding-left: 1rem;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
}
.pullquote span{
  display: block;
  margin-top: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- CONTACT (Editorial Footer Style) ---- */
.contact-us{
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  max-width: 52ch;
}

.contact-us .kicker{
  margin-bottom: 0.35rem;
}

.contact-us h4{
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.contact-us .deck{
  font-size: 0.9rem;
  line-height: 1.6;
}

.contact-links{
  display: flex;
  gap: 1.5rem;
  margin-top: 0.6rem;
}

.contact-links a{
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.contact-links a:hover{
  color: var(--accent);
}

/* ---- MEMBERS ---- */
.members-title{
  font-family: "Playfair Display", serif;
  margin: 0.2rem 0 0.25rem;
  font-size: 1.6rem;
}
.members-sub{
  margin: 0 0 1rem;
  color: var(--muted);
}

.roster-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.roster-name{
  border: 1px solid var(--rule2);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

.slider-wrap{ margin-top: 1rem; }
.slide{ display: none; }
.slide.active{ display: block; }

.member-kicker{
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.member-name{
  font-family: "Playfair Display", serif;
  margin: 0.35rem 0 1rem;
  font-size: 2.2rem;
}

.member-facts{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.4rem;
  margin-bottom: 1rem;
}

.fact{
  border-top: 1px solid var(--rule);
  padding-top: 0.6rem;
}

.label{
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.value{
  margin-top: 0.2rem;
  font-weight: 600;
}

.member-bio{
  font-family: "Playfair Display", serif;
  line-height: 1.75;
  margin: 0;
  max-width: 70ch;
}

.slider-buttons{
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.members-socials{
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.members-socials a{
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.members-socials a:hover{
  text-decoration: underline;
}

/* ---- FANART ---- */
.fanart-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.fanart-card{
  background: color-mix(in srgb, var(--paper) 90%, white);
  border: 1px solid var(--rule);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  padding: 0.85rem 0.85rem 1.2rem;
  border-radius: 0;
  transform: rotate(-0.6deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.fanart-card:nth-child(2n){ transform: rotate(0.7deg); }
.fanart-card:nth-child(3n){ transform: rotate(-1.1deg); }

.fanart-card:hover{
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.14);
}

.fanart-card img{
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.fanart-card p{
  margin: 0.85rem 0 0;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
}

/* ---- FOOTER ---- */
footer{
  margin-top: 2.5rem;
  padding: 2rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
}

/* ---- THEME TOGGLE ---- */
.theme-toggle{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(0,0,0,0.10);
  border-radius: 999px;
}

.theme-label{
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.switch{
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider{
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  border: 1px solid var(--rule2);
  transition: 0.2s;
  border-radius: 999px;
}

.switch .slider:before{
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 2px;
  background: var(--ink);
  transition: 0.2s;
  border-radius: 999px;
}

.switch input:checked + .slider{
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule2));
}

.switch input:checked + .slider:before{
  transform: translateX(20px);
  background: var(--accent);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px){
  .update-grid{ grid-template-columns: 1fr; }
  .fanart-grid{ grid-template-columns: 1fr; }
  .message-list{ column-count: 1; }
  .roster-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px){
  .theme-label{ display:none; }
  .theme-toggle{ top: 10px; right: 10px; padding: 8px 10px; }
}

/* ---- VIDEOS (Magazine Grid) ---- */
.video-grid{
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.video-card{
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-radius: 14px;
}

.video-grid video{
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: #000;
  display: block;
}

.video-grid figcaption{
  margin-top: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
  text-align: left;
}

/* responsive columns */
@media (max-width: 1100px){
  .video-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .video-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .video-grid{ grid-template-columns: 1fr; }
}

