/* ===================================================================
   Inkling Yokai Press – "Paper on Dark Desk" Theme
   =================================================================== */

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

/* --- Base & Typography ------------------------------------------- */

body {
  min-height: 100vh;
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  font-size: 1rem;
  color: #f5efe2;
  background:
    radial-gradient(circle at 18% 14%, rgba(34, 58, 96, 0.26) 0 12%, transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(96, 24, 28, 0.2) 0 10%, transparent 30%),
    linear-gradient(180deg, #030407 0%, #070b13 48%, #11070a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

/* --- Page Shell -------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* --- Header ------------------------------------------------------ */

header {
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.brand-seal {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  border: 2px solid rgba(225, 200, 155, 0.85);
  box-shadow: 0 0 0 3px rgba(17, 21, 31, 0.7);
  object-fit: cover;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
}

header p {
  margin-top: 0.5rem;
  color: rgba(238, 224, 199, 0.95);
  font-size: 0.94rem;
}

/* --- Card Grid --------------------------------------------------- */

.cards {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: min(100%, 780px);
  margin: 0 auto;
}

/* --- Base Card (cream paper) ------------------------------------- */

.card {
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
  background: #f5efe2;
  color: #2c2416;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.card-body h2 {
  color: #2c2416;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-body h3 {
  color: #4a3c2a;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-body p {
  color: #3d3225;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* --- Card sidebar (decorative) ----------------------------------- */

.card-sidebar {
  flex: 0 0 auto;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  background: #ebe4d4;
  border-right: 1px solid #ddd5c3;
}

.card > .card-sidebar:last-child {
  border-right: 0;
  border-left: 1px solid #ddd5c3;
}

.card-seal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(160, 130, 90, 0.7);
  background: radial-gradient(circle at 35% 30%, #9fb6d2 0, #455c7a 32%, #2f3f56 67%, #18202b 100%);
  box-shadow: 0 0 0 2px rgba(29, 38, 54, 0.3);
  flex-shrink: 0;
}

/* --- Card variants ----------------------------------------------- */

.claim {
  width: 100%;
}

.feature {
  min-height: 220px;
}

.feature .card-body {
  text-align: left;
  align-items: flex-start;
}

.compact .card-body {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

/* --- Card: cover (book cover + text side-by-side) ---------------- */

.card-cover {
  flex-direction: row;
}

.card-cover .img-cover {
  flex: 0 0 auto;
}

.card-cover .card-body {
  justify-content: flex-start;
}

/* --- Card: hero (full-width mood image above text) --------------- */

.card-hero {
  flex-direction: column;
}

.card-hero .img-mood {
  width: 100%;
}

.card-hero .card-body {
  padding: 1.8rem 2.2rem;
}

/* --- Card: gallery (grid of cover thumbnails) -------------------- */

.card-gallery .card-body {
  gap: 1.2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

/* --- Image classes ----------------------------------------------- */

.img-cover {
  display: block;
  width: 180px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #ddd5c3;
}

.img-mood {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  object-fit: cover;
  background: #ddd5c3;
}

/* Gradient fade at bottom of mood images */
.img-mood-wrap {
  position: relative;
  line-height: 0;
}

.img-mood-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, #f5efe2);
  pointer-events: none;
}

.img-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #ddd5c3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.img-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* --- Buttons ----------------------------------------------------- */

.card-btn {
  display: inline-block;
  margin-top: 0.3rem;
  border: 0;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5efe2;
  background: #6b4226;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.card-btn:hover,
.card-btn:focus-visible {
  background: #7d5232;
}

.card-btn:focus-visible {
  outline: 2px solid #6b4226;
  outline-offset: 3px;
}

/* --- Social links ------------------------------------------------ */

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  color: #f8f1e3;
  text-decoration: none;
  background: rgba(188, 194, 190, 0.14);
  border: 1.5px solid rgba(244, 236, 224, 0.72);
  box-shadow: 0 12px 24px rgba(10, 12, 20, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  background: rgba(244, 236, 224, 0.18);
  border-color: rgba(255, 247, 233, 0.92);
}

.social-link:focus-visible {
  outline: 2px solid rgba(255, 247, 233, 0.55);
  outline-offset: 3px;
}

.social-icon {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon-fill {
  fill: currentColor;
  stroke: none;
}

/* --- Section dividers -------------------------------------------- */

.section-heading {
  color: rgba(238, 224, 199, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 1rem;
}

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

@media (max-width: 640px) {
  .page {
    padding: 1.25rem 0.9rem 2rem;
  }

  .cards {
    width: 100%;
  }

  .card-body {
    padding: 1.5rem 1.3rem;
  }

  .card-hero .card-body {
    padding: 1.3rem 1.3rem;
  }

  .card-body p {
    font-size: 1rem;
  }

  .social-links {
    margin-top: 1.8rem;
  }

  .img-cover {
    width: 150px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 520px) {
  .card {
    flex-direction: column;
  }

  .card-sidebar {
    width: 100%;
    min-width: 0;
    padding: 0.8rem;
    border-right: 0;
    border-bottom: 1px solid #ddd5c3;
  }

  .card > .card-sidebar:last-child {
    border-left: 0;
    border-bottom: 0;
    border-top: 1px solid #ddd5c3;
  }

  .img-cover {
    width: 100%;
    aspect-ratio: 3 / 2;
  }

  .img-mood {
    max-height: 240px;
  }
}
