/* ========================================
   BAM.NZ — Comic Book Film Noir Theme
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Oswald:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Special+Elite&display=swap');

/* Theme tokens */
:root {
  --bg: #000;
  --fg: #fff;
  --fg-muted: #888;
  --fg-dim: #666;
  --fg-faint: #555;
  --fg-ghost: #444;
  --fg-whisper: #333;
  --panel-border: #fff;
  --panel-bg: transparent;
  --icon-bg: #0a0a0a;
  --svg-fill: white;
  --shadow-mid: #444;
  --shadow-deep: #1a1a1a;
  --dash-color: #fff;
  --transition: background 0.3s, color 0.3s, border-color 0.3s;
}

html.light {
  --bg: #f5f5f0;
  --fg: #111;
  --fg-muted: #555;
  --fg-dim: #666;
  --fg-faint: #777;
  --fg-ghost: #999;
  --fg-whisper: #bbb;
  --panel-border: #111;
  --panel-bg: #fff;
  --icon-bg: #eee;
  --svg-fill: black;
  --shadow-mid: #bbb;
  --shadow-deep: #ddd;
  --dash-color: #111;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  transition: var(--transition);
}

a {
  color: var(--fg-muted);
  text-decoration: none;
}
a:hover {
  color: var(--fg);
}

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  font-family: 'Bangers', cursive;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--fg-ghost);
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition), opacity 0.2s;
}

.theme-toggle:hover {
  opacity: 1;
  color: var(--fg);
  border-color: var(--panel-border);
}

/* Layout */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1000px;
  padding: 0 60px;
}

/* ---- HERO ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 60px 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero__title {
  font-family: 'Bangers', cursive;
  font-size: 160px;
  letter-spacing: 14px;
  line-height: 1;
  color: var(--fg);
  text-shadow: 5px 5px 0px var(--shadow-mid), 10px 10px 0px var(--shadow-deep);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.hero__svg {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.12;
  z-index: 0;
}

.hero__lines {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.06;
  z-index: 0;
}

.hero__sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 60px 40px;
  width: 100%;
}

.hero__divider {
  width: 80px;
  height: 3px;
  background: var(--fg);
}

.hero__subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 8px;
  text-transform: uppercase;
  padding-top: 16px;
  font-weight: 300;
}

.hero__tagline {
  font-family: 'Special Elite', monospace;
  font-size: 14px;
  color: var(--fg-muted);
  padding-top: 20px;
  text-align: center;
  line-height: 1.6;
  max-width: 460px;
}

/* ---- SECTION DIVIDER ---- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  padding: 48px 60px 0;
}

.section-divider__line {
  flex: 1;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--dash-color) 0px, var(--dash-color) 8px, transparent 8px, transparent 16px);
}

.section-divider__text {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  color: var(--fg);
  letter-spacing: 6px;
}

/* ---- GRID ---- */
.grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  padding: 32px 60px 0;
}

.grid__row {
  display: flex;
}

/* ---- PANEL (Comic card) ---- */
.panel {
  display: flex;
  flex-direction: column;
  border: 3px solid var(--panel-border);
  background: var(--panel-bg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.panel--no-top {
  border-top: none;
}

.panel--no-left {
  border-left: none;
}

.panel--large {
  padding: 36px 40px;
}

.panel__label {
  font-family: 'Bangers', cursive;
  font-size: 14px;
  color: var(--fg-faint);
  letter-spacing: 2px;
}

.panel__label--oswald {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 300;
}

.panel__title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  color: var(--fg);
  line-height: 1.05;
  padding-top: 8px;
}

.panel__title--xl { font-size: 44px; }
.panel__title--lg { font-size: 36px; }
.panel__title--md { font-size: 28px; }

.panel__desc {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  font-weight: 300;
  padding-top: 14px;
}

.panel__link {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  color: var(--fg-ghost);
  padding-top: 14px;
}

.panel__note {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
  padding-top: 20px;
}

/* Metrics row */
.metrics {
  display: flex;
  gap: 40px;
  padding-top: 24px;
  align-items: flex-end;
}

.metric__value {
  font-family: 'Bangers', cursive;
  font-size: 52px;
  color: var(--fg);
  line-height: 1;
}

.metric__label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 3px;
  font-weight: 300;
  padding-top: 2px;
}

/* Tags row */
.tags {
  display: flex;
  gap: 16px;
  padding-top: 20px;
  flex-wrap: wrap;
}

