/* BuildersDaily.com site.css
   Masterplan Masaru / community-builder manga editorial system
   Mobile-friendly, high-contrast, no white-on-white.
*/

:root {
  --bd-ink: #11100d;
  --bd-ink-2: #21180f;
  --bd-blue: #123c63;
  --bd-blue-2: #0c2742;
  --bd-orange: #f28c28;
  --bd-gold: #f2b233;
  --bd-green: #2f6f4f;
  --bd-red: #b6352a;
  --bd-cream: #fff2d4;
  --bd-paper: #f4dfb6;
  --bd-sand: #e7c27b;
  --bd-white: #fffaf0;
  --bd-muted: #6a4a2f;
  --bd-line: rgba(17,16,13,.18);
  --bd-shadow: 8px 8px 0 rgba(17,16,13,.18);
  --bd-shadow-strong: 13px 13px 0 rgba(17,16,13,.25);
  --bd-radius: 24px;
  --bd-radius-lg: 34px;
  --bd-max: 1180px;
  --bd-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bd-display: Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", var(--bd-font);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--bd-ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(242, 178, 51, .16), transparent 25rem),
    linear-gradient(180deg, var(--bd-cream), var(--bd-paper));
  font-family: var(--bd-font);
  font-size: 16px;
  line-height: 1.58;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

a {
  color: var(--bd-blue);
  text-decoration-color: rgba(18,60,99,.35);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

::selection {
  color: var(--bd-ink);
  background: var(--bd-gold);
}

.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 999;
  padding: .65rem .9rem;
  border: 3px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  font-weight: 900;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.hot {
  color: var(--bd-orange);
}

/* Typography */

h1,
h2,
h3,
h4 {
  margin: 0 0 .65rem;
  color: var(--bd-ink);
  font-family: var(--bd-display);
  line-height: .95;
  letter-spacing: -.045em;
}

h1 {
  font-size: clamp(3.6rem, 10vw, 9.5rem);
}

h2 {
  font-size: clamp(2.35rem, 6vw, 5.7rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 2.4rem);
}

h4 {
  font-size: 1.15rem;
  letter-spacing: -.015em;
}

p {
  margin: 0 0 1rem;
}

.eyebrow,
.mini-label,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: .35rem;
  border: 3px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  font-size: .78rem;
  font-weight: 1000;
  letter-spacing: .075em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 1rem;
  padding: .5rem .75rem;
}

.mini-label,
.tag {
  padding: .35rem .62rem;
}

.tag {
  background: var(--bd-blue);
  color: var(--bd-white);
}

.hero-lede {
  max-width: 60ch;
  margin: .8rem 0 1.35rem;
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--bd-gold);
  border-radius: 0 18px 18px 0;
  color: var(--bd-white);
  background: rgba(17,16,13,.58);
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  font-weight: 750;
  backdrop-filter: blur(6px);
}

.fineprint {
  color: rgba(255,250,240,.72);
  font-size: .88rem;
  line-height: 1.5;
}

/* Header / navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 5px solid var(--bd-ink);
  background: rgba(17,16,13,.96);
  box-shadow: 0 8px 0 rgba(242,178,51,.18);
  backdrop-filter: blur(10px);
}

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--bd-gold);
  border-radius: 14px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  font-family: var(--bd-display);
  font-size: 1.15rem;
  box-shadow: 4px 4px 0 rgba(255,255,255,.13);
}

.brand-text {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .62rem .75rem;
  border-radius: 999px;
  color: var(--bd-white);
  font-size: .88rem;
  font-weight: 900;
  text-decoration: none;
}

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

.menu-toggle {
  display: none;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .55rem .8rem;
  border: 3px solid var(--bd-gold);
  border-radius: 999px;
  color: var(--bd-white);
  background: transparent;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-toggle::before {
  content: "☰";
  font-size: 1.1rem;
}

/* Generic sections */

.section {
  padding: clamp(3rem, 7vw, 6.5rem) 0;
  background: var(--bd-cream);
}

.section.dark {
  color: var(--bd-white);
  background:
    radial-gradient(circle at 90% 10%, rgba(242,178,51,.16), transparent 32rem),
    linear-gradient(135deg, var(--bd-ink), var(--bd-ink-2));
}

.section.dark h1,
.section.dark h2,
.section.dark h3,
.section.dark h4 {
  color: var(--bd-white);
}

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

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .45fr);
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.75rem;
}

.section-head p {
  color: var(--bd-muted);
  font-weight: 780;
}

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

/* Hero */

.hero {
  position: relative;
  min-height: 700px;
  display: grid;
  align-items: center;
  padding: clamp(3rem, 7vw, 7rem) 0;
  color: var(--bd-white);
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(17,16,13,.96), rgba(17,16,13,.82), rgba(17,16,13,.48)),
    url("https://buildersdaily.com/images/buildersdaily-hero-community-builder-manga.jpg") center/cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 15%, rgba(242,178,51,.23), transparent 30rem),
    linear-gradient(180deg, transparent 62%, rgba(17,16,13,.5));
  pointer-events: none;
}

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

.hero h1 {
  color: var(--bd-white);
  text-shadow: 0 6px 0 rgba(0,0,0,.45);
}

.hero-art {
  position: relative;
}

