/* ==========================================================================
   interior.css — shared styles for interior pages (recipes, carpentry, etc.)
   Provides: page hero, section jump links, expandable glass cards.
   ========================================================================== */

/* ── Page hero ─────────────────────────────────────────────────────────── */
.page-hero {
  margin-bottom: 40px;
}
.page-hero h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 8px 0 16px;
  background: linear-gradient(180deg, #ffffff 0%, #a8b0c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero .lede {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* ── Section jump links ────────────────────────────────────────────────── */
.page-jump {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.page-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-soft);
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.10);
  transition: all 0.2s;
}
.page-jump-link:hover {
  color: var(--text-strong);
  border-color: rgba(255,255,255,0.20);
  box-shadow: 0 0 24px rgba(99,102,241,0.15);
}

/* ── Expandable glass cards ────────────────────────────────────────────── */
.expand-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #1c1e28 0%, #0e0f18 55%, #07080f 100%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 12px 40px rgba(0,0,0,0.5);
  margin-bottom: 12px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

/* Top gloss sheen */
.expand-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 40% at 50% -5%,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.04) 35%,
    transparent 65%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* Open state — brighter border + glow */
.expand-card.open {
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 2px 0 rgba(255,255,255,0.08) inset,
    0 20px 60px rgba(0,0,0,0.6),
    0 0 48px rgba(99,102,241,0.12);
}

/* ── Card header (clickable title row) ─────────────────────────────────── */
.expand-card-header {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.expand-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.expand-card-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), color 0.2s;
}
.expand-card.open .expand-card-chevron {
  transform: rotate(180deg);
  color: var(--text-soft);
}
.expand-card-header:hover .expand-card-title   { color: var(--text-strong); }
.expand-card-header:hover .expand-card-chevron { color: var(--text-soft); }

/* ── Card body (collapsible content) ───────────────────────────────────── */
.expand-card-body {
  display: none;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 24px;
  background: rgba(0,0,0,0.15);
}

/* ── Card content grid ─────────────────────────────────────────────────── */
.card-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.card-section--full {
  grid-column: 1 / -1;
}
.card-section h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 12px;
}
.card-section ul,
.card-section ol {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}
.card-section ol     { padding-left: 20px; }
.card-section li     { margin-bottom: 4px; }
.card-section strong { color: var(--text-strong); font-weight: 500; }

/* Callout note block inside a card */
.card-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.18);
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Base image handling inside cards ──────────────────────────────────── */
/* Bare images dropped inside card-section scale responsively by default */
.card-section img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Side-by-side layout when multiple glassmorphism frames appear together */
.glass-gallery {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 17px 0px;
}

/* ── Glassmorphism image frame ──────────────────────────────────────────── */
/*
 * Optional wrapper that makes an image look like it's floating inside a
 * holographic glass display. Structure:
 *
 *   <figure class="glassmorphism">
 *     <div class="glass-inner">
 *       <img src="..." alt="...">
 *       <figcaption class="glass-caption">Title • Detail</figcaption>
 *     </div>
 *   </figure>
 */
.glassmorphism {
  position: relative;
  display: block;
  border-radius: 22px;
  padding: 3px; /* visible border thickness */
  /* Iridescent prismatic gradient border */
  background: linear-gradient(
    135deg,
    rgba(140, 230, 255, 0.95) 0%,
    rgba(200, 130, 255, 0.90) 28%,
    rgba(255, 155, 210, 0.80) 52%,
    rgba(100, 215, 255, 0.95) 74%,
    rgba(175, 115, 255, 0.90) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 28px rgba(120, 200, 255, 0.45),
    0 0 55px rgba(160, 100, 255, 0.28),
    0 0 90px rgba(100, 180, 255, 0.14),
    0 28px 72px rgba(0, 0, 0, 0.65);
  max-width: 340px;
  margin: 0 auto;
  flex-shrink: 0;
}

/* Dark frosted interior — clips the image and houses the caption */
.glass-inner {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(4, 6, 14, 0.92);
  display: flex;
  flex-direction: column;
}

/* Image fills the frame, no gap */
.glassmorphism img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0; /* inner corners handled by glass-inner overflow:hidden */
}

