/* =========================================================
   BuilderDaily.com — site.css
   Premium manga-construction editorial system
   Built to match the current index / 1.html structure
   ========================================================= */

:root {
  --bd-ink: #130f0b;
  --bd-ink-2: #261c14;
  --bd-ink-3: #3a2a1c;

  --bd-paper: #f3e2c3;
  --bd-paper-2: #e7c995;
  --bd-card: #fff2d4;
  --bd-card-2: #ffe5ac;

  --bd-gold: #f1b331;
  --bd-orange: #d95b22;
  --bd-red: #aa281c;
  --bd-blue: #123f68;
  --bd-blue-2: #0b6a91;
  --bd-green: #2d6f4f;

  --bd-white: #fffaf0;
  --bd-muted: #684b31;
  --bd-line: rgba(19, 15, 11, .22);

  --bd-shadow: 0 28px 70px rgba(19, 15, 11, .28);
  --bd-shadow-soft: 0 16px 34px rgba(19, 15, 11, .18);

  --bd-max: 1200px;
  --bd-radius: 24px;
  --bd-radius-lg: 36px;
}

/* ------------------------------
   Reset / base
   ------------------------------ */

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

html {
  background: var(--bd-paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bd-ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at 16% 0%, rgba(241, 179, 49, .32), transparent 34rem),
    radial-gradient(circle at 86% 8%, rgba(18, 63, 104, .24), transparent 36rem),
    linear-gradient(180deg, #f8e8c7 0%, var(--bd-paper) 38%, #d9b36f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(19,15,11,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,15,11,.055) 1px, transparent 1px);
  background-size: 42px 42px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background:
    repeating-linear-gradient(
      -10deg,
      transparent 0,
      transparent 10px,
      rgba(19, 15, 11, .08) 11px,
      transparent 12px
    );
  mix-blend-mode: multiply;
}

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

a {
  color: var(--bd-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--bd-red);
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .85rem;
  line-height: .98;
  letter-spacing: -.055em;
  color: inherit;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4rem, 11vw, 10.5rem);
  font-weight: 1000;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2.35rem, 5.5vw, 6.2rem);
  font-weight: 1000;
  text-transform: uppercase;
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 2.25rem);
  font-weight: 950;
  text-transform: uppercase;
}