.tag {
  font-family: 'Bangers', cursive;
  font-size: 13px;
  color: var(--fg);
  border: 2px solid var(--panel-border);
  padding: 6px 14px;
  letter-spacing: 1px;
  transition: var(--transition);
}

.tag--sm {
  font-size: 11px;
  padding: 3px 8px;
  border-width: 1px;
  color: var(--fg-muted);
  border-color: var(--fg-ghost);
}

/* Decorative SVGs */
.panel__svg {
  position: absolute;
  opacity: 0.06;
  z-index: 0;
}

.panel__svg *, .hero__svg *, .hero__lines * {
  fill: var(--svg-fill);
  stroke: var(--svg-fill);
}

.panel__svg--br { bottom: -20px; right: -20px; }
.panel__svg--tr { top: -10px; right: -10px; }
.panel__svg--tl { top: -10px; left: -10px; }
.panel__svg--bl { bottom: -5px; left: -5px; }

/* ---- FOOTER ---- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  padding: 64px 60px 48px;
  gap: 12px;
}

.footer__line {
  width: 40px;
  height: 2px;
  background: var(--fg);
}

.footer--fixed {
  margin-top: auto;
}

.footer__email {
  font-family: 'Special Elite', monospace;
  font-size: 14px;
  color: var(--fg-faint);
  padding-top: 10px;
}

.footer__company {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  color: var(--fg-whisper);
  letter-spacing: 4px;
  font-weight: 300;
  padding-top: 6px;
}

/* ---- EXTERNAL LINK ICON ---- */
a[target="_blank"]::after,
a[href^="http"]::after {
  content: " \2197";
  font-size: 0.8em;
  opacity: 0.6;
}

a[href^="/"]::after,
a[href^="./"]::after,
a[href^="#"]::after,
a:not([href^="http"])::after {
  content: none;
}

.panel__title a::after,
.back a::after,
.footer__email a::after {
  content: none;
}

/* ---- BACK LINK ---- */
.back {
  width: 100%;
  max-width: 1000px;
  padding: 24px 60px 0;
}

.back a {
  font-family: 'Bangers', cursive;
  font-size: 18px;
  color: var(--fg-faint);
  letter-spacing: 2px;
  text-decoration: none;
}

.back a:hover {
  color: var(--fg);
}

/* ---- DETAIL ICON ---- */
.detail__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-bg);
  padding: 32px;
}

.detail__icon-img {
  max-width: 128px;
  height: auto;
  border-radius: 0;
}

/* ---- GALLERY ---- */
.gallery--stacked .grid__row {
  flex-direction: column;
}

.gallery--stacked .panel--gallery {
  border-left: 3px solid var(--panel-border);
  border-right: 3px solid var(--panel-border);
}

.panel--gallery {
  border: 3px solid var(--panel-border);
  padding: 0;
  overflow: hidden;
}

.gallery__img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery__caption {
  font-family: 'Bangers', cursive;
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 2px;
  padding: 10px 16px;
  border-top: 1px solid var(--panel-border);
  background: var(--bg);
  transition: var(--transition);
}

/* ---- CAROUSEL ---- */
.carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  padding: 20px 60px 0;
  margin: 0 auto;
}

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 3px solid var(--panel-border);
  background: var(--panel-bg);
  transition: var(--transition);
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.carousel__slide img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel__slide .gallery__caption {
  border-top: 1px solid var(--panel-border);
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 16px;
}

.carousel__btn {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  color: var(--fg);
  background: none;
  border: 2px solid var(--panel-border);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.carousel__btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.carousel__dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--fg-faint);
  background: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.carousel__dot--active {
  background: var(--fg);
  border-color: var(--fg);
}

.carousel__counter {
  font-family: 'Bangers', cursive;
  font-size: 14px;
  color: var(--fg-faint);
  letter-spacing: 2px;
}