/* Caption bar sits at the bottom of the glass frame */
.glass-caption {
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.015em;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin: 0;
  text-align: center;
}

/* ── Glassmorphism lightbox modal ──────────────────────────────────────── */
.glass-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.glass-modal-backdrop.visible {
  opacity: 1;
}

/* Same iridescent border treatment as the thumbnail frame */
.glass-modal-frame {
  position: relative;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(
    135deg,
    rgba(140, 230, 255, 0.95) 0%,
    rgba(200, 130, 255, 0.90) 28%,
    rgba(255, 155, 210, 0.80) 52%,
    rgba(100, 215, 255, 0.95) 74%,
    rgba(175, 115, 255, 0.90) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 40px rgba(120, 200, 255, 0.50),
    0 0 80px rgba(160, 100, 255, 0.30),
    0 40px 100px rgba(0, 0, 0, 0.70);
  cursor: default;
  max-width: min(92vw, 960px);
}

.glass-modal-inner {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(4, 6, 14, 0.95);
  display: flex;
  flex-direction: column;
}

/* Image fits the screen — max-height leaves room for the caption bar */
.glass-modal-img {
  display: block;
  max-width: 100%;
  max-height: calc(85vh - 52px);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Close button — floats above the top-right corner of the frame */
.glass-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 22, 32, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.80);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  padding: 0;
}
.glass-modal-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}

/* ── Prose links ────────────────────────────────────────────────────────── */
/* Scoped to the main content area so nav/footer link styles are unaffected. */
#content a:not(.page-jump-link) {
  color: rgba(139, 148, 255, 0.90);
  text-decoration: underline;
  text-decoration-color: rgba(139, 148, 255, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

#content a:not(.page-jump-link):visited {
  color: rgba(167, 139, 250, 0.85);
  text-decoration-color: rgba(167, 139, 250, 0.30);
}

#content a:not(.page-jump-link):hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.50);
}

/* ── Empty section state ────────────────────────────────────────────────── */
/* Used when a section has no current items (e.g. nothing on the bench).    */
.section-empty {
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* ── Article flow layout ────────────────────────────────────────────────── */
/*
 * Used in place of .card-sections grid when card content is long-form prose
 * (e.g. a step-by-step build article). Children stack vertically; images sit
 * inline after their associated step text inside .glass-gallery wrappers.
 */
.article-flow {
  display: flex;
  flex-direction: column;
}

.article-flow p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 14px;
}

.article-flow p:last-child {
  margin-bottom: 0;
}

/* H3-level section dividers within an article (e.g. "Here It Is", "Voilà!") */
.article-section-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.article-flow .article-section-heading:first-child {
  margin-top: 0;
}

/* Wrapper for a single numbered step — groups label + prose + optional image */
.article-step {
  margin-bottom: 24px;
}

.article-step:last-child {
  margin-bottom: 0;
}

/* "Step N" eyebrow label above the step prose */
.article-step-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  margin: 0 0 6px !important;
}


/* ── Callout blocks ──────────────────────────────────────────────────────── */

/* Amber warning block — for safety / important notices */
.card-warning {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.30);
  font-size: 13px;
  font-weight: 500;
  color: rgba(251, 191, 36, 0.88);
  line-height: 1.55;
}

.card-warning strong {
  color: rgb(251, 191, 36);
  font-weight: 700;
}

/* Green tip block — for helpful hints */
.card-tip {
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-tip strong {
  color: rgb(52, 211, 153);
  font-weight: 700;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .card-sections        { grid-template-columns: 1fr; }
  .card-section--full   { grid-column: 1; }
  .page-hero h1         { font-size: 32px; }
  .expand-card-header   { padding: 16px 18px; }
  .expand-card-body     { padding: 18px; }
}