h4 {
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

strong {
  color: inherit;
}

.wrap {
  width: min(var(--bd-max), calc(100% - 34px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 9999;
  padding: .85rem 1rem;
  border: 3px solid var(--bd-gold);
  border-radius: 999px;
  color: var(--bd-white);
  background: var(--bd-ink);
  font-weight: 950;
}

.skip-link:focus {
  top: 1rem;
}

/* ------------------------------
   Header / mobile-friendly nav
   ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--bd-white);
  background:
    linear-gradient(90deg, rgba(19,15,11,.98), rgba(38,28,20,.98));
  border-bottom: 4px solid var(--bd-gold);
  box-shadow: 0 14px 34px rgba(19, 15, 11, .28);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--bd-white);
  text-decoration: none;
  font-weight: 1000;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--bd-gold);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 3px solid var(--bd-gold);
  border-radius: 14px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  box-shadow: 4px 4px 0 rgba(255,255,255,.16);
  font-weight: 1000;
}

.brand-text {
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .32rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .56rem .82rem;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--bd-white);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 900;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--bd-gold);
  color: var(--bd-ink);
  background: var(--bd-gold);
}

.menu-toggle {
  display: none;
  min-width: 48px;
  min-height: 48px;
  padding: .55rem .8rem;
  border: 3px solid var(--bd-gold);
  border-radius: 14px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

/* ------------------------------
   Hero
   ------------------------------ */

.hero {
  position: relative;
  overflow: clip;
  min-height: calc(100svh - 78px);
  padding: clamp(3rem, 7vw, 7rem) 0 clamp(3rem, 7vw, 6rem);
  color: var(--bd-white);
  background:
    linear-gradient(110deg, rgba(19,15,11,.98) 0%, rgba(19,15,11,.90) 44%, rgba(19,15,11,.56) 72%, rgba(19,15,11,.80) 100%),
    radial-gradient(circle at 28% 24%, rgba(241,179,49,.25), transparent 34rem),
    linear-gradient(135deg, var(--bd-ink), var(--bd-ink-2));
}

.hero::before {
  content: "BUILDER DAILY";
  position: absolute;
  left: -1rem;
  bottom: -2rem;
  z-index: 0;
  color: rgba(255,255,255,.045);
  font-size: clamp(5rem, 15vw, 18rem);
  font-weight: 1000;
  letter-spacing: -.08em;
  line-height: .75;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
}

.eyebrow,
.mini-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: .48rem .78rem;
  border: 3px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  box-shadow: 5px 5px 0 rgba(19,15,11,.45);
  font-size: .78rem;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dark .mini-label,
.hero .mini-label {
  border-color: var(--bd-gold);
  color: var(--bd-ink);
  background: var(--bd-gold);
}

.hot {
  color: var(--bd-gold);
  text-shadow: 6px 6px 0 rgba(170,40,28,.62);
}

.hero-lede {
  max-width: 64ch;
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  border-left: 8px solid var(--bd-orange);
  border-radius: 0 18px 18px 0;
  color: #fff9e8;
  background: rgba(0,0,0,.32);
  font-size: clamp(1.08rem, 1.7vw, 1.32rem);
  font-weight: 700;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .9rem 1.16rem;
  border: 3px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  box-shadow: 5px 5px 0 rgba(19,15,11,.78);
  font-weight: 1000;
  letter-spacing: -.01em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  color: var(--bd-ink);
  background: #ffd166;
  box-shadow: 3px 3px 0 rgba(19,15,11,.78);
}

.btn.alt {
  color: var(--bd-white);
  background: var(--bd-red);
}

.btn.alt:hover {
  color: var(--bd-white);
  background: #c63628;
}

.hero-art {
  position: relative;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 5px solid var(--bd-gold);
  border-radius: var(--bd-radius-lg);
  background: var(--bd-ink);
  box-shadow:
    var(--bd-shadow),
    12px 12px 0 rgba(241,179,49,.65);
  transform: rotate(.7deg);
}

.hero-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.caption-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .9rem 1rem;
  color: var(--bd-white);
  background: var(--bd-ink);
  font-weight: 1000;
  text-transform: uppercase;
}

.danger-pill {
  flex: 0 0 auto;
  padding: .34rem .58rem;
  border-radius: 999px;
  color: var(--bd-white);
  background: var(--bd-red);
  font-size: .75rem;
}

.floating-card {
  position: absolute;
  right: -1rem;
  bottom: -1.4rem;
  max-width: 260px;
  padding: 1rem;
  border: 4px solid var(--bd-ink);
  border-radius: 20px;
  color: var(--bd-ink);
  background: var(--bd-card);
  box-shadow: 8px 8px 0 var(--bd-red);
  font-size: 1.05rem;
  font-weight: 900;
  transform: rotate(-2deg);
}

.floating-card b {
  display: block;
  margin-bottom: .35rem;
  color: var(--bd-red);
  text-transform: uppercase;
}

/* ------------------------------
   Sections / layout
   ------------------------------ */

.section {
  padding: clamp(3rem, 7vw, 7rem) 0;
}

.section.dark {
  color: var(--bd-white);
  background:
    radial-gradient(circle at 15% 15%, rgba(241,179,49,.18), transparent 28rem),
    linear-gradient(135deg, var(--bd-ink) 0%, var(--bd-ink-2) 100%);
}

.section.dark p {
  color: rgba(255,250,240,.86);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-head > div {
  max-width: 760px;
}

.section-head p {
  max-width: 430px;
  color: var(--bd-muted);
  font-size: 1.08rem;
  font-weight: 700;
}

.dark .section-head p {
  color: rgba(255,250,240,.8);
}

.grid {
  display: grid;
  gap: 1.15rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.secret-wall,
.manifesto {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.secret-card,
.panel {
  overflow: hidden;
  border: 4px solid var(--bd-ink);
  border-radius: var(--bd-radius);
  color: var(--bd-ink);
  background: var(--bd-card);
  box-shadow: var(--bd-shadow-soft);
}

.secret-card {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow:
    var(--bd-shadow),
    8px 8px 0 var(--bd-gold);
}

.dark .secret-card,
.dark .panel {
  color: var(--bd-ink);
  background: var(--bd-card);
}

.panel.pad {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.panel.image img,
.panel.poster img {
  width: 100%;
  object-fit: cover;
}

.panel.image img {
  aspect-ratio: 16 / 10;
}

.panel.poster img {
  aspect-ratio: 3 / 4;
}

.panel-body {
  padding: 1.05rem;
  color: var(--bd-ink);
  background: var(--bd-card);
}

.panel-body p,
.secret-card p,
.villain-card p {
  color: var(--bd-muted);
  font-weight: 650;
}

.tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: .7rem;
  padding: .28rem .6rem;
  border: 2px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-white);
  background: var(--bd-blue);
  font-size: .72rem;
  font-weight: 1000;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.rule-list {
  display: grid;
  gap: .7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  position: relative;
  padding: .75rem .85rem .75rem 2.55rem;
  border: 3px solid rgba(19,15,11,.14);
  border-radius: 16px;
  color: var(--bd-ink);
  background: rgba(255,255,255,.42);
  font-weight: 900;
}

.rule-list li::before {
  content: "✓";
  position: absolute;
  left: .75rem;
  top: .68rem;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  color: var(--bd-white);
  background: var(--bd-green);
  font-size: .9rem;
  font-weight: 1000;
}

/* ------------------------------
   Episodes
   ------------------------------ */

.episode-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding: .35rem .35rem 1.1rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--bd-red) rgba(19,15,11,.16);
}

.episode {
  position: relative;
  scroll-snap-align: start;
  box-shadow:
    var(--bd-shadow-soft),
    6px 6px 0 rgba(19,15,11,.2);
}

.episode:nth-child(odd) {
  transform: rotate(-.45deg);
}

.episode:nth-child(even) {
  transform: rotate(.45deg);
}

.episode-num {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 4px solid var(--bd-ink);
  border-radius: 50%;
  color: var(--bd-white);
  background: var(--bd-red);
  box-shadow: 4px 4px 0 var(--bd-gold);
  font-size: 1.1rem;
  font-weight: 1000;
}

/* ------------------------------
   Brothers manifesto / quote
   ------------------------------ */

.manifesto .panel {
  box-shadow:
    var(--bd-shadow),
    8px 8px 0 var(--bd-gold);
}

.quote-box {
  margin: 1.2rem 0;
  padding: 1.2rem;
  border-left: 10px solid var(--bd-gold);
  border-radius: 0 20px 20px 0;
  color: var(--bd-white);
  background: rgba(255,255,255,.1);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 1000;
  line-height: 1.15;
}

/* ------------------------------
   Villains
   ------------------------------ */

.villain-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 1rem;
}

.villain-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 4px solid var(--bd-ink);
  border-radius: var(--bd-radius);
  color: var(--bd-ink);
  background: var(--bd-card);
  box-shadow:
    var(--bd-shadow-soft),
    6px 6px 0 rgba(19,15,11,.18);
}

.villain-card:nth-child(2n) {
  background: var(--bd-card-2);
}

.villain-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 4px solid var(--bd-ink);
}

