/* Shibui — Passport Booklet Aesthetic
   Premium, visual, story-driven.
*/

:root {
  --bg: #070A12;
  --bg-card: rgba(255,255,255,0.03);
  --bg-elevated: rgba(255,255,255,0.05);
  --text: #EAF0FF;
  --muted: rgba(234,240,255,0.65);
  --brand: #61A8FF;
  --brand2: #9B7BFF;
  --accent: #60F2C2;
  --warning: #FF6B6B;
  --gold: #d4af37;
  --stroke: rgba(255,255,255,0.1);
  --stroke-strong: rgba(255,255,255,0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 960px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 450px at 20% 8%, rgba(97,168,255,0.1), transparent),
    radial-gradient(ellipse 700px 400px at 80% 5%, rgba(155,123,255,0.07), transparent);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  z-index: 9999;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,10,18,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--stroke);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 12px rgba(97,168,255,0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
}

.brand-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover,
.nav a[aria-current="true"] {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
}

/* HERO */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 56px;
  text-align: center;
}

.hero-illustration {
  max-width: 340px;
  margin: 0 auto 32px;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
}

.hero h1 {
  font-size: clamp(26px, 5.5vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.025em;
}

.hero h1 br { display: block; }

.tagline {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: left;
  max-width: 500px;
}

.hero-bullets li {
  padding: 14px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-bullets li:last-child {
  border-bottom: none;
}

.hero-bullets strong {
  color: var(--text);
  font-weight: 600;
}

/* SECTION TITLES */
.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.015em;
}

/* STORY SECTION */
.story-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.story-lead {
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* WORKFLOW INFOGRAPHIC */
.workflow-infographic {
  margin: 0 0 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.workflow-svg.desktop {
  display: block;
  width: 100%;
  min-width: 800px;
  height: auto;
}

.workflow-mobile {
  display: none;
}

/* ACTS VISUAL (passport stamps) */
.acts-visual {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.act-stamp {
  width: 100px;
  height: 100px;
  border: 2px solid var(--stroke-strong);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-card);
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.act-stamp:hover {
  border-color: var(--brand);
  transform: scale(1.05);
}

.act-stamp::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed var(--stroke);
  border-radius: 50%;
}

.stamp-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 1px;
  font-family: Georgia, 'Times New Roman', serif;
}

.stamp-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.stamp-caption {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}

/* STORY EXPAND ACCORDION */
.story-expand {
  margin-top: 0;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.story-expand summary {
  cursor: pointer;
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.story-expand summary:hover {
  background: rgba(97,168,255,0.05);
}

.story-expand summary::-webkit-details-marker { display: none; }

.story-expand summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(97,168,255,0.12);
  font-size: 14px;
  font-weight: 700;
}

.story-expand[open] summary::before {
  content: "−";
}

.story-full {
  padding: 0 24px 28px;
}

/* Story recap mini infographic */
.story-recap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 16px;
  margin-bottom: 20px;
  background: rgba(97,168,255,0.05);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
}

.recap-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.recap-icon {
  font-size: 14px;
}

.recap-arrow {
  color: var(--brand);
  font-weight: 700;
  opacity: 0.6;
}

/* Story diagrams */
.story-diagram {
  margin: 18px 0 24px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}

.story-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

.story-diagram-caption {
  padding: 10px 14px 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.story-one-liner {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(97,168,255,0.45);
  background: rgba(97,168,255,0.06);
  color: rgba(232,240,248,0.72);
}

/* Story schemas */
.story-schemas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.schema-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.2);
}

.schema-name {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schema-title {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.schema-sub {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.schema-visual .schema-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schema-visual .schema-icon {
  font-size: 16px;
  line-height: 1;
  opacity: 0.95;
}

.schema-visual .schema-fields {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schema-visual .field-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(97,168,255,0.10);
  color: rgba(234,240,255,.92);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
}

.schema-visual .schema-foot {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.70);
  line-height: 1.5;
}

.story-full p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.story-full p:last-child {
  margin-bottom: 0;
}

.story-full strong {
  color: var(--text);
}

.story-full code {
  background: rgba(97,168,255,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.story-divider {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: 24px 0;
}

/* HOW SECTION */
.how-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.how-step:hover {
  border-color: var(--stroke-strong);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}

.how-step h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.how-step p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* BUILDERS SECTION */
.builders-section {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.builders-section summary {
  cursor: pointer;
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.builders-section summary:hover {
  background: rgba(96,242,194,0.05);
}

.builders-section summary::-webkit-details-marker { display: none; }

.builders-section summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(96,242,194,0.12);
  font-size: 14px;
  font-weight: 700;
}

.builders-section[open] summary::before {
  content: "−";
}

.builders-content {
  padding: 0 24px 24px;
}

.builders-content ul {
  margin: 0;
  padding: 0 0 0 20px;
}

.builders-content li {
  margin: 12px 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.builders-content strong {
  color: var(--text);
}

.builders-content code {
  background: rgba(96,242,194,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 36px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-weight: 700;
  font-size: 15px;
}

.footer-tagline {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-links .dot {
  color: rgba(255,255,255,0.2);
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .workflow-svg.desktop {
    display: none;
  }

  .workflow-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
  }

  .wf-mobile-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
  }

  .wf-mobile-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(97,168,255,0.1);
    border: 1px solid var(--stroke);
    color: var(--step-color, var(--brand));
  }

  .wf-mobile-icon svg {
    width: 28px;
    height: 28px;
  }

  .wf-mobile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .wf-mobile-text strong {
    font-size: 15px;
    color: var(--text);
  }

  .wf-mobile-text span {
    font-size: 13px;
    color: var(--muted);
  }

  .wf-mobile-arrow {
    margin-left: 22px;
    color: var(--brand);
    font-size: 16px;
    opacity: 0.5;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .acts-visual {
    gap: 12px;
  }

  .act-stamp {
    width: 85px;
    height: 85px;
  }

  .stamp-number {
    font-size: 18px;
  }

  .stamp-title {
    font-size: 10px;
  }

  .stamp-caption {
    font-size: 8px;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }

  .nav a {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero {
    padding: 36px 16px 48px;
  }

  .hero-illustration {
    max-width: 280px;
    margin-bottom: 24px;
  }

  .tagline {
    font-size: 15px;
    margin-bottom: 28px;
  }

  .hero-bullets li {
    font-size: 14px;
    padding: 12px 0;
  }

  .story-section,
  .how-section {
    padding: 36px 16px 48px;
  }

  .section-title {
    font-size: 22px;
  }

  .story-lead {
    font-size: 15px;
    margin-bottom: 32px;
  }

  .acts-visual {
    gap: 10px;
  }

  .act-stamp {
    width: 70px;
    height: 70px;
  }

  .act-stamp::before {
    inset: 3px;
  }

  .stamp-number {
    font-size: 15px;
  }

  .stamp-title {
    font-size: 8px;
  }

  .stamp-caption {
    font-size: 7px;
  }

  .story-expand summary,
  .builders-section summary {
    padding: 14px 16px;
    font-size: 14px;
  }

  .story-full {
    padding: 0 16px 20px;
  }

  .story-recap {
    gap: 6px;
    padding: 14px 12px;
  }

  .recap-step {
    font-size: 11px;
  }

  .recap-arrow {
    font-size: 10px;
  }

  .story-schemas {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .story-full p {
    font-size: 13px;
  }

  .story-full code {
    font-size: 11px;
  }

  .how-step {
    padding: 22px 16px;
  }

  .step-num {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .how-step h4 {
    font-size: 15px;
  }

  .how-step p {
    font-size: 13px;
  }

  .builders-content {
    padding: 0 16px 20px;
  }

  .builders-content li {
    font-size: 13px;
  }

  .footer {
    padding: 28px 16px;
  }
}

@media (max-width: 400px) {
  .acts-visual {
    gap: 8px;
  }

  .act-stamp {
    width: 60px;
    height: 60px;
  }

  .stamp-number {
    font-size: 13px;
  }

  .stamp-title {
    font-size: 7px;
  }

  .stamp-caption {
    display: none;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .act-stamp {
    transition: none;
  }

  .how-step,
  .story-expand summary,
  .builders-section summary,
  .nav a {
    transition: none;
  }
}