@media (max-width: 768px) {
  .carousel { padding: 16px 24px 0; }
  .carousel__btn { width: 36px; height: 36px; font-size: 18px; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .hero { padding: 48px 24px 0; }
  .hero__title { font-size: 80px; letter-spacing: 8px; }
  .hero__sub { padding: 0 24px 24px; }
  .section-divider { padding: 32px 24px 0; }
  .section-divider__text { font-size: 20px; letter-spacing: 4px; }
  .grid { padding: 24px 24px 0; }

  .grid__row { flex-direction: column; }
  .panel--no-left { border-left: 3px solid var(--panel-border); border-top: none; }
  .panel { padding: 24px; }

  .panel__title--xl { font-size: 32px; }
  .panel__title--lg { font-size: 28px; }
  .panel__title--md { font-size: 24px; }

  .metrics { gap: 24px; flex-wrap: wrap; }
  .metric__value { font-size: 36px; }

  .tags { gap: 10px; }
  .tag { font-size: 11px; padding: 5px 10px; }

  .footer { padding: 48px 24px 36px; }

  .back { padding: 16px 24px 0; }

  .detail__icon {
    flex: 1 !important;
    min-height: 200px;
  }

  .detail__icon-img { max-width: 160px; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 60px; letter-spacing: 6px; }
  .hero__subtitle { font-size: 11px; letter-spacing: 5px; }
  .metrics { gap: 16px; }
  .metric__value { font-size: 30px; }
}

/* ---- CLIENT / PROPOSAL SECTION ---- */
.proposal-nav {
  width: 100%;
  max-width: 1000px;
  padding: 24px 60px 0;
}

.proposal-nav__logo {
  font-family: 'Bangers', cursive;
  font-size: 28px;
  color: var(--fg);
  letter-spacing: 3px;
  text-decoration: none;
}

.proposal-content {
  width: 100%;
  max-width: 1000px;
  padding: 0 60px;
}

.client-welcome {
  padding: 48px 0 32px;
}

.client-welcome__name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 44px;
  color: var(--fg);
  line-height: 1.1;
}

.client-welcome__divider {
  width: 60px;
  height: 3px;
  background: var(--fg);
  margin-top: 16px;
}

.client-welcome__intro {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--fg-muted);
  margin-top: 16px;
}

.bookmark-hint kbd {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--fg);
  background: var(--fg-whisper);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.proposal-list {
  display: flex;
  flex-direction: column;
}

.proposal-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border: 3px solid var(--panel-border);
  border-bottom: none;
  color: var(--fg);
  text-decoration: none;
  transition: var(--transition);
}

.proposal-list__item:last-child {
  border-bottom: 3px solid var(--panel-border);
}

.proposal-list__item:hover {
  background: var(--panel-border);
  color: var(--bg);
}

.proposal-list__title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1px;
}

.proposal-list__number {
  font-family: 'Bangers', cursive;
  font-size: 16px;
  color: var(--fg-ghost);
  letter-spacing: 1px;
  flex-shrink: 0;
  min-width: 28px;
  margin-right: 20px;
}

.proposal-list__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  align-items: flex-start;
}

.proposal-list__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.proposal-list__arrow {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  flex-shrink: 0;
}

.proposal-breadcrumb {
  padding: 32px 0 24px;
}

.proposal-breadcrumb a {
  font-family: 'Bangers', cursive;
  font-size: 16px;
  color: var(--fg-faint);
  letter-spacing: 2px;
  text-decoration: none;
}

.proposal-breadcrumb a:hover {
  color: var(--fg);
}

.proposal-empty {
  padding: 48px 0;
  text-align: center;
}

.proposal-empty p {
  font-family: 'Special Elite', monospace;
  font-size: 16px;
  color: var(--fg-dim);
}

@media (max-width: 768px) {
  .proposal-nav { padding: 16px 24px 0; }
  .proposal-content { padding: 0 24px; }
  .client-welcome { padding: 32px 0 24px; }
  .client-welcome__name { font-size: 32px; }
}

/* ---- PRINT ---- */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .panel {
    border-color: #000;
  }
  .panel__title, .metric__value, .tag, .hero__title {
    color: #000;
  }
  .panel__desc, .panel__note, .panel__link {
    color: #444;
  }
  .panel__label, .metric__label {
    color: #666;
  }
  .tag {
    border-color: #000;
    color: #000;
  }
  .hero__title {
    text-shadow: none;
    font-size: 80px;
  }
  .panel__svg, .hero__svg, .hero__lines {
    display: none;
  }
  .section-divider__line {
    background: repeating-linear-gradient(90deg, #000 0px, #000 8px, transparent 8px, transparent 16px);
  }
  .section-divider__text { color: #000; }
  .hero__divider { background: #000; }
  .hero__subtitle { color: #000; }
  .hero__tagline { color: #555; }
  .footer__line { background: #000; }
  .footer__email { color: #444; }
  .footer__company { color: #666; }
}