.villain-card > div {
  padding: 1rem;
}

.villain-card h3 {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
}

/* ------------------------------
   Guide cards
   ------------------------------ */

.guide-card {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) 1fr;
  align-items: stretch;
}

.guide-card > img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-right: 4px solid var(--bd-ink);
}

/* ------------------------------
   Footer
   ------------------------------ */

.site-footer {
  padding: clamp(2.6rem, 5vw, 4rem) 0;
  color: var(--bd-white);
  background:
    linear-gradient(135deg, #0c0907, var(--bd-ink-2));
  border-top: 6px solid var(--bd-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(140px, .75fr));
  gap: clamp(1.25rem, 3vw, 2.4rem);
}

.site-footer h3,
.site-footer h4 {
  color: var(--bd-gold);
}

.site-footer p {
  color: rgba(255,250,240,.82);
  font-weight: 650;
}

.site-footer a {
  color: var(--bd-white);
}

.site-footer a:hover {
  color: var(--bd-gold);
}

.abc-logo {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1rem;
  padding: .65rem;
  border: 3px solid var(--bd-gold);
  border-radius: 18px;
  background: var(--bd-white);
  box-shadow: 6px 6px 0 rgba(241,179,49,.28);
}

.abc-logo img {
  width: min(230px, 100%);
  height: auto;
}

.footer-links {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  padding: .15rem 0;
  font-weight: 800;
  text-decoration-thickness: 1px;
}

.fineprint {
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.22);
  color: rgba(255,250,240,.68);
  font-size: .92rem;
}

