/* ==============================================================
   Manga Grails — gallery aesthetic for graded high-value manga
   ============================================================== */

:root {
  --bg:        #0e0d12;
  --bg-2:      #161520;
  --bg-3:      #1d1c2a;
  --line:      #2a2937;
  --text:      #ece9df;
  --text-dim:  #a8a39a;
  --text-mute: #6c6a7a;
  --gold:      #d4af46;
  --gold-soft: #ecc869;
  --crimson:   #b53d3d;
  --shadow:    0 18px 48px -16px rgba(0, 0, 0, 0.6);
  --serif:     'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(212, 175, 70, 0.08), transparent 60%),
    radial-gradient(ellipse at 90% 5%,  rgba(181, 61, 61, 0.06),  transparent 55%);
  background-attachment: fixed;
}

a { color: inherit; }

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 13, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.logo__mark {
  font-size: 1.6rem;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(212, 175, 70, 0.35));
}
.logo__text { color: var(--text); }
.logo__accent { color: var(--gold); margin-left: 2px; }

.site-nav { display: flex; gap: 22px; align-items: center; }
.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link--cta {
  color: var(--gold);
  border: 1px solid rgba(212, 175, 70, 0.4);
  padding: 8px 16px;
  border-radius: 999px;
}
.nav-link--cta:hover {
  color: var(--bg);
  background: var(--gold);
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 100px 24px 70px;
  max-width: 880px;
  margin: 0 auto;
}
.hero__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 24px;
  font-weight: 600;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero__sub {
  font-size: 1.12rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--gold);
  color: #1b1707;
  border-color: var(--gold);
}
.btn--primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--text-dim); }

/* ── Westblue bar ─────────────────────────────────────────── */

.bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 0.95rem;
  background: linear-gradient(90deg,
    rgba(212, 175, 70, 0.07),
    rgba(212, 175, 70, 0.14),
    rgba(212, 175, 70, 0.07));
  border-top: 1px solid rgba(212, 175, 70, 0.18);
  border-bottom: 1px solid rgba(212, 175, 70, 0.18);
  text-align: center;
  flex-wrap: wrap;
}
.bar__icon { font-size: 1.1rem; }
.bar__text strong { color: var(--gold-soft); }
.bar a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 70, 0.4);
  padding-bottom: 1px;
  margin-left: 4px;
}
.bar a:hover { color: var(--gold-soft); }

/* ── Grid section ─────────────────────────────────────────── */

.grid-section {
  padding: 80px 24px 60px;
  max-width: 1320px;
  margin: 0 auto;
}
.grid-section__head { text-align: center; margin-bottom: 48px; }
.grid-section__head h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0 0 8px;
}
.grid-section__sub {
  color: var(--text-dim);
  margin: 0;
  font-size: 1.02rem;
}

.status {
  margin: 0 auto 24px;
  max-width: 640px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 500;
  text-align: center;
}
.status--ok  { background: #14391f; color: #b5e6c5; border: 1px solid #1f6638; }
.status--err { background: #3b1414; color: #ffb1b1; border: 1px solid #7a2a2a; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (min-width: 720px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }

.grid__loading,
.grid__empty,
.grid__error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-mute);
  font-size: 1rem;
}
.grid__error { color: #ff8a8a; }

/* ── Card ─────────────────────────────────────────────────── */

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 70, 0.4);
  box-shadow: var(--shadow);
}

.card__media {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-3);
  overflow: hidden;
}
.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.card:hover .card__img { transform: scale(1.03); }

.card__flag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 2.4rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.card__body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card__title {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  line-height: 1.25;
  color: var(--text);
}
.card__grade {
  flex-shrink: 0;
  background: var(--gold);
  color: #1b1707;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: center;
}

.card__meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-mute);
  line-height: 1.5;
}

.card__actions {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__offer {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  background: var(--gold);
  color: #1b1707;
  border: 1px solid var(--gold);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: background-color 0.15s ease;
}
.card__offer:hover { background: var(--gold-soft); }
.card__offer:disabled { opacity: 0.6; cursor: wait; }

.card__links {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-mute);
}
.card__links a {
  color: var(--text-mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-mute);
  padding-bottom: 1px;
}
.card__links a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── About ────────────────────────────────────────────────── */

.about {
  padding: 80px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.about__inner {
  max-width: 720px;
  margin: 0 auto;
}
.about__title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 24px;
}
.about p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin: 0 0 18px;
  line-height: 1.7;
}
.about em { color: var(--gold-soft); font-style: normal; }
.about__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding: 22px;
  background: var(--bg-3);
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 70, 0.25);
}
.about__cta strong { color: var(--text); }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  padding: 36px 24px 48px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 0.86rem;
}
.site-footer p { margin: 4px 0; }
.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-footer a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ── Modal ────────────────────────────────────────────────── */

.modal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  color: var(--text);
  width: min(100% - 32px, 460px);
  padding: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.modal::backdrop {
  background: rgba(8, 7, 12, 0.72);
  backdrop-filter: blur(4px);
}

.modal__form { padding: 28px 26px 24px; position: relative; }
.modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}
.modal__close:hover { color: var(--text); }

.modal__title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.modal__sub {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.modal__result {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.modal__result--ok  { background: #14391f; color: #b5e6c5; border: 1px solid #1f6638; }
.modal__result--err { background: #3b1414; color: #ffb1b1; border: 1px solid #7a2a2a; }

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}
.field em {
  color: var(--crimson);
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
}
.field input,
.field textarea {
  font: inherit;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.95rem;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-mute); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 70, 0.18);
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.modal__fineprint {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--text-mute);
  text-align: center;
}

/* ── Toast ────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
  pointer-events: none;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--err  { background: var(--crimson); color: #fff; }

/* ── Mobile tweaks ────────────────────────────────────────── */

@media (max-width: 600px) {
  .site-header { padding: 16px 18px; }
  .logo__text { font-size: 1.3rem; }
  .nav-link { font-size: 0.85rem; }
  .nav-link--cta { padding: 6px 12px; }
  .hero { padding: 60px 20px 50px; }
  .hero__sub { font-size: 1rem; }
  .grid-section { padding: 50px 16px 40px; }
  .about { padding: 60px 20px; }
  .about__cta { flex-direction: column; align-items: flex-start; }
}
