/* ============================================================
   UI Guideline — section layout styles
   ============================================================ */

/* Hero card */
.hero-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-card-label {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-card-rows { display: flex; flex-direction: column; gap: 12px; }
.hcr {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.hcr:last-child { border-bottom: 0; }
.hcr-tag {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.hcr-rule { font-size: 13px; color: var(--ink); }
.hcr-px { font-size: 11px; color: var(--muted); }
.hero-card-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Generic grid utilities for this page */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 880px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* Breakpoints table */
.bp-table {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
}
.bp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.bp-row:last-child { border-bottom: 0; }
.bp-row.head {
  background: var(--paper-2);
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.bp-cell { padding: 18px 22px; border-right: 1px solid var(--line); }
.bp-cell:last-child { border-right: 0; }
.bp-cell .label { font-size: 13px; opacity: 0.6; margin-bottom: 4px; font-family: "Roboto Mono", monospace; }
.bp-cell .value { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.bp-cell .value.mono { font-family: "Roboto Mono", monospace; font-size: 16px; font-weight: 500; }
@media (max-width: 720px) {
  .bp-row { grid-template-columns: 1fr 1fr; }
  .bp-cell { border-right: none; border-bottom: 1px solid var(--line); }
}

/* Code blocks */
.code-block {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 24px 28px;
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.code-block .kw { color: #7d8aff; }
.code-block .num { color: #ffd166; }
.code-block .str { color: #6ed4a8; }
.code-block .com { color: rgba(250,250,247,0.4); }
.code-block .sel { color: #ffb073; }
.code-block .prop { color: rgba(250,250,247,0.85); }

/* Type scale demo */
.type-scale {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.type-scale .row {
  display: grid;
  grid-template-columns: 100px 1fr 120px 110px;
  gap: 16px;
  align-items: baseline;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.type-scale .row:last-child { border-bottom: 0; }
.type-scale .row .name { font-family: "Roboto Mono", monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.type-scale .row .rem { font-family: "Roboto Mono", monospace; font-size: 12px; color: var(--blue); }
.type-scale .row .px { font-family: "Roboto Mono", monospace; font-size: 11px; color: var(--muted); text-align: right; }
@media (max-width: 720px) {
  .type-scale .row { grid-template-columns: 1fr; gap: 4px; padding: 16px 18px; }
}

/* Color tokens (UI roles) */
.swatch {
  border-radius: 14px;
  padding: 22px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}
.swatch.outline { border-color: var(--line); }
.swatch .top { display: flex; justify-content: space-between; align-items: flex-start; }
.swatch .name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.swatch .role { font-family: "Roboto Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; margin-bottom: 4px; }
.swatch .codes { font-family: "Roboto Mono", monospace; font-size: 11px; opacity: 0.85; line-height: 1.6; }
.swatch .codes b { font-weight: 500; opacity: 0.65; margin-right: 6px; }

/* Token tiles */
.token-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .token-grid { grid-template-columns: repeat(2, 1fr); } }
.token {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.token .preview {
  height: 60px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border-radius: 8px;
}
.token .name {
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.token .value {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Spacing block previews */
.space-bar {
  height: 24px;
  background: var(--blue);
  border-radius: 4px;
}

/* Radius previews */
.radius-box {
  width: 60px;
  height: 60px;
  background: var(--ink);
}

/* Shadow previews — light background to read shadow */
.shadow-card {
  height: 60px;
  width: 80%;
  background: var(--paper);
  border-radius: 8px;
}

/* Component showcase frames */
.showcase {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  padding: 40px;
  position: relative;
}
.showcase.dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.showcase .label {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.showcase.dark .label { color: rgba(250,250,247,0.5); }

/* Group rows of components */
.cmp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.cmp-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Spec callout */
.spec {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--paper-2);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
}
.spec b { color: var(--blue); font-weight: 500; }

/* Viewport showcase */
.vp-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ============================================================
   Glass section
   ============================================================ */

.glass-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}
/* Stage backgrounds — colourful surfaces so backdrop-blur has
   something to work with. All hex values are brand-respecting:
   navy / electric / cream / warm. */
.glass-stage--cobalt {
  background:
    radial-gradient(at 18% 22%, rgba(91,108,255,0.85) 0%, transparent 55%),
    radial-gradient(at 80% 82%, rgba(54,69,211,0.7) 0%, transparent 50%),
    radial-gradient(at 60% 30%, rgba(120,140,255,0.5) 0%, transparent 45%),
    linear-gradient(135deg, #0a1657, #000945);
}
.glass-stage--ocean {
  background:
    radial-gradient(at 30% 70%, rgba(91,108,255,0.55) 0%, transparent 55%),
    linear-gradient(180deg, #1a3a8a 0%, #5b6cff 70%, #c7d4ff 100%);
}
.glass-stage--cream {
  background:
    radial-gradient(at 70% 30%, #ffd4a3 0%, transparent 55%),
    radial-gradient(at 25% 75%, #ffb47e 0%, transparent 50%),
    linear-gradient(180deg, #fff1dd, #f1d9b0);
}
.glass-stage--warm {
  background:
    radial-gradient(at 30% 30%, #ff8b6a 0%, transparent 50%),
    radial-gradient(at 70% 70%, #ffd166 0%, transparent 50%),
    linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
}
.glass-stage--ink {
  background:
    radial-gradient(at 50% 50%, rgba(91,108,255,0.25) 0%, transparent 60%),
    #000945;
}
.glass-stage--paper {
  background: #fafaf7;
  border: 1px solid var(--line);
}
.glass-stage--photo {
  background:
    radial-gradient(at 20% 20%, #1d7a51 0%, transparent 45%),
    radial-gradient(at 80% 35%, #3d8c66 0%, transparent 40%),
    radial-gradient(at 55% 85%, #4a7bc8 0%, transparent 45%),
    linear-gradient(180deg, #143a2f 0%, #1f5c4a 60%, #2d6a52 100%);
}
.glass-stage--mesh {
  background:
    radial-gradient(at 15% 15%, #ff6b9d 0%, transparent 45%),
    radial-gradient(at 85% 25%, #5b6cff 0%, transparent 45%),
    radial-gradient(at 50% 80%, #00d4a8 0%, transparent 45%),
    linear-gradient(135deg, #2a1a5e, #5e2a8a);
}

/* Glass demo card */
.glass-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.glass-demo .stage {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  isolation: isolate;
}
.glass-demo.tall .stage {
  aspect-ratio: 1 / 1;
}
.glass-demo .meta { padding: 0 4px; }
.glass-demo .meta .eyebrow {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}
.glass-demo .meta h4 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.glass-demo .meta p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.7;
}

/* Fake content layers used inside stages */
.stage-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  color: rgba(250,250,247,0.96);
}
.stage-content.dark-text { color: rgba(0, 9, 69, 0.95); }
.stage-content .sc-eyebrow {
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.stage-content h3 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 12px 0 0;
}

/* Dashboard skeleton — used behind the modal demo */
.fake-dash {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fake-dash .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
}
.fake-dash .row .tile {
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.4);
}
.fake-dash .row .tile .bar {
  background: rgba(0,9,69,0.15);
  border-radius: 4px;
}
.fake-dash .row .tile .b1 { height: 8px; width: 60%; }
.fake-dash .row .tile .b2 { height: 24px; width: 80%; }
.fake-dash .row .tile .b3 { height: 6px; width: 40%; opacity: 0.6; }

/* Floating element absolute placement helpers */
.stage-nav-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
}
.stage-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  max-width: 360px;
}
.stage-toast {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 70%;
  max-width: 320px;
}
.stage-dropdown {
  position: absolute;
  top: 64px;
  right: 18px;
  width: 56%;
  max-width: 240px;
}
.stage-player {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}
.stage-tile {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Modal backdrop dim */
.stage-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 9, 69, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Rule rows */
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 880px) { .rule-row { grid-template-columns: 1fr; } }
.rule {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--paper);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rule .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  align-self: flex-start;
}
.rule.do .badge { color: #0a8a4f; }
.rule.dont .badge { color: #c43a3a; }
.rule .stage-mini {
  height: 200px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.rule h5 { margin: 0; font-size: 16px; letter-spacing: -0.01em; font-weight: 700; }
.rule p { margin: 0; font-size: 13.5px; line-height: 1.5; opacity: 0.78; }
.vp-frame {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  overflow: hidden;
  position: relative;
}
.vp-frame .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.vp-frame .head .dots { display: flex; gap: 5px; }
.vp-frame .head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey); }
.vp-frame .head .w { color: var(--ink); }
.vp-stage {
  background: var(--paper-2);
  padding: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.vp-canvas {
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