/* ------------------------------
   Reveal animation
   ------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .55s ease,
    transform .55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------
   Utilities / accessibility
   ------------------------------ */

:focus-visible {
  outline: 4px solid var(--bd-gold);
  outline-offset: 4px;
}

.image-error {
  min-height: 180px;
  background:
    linear-gradient(135deg, var(--bd-card), var(--bd-paper-2));
}

/* ------------------------------
   Responsive
   ------------------------------ */

@media (max-width: 1120px) {
  .villain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  h1 {
    max-width: 11ch;
  }

  .hero-grid,
  .secret-wall,
  .manifesto,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-frame {
    transform: none;
  }

  .floating-card {
    position: static;
    max-width: none;
    margin-top: 1rem;
    transform: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head p {
    max-width: 70ch;
  }

  .guide-card {
    grid-template-columns: 1fr;
  }

  .guide-card > img {
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-bottom: 4px solid var(--bd-ink);
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 24px, var(--bd-max));
  }

  .nav {
    min-height: 68px;
    flex-wrap: wrap;
    padding: .65rem 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-text {
    font-size: 1.28rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: .85rem 0 .35rem;
  }

  .nav.open .nav-links {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
    min-height: 48px;
    border: 2px solid rgba(241,179,49,.52);
    border-radius: 14px;
    color: var(--bd-white);
    background: rgba(255,255,255,.08);
  }

  .nav-links a:hover,
  .nav-links a[aria-current="page"] {
    color: var(--bd-ink);
    background: var(--bd-gold);
  }

  .hero {
    padding-top: 2.6rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 6rem);
  }

  h2 {
    font-size: clamp(2.1rem, 12vw, 4rem);
  }

  .hero-lede {
    padding: 1rem;
    font-size: 1.04rem;
  }

  .caption-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .episode-rail {
    grid-auto-columns: minmax(78%, 1fr);
  }

  .villain-grid {
    grid-template-columns: 1fr;
  }

  .villain-card {
    grid-template-columns: 118px 1fr;
    grid-template-rows: auto;
  }

  .villain-card img {
    height: 100%;
    min-height: 150px;
    border-right: 4px solid var(--bd-ink);
    border-bottom: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .brand-text {
    font-size: 1.06rem;
  }

  .hero-actions,
  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .episode-rail {
    grid-auto-columns: 88%;
  }

  .villain-card {
    grid-template-columns: 1fr;
  }

  .villain-card img {
    border-right: 0;
    border-bottom: 4px solid var(--bd-ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------
   Print
   ------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .cta-row,
  .menu-toggle {
    display: none !important;
  }

  body,
  .hero,
  .section.dark {
    color: #000;
    background: #fff;
  }

  .panel,
  .secret-card,
  .villain-card,
  .hero-frame {
    box-shadow: none;
    break-inside: avoid;
  }
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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