.hero-frame,
.panel,
.secret-card {
  overflow: hidden;
  border: 5px solid var(--bd-ink);
  border-radius: var(--bd-radius-lg);
  color: var(--bd-ink);
  background: var(--bd-cream);
  box-shadow: var(--bd-shadow-strong);
}

.hero-frame {
  border-color: var(--bd-gold);
  background: var(--bd-ink);
  transform: rotate(.55deg);
}

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

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

.danger-pill {
  display: inline-flex;
  padding: .35rem .62rem;
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
}

.floating-card {
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  max-width: 260px;
  padding: 1rem;
  border: 4px solid var(--bd-ink);
  border-radius: 20px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  box-shadow: 6px 6px 0 rgba(0,0,0,.32);
  font-weight: 850;
}

.floating-card b {
  display: block;
  margin-bottom: .25rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Buttons */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .78rem 1rem;
  border: 4px solid var(--bd-ink);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  box-shadow: 5px 5px 0 rgba(0,0,0,.25);
  font-weight: 1000;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.btn:hover {
  color: var(--bd-white);
  background: var(--bd-red);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 rgba(0,0,0,.25);
}

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

.btn.alt:hover {
  background: var(--bd-green);
}

/* Grids */

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

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

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

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

.panel {
  position: relative;
}

.panel.pad,
.secret-card {
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
}

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

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

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

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

.panel-body {
  padding: 1.15rem;
}

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

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

.panel a:not(.btn) {
  font-weight: 900;
}

/* Story / editorial modules */

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

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

.rule-list li {
  position: relative;
  padding-left: 1.45rem;
  color: inherit;
  font-weight: 780;
}

.rule-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--bd-green);
  font-weight: 1000;
}

.dark .rule-list li::before {
  color: var(--bd-gold);
}

.quote-box {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 7px solid var(--bd-gold);
  border-radius: 0 20px 20px 0;
  color: var(--bd-ink);
  background: var(--bd-cream);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 1000;
  line-height: 1.25;
}

/* Episode cards */

.episode-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 330px);
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: .3rem .15rem 1rem;
  scroll-snap-type: inline mandatory;
}

.episode {
  scroll-snap-align: start;
}

.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-ink);
  background: var(--bd-gold);
  font-family: var(--bd-display);
  font-size: 1.5rem;
  box-shadow: 4px 4px 0 rgba(0,0,0,.25);
}

/* Villain / character grid */

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

.villain-card {
  overflow: hidden;
  border: 4px solid var(--bd-ink);
  border-radius: 22px;
  color: var(--bd-ink);
  background: var(--bd-cream);
  box-shadow: 6px 6px 0 rgba(17,16,13,.16);
}

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

.villain-card div {
  padding: .95rem;
}

.villain-card h3 {
  font-size: 1.35rem;
  margin-bottom: .35rem;
}

.villain-card p {
  color: var(--bd-muted);
  font-size: .95rem;
  font-weight: 700;
}

/* Tables and utility content */

.table-wrap {
  overflow-x: auto;
  border: 4px solid var(--bd-ink);
  border-radius: 20px;
  background: var(--bd-cream);
  box-shadow: var(--bd-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: .85rem;
  border-bottom: 2px solid var(--bd-line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--bd-white);
  background: var(--bd-blue);
  font-weight: 1000;
}

tr:last-child td {
  border-bottom: 0;
}

/* Forms */

.form-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 5px solid var(--bd-ink);
  border-radius: var(--bd-radius-lg);
  background: var(--bd-cream);
  box-shadow: var(--bd-shadow-strong);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: .35rem;
  color: var(--bd-ink);
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 3px solid var(--bd-ink);
  border-radius: 14px;
  padding: .8rem .9rem;
  color: var(--bd-ink);
  background: #fff;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */

.site-footer {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 2rem;
  color: var(--bd-white);
  background: var(--bd-ink);
  border-top: 7px solid var(--bd-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(160px, .72fr));
  gap: 1.5rem;
}

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

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

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

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

.abc-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: .8rem;
  padding: .5rem;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
}

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

.license-badge {
  display: inline-flex;
  margin-top: .45rem;
  padding: .4rem .7rem;
  border: 3px solid var(--bd-gold);
  border-radius: 999px;
  color: var(--bd-ink);
  background: var(--bd-gold);
  font-weight: 1000;
  letter-spacing: .02em;
}

/* Motion */

.reveal {
  animation: bd-rise .55s ease both;
}

@keyframes bd-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* Responsive */

@media (max-width: 1120px) {
  .hero-grid,
  .secret-wall,
  .manifesto {
    grid-template-columns: 1fr;
  }

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

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

  .floating-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: .75rem;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    max-height: calc(100dvh - 74px);
    display: none;
    grid-template-columns: 1fr;
    gap: .45rem;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(17,16,13,.98);
    border-bottom: 5px solid var(--bd-gold);
  }

  .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    min-height: 50px;
    justify-content: center;
    border: 2px solid rgba(255,255,255,.14);
    border-radius: 16px;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-frame {
    transform: none;
  }
}

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

  h1 {
    font-size: clamp(3.2rem, 16vw, 5.8rem);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .villain-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

  .panel.pad,
  .secret-card {
    padding: 1rem;
  }

  .episode-rail {
    grid-auto-columns: minmax(250px, 88vw);
  }
}

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

  body {
    color: #000;
    background: #fff;
  }

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

  .panel,
  .hero-frame,
  .secret-card {
    box-shadow: none;
  }
}
