/* Foldy Birdy pages. Builds on ../style.css (fonts, footer, legal text).
   Dark by default like the rest of the site; a paper look in light mode. */

:root {
  --fb-bg: #07070a;
  --fb-surface: #13131b;
  --fb-surface-2: #1a1a24;
  --fb-border: rgba(255, 255, 255, 0.09);
  --fb-text: #e8e6f0;
  --fb-text-2: #a6a2b8;
  --fb-text-3: #8a86a0;
  --fb-accent: #f2915f;
  --fb-accent-ink: #1a0d06;
  --fb-crease: rgba(255, 255, 255, 0.035);
  --fb-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  /* Shared tokens used by style.css (footer, legal pages) */
  --color-bg: var(--fb-bg);
  --color-text: var(--fb-text);
  --color-text-secondary: var(--fb-text-2);
  --color-text-dim: var(--fb-text-3);
  --color-border: var(--fb-border);
  --color-accent: var(--fb-accent);
  --color-accent-hover: var(--fb-accent);
}

@media (prefers-color-scheme: light) {
  :root {
    --fb-bg: #f6f1e7;
    --fb-surface: #fffdf8;
    --fb-surface-2: #efe7d8;
    --fb-border: rgba(70, 50, 20, 0.14);
    --fb-text: #1f1b16;
    --fb-text-2: #4f4a42;
    --fb-text-3: #6b655b;
    --fb-accent: #a63d17;
    --fb-accent-ink: #ffffff;
    --fb-crease: rgba(70, 50, 20, 0.05);
    --fb-shadow: 0 8px 24px rgba(70, 50, 20, 0.14);
  }
}

html { color-scheme: dark light; }

body {
  background: var(--fb-bg);
  color: var(--fb-text);
}

::selection { background: var(--fb-accent); color: var(--fb-accent-ink); }

a { color: var(--fb-accent); }
a:hover { color: var(--fb-accent); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--fb-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.fb-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.fb-narrow { max-width: 760px; }

/* Top bar */
.fb-topbar {
  border-bottom: 1px solid var(--fb-border);
  padding: 18px 0;
}

.fb-topbar .fb-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.fb-back {
  color: var(--fb-text-2);
  font-size: 0.9rem;
}

.fb-topnav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.fb-topnav a { color: var(--fb-text-2); }
.fb-topnav a:hover { color: var(--fb-text); }

/* Hero: a sheet of paper with one diagonal crease */
.fb-hero {
  padding: 64px 0 56px;
}

.fb-sheet {
  position: relative;
  background:
    linear-gradient(135deg, transparent 49.8%, var(--fb-crease) 50%, transparent 50.2%),
    linear-gradient(135deg, var(--fb-surface) 0%, var(--fb-surface) 50%, var(--fb-surface-2) 50%, var(--fb-surface-2) 100%);
  border: 1px solid var(--fb-border);
  border-radius: 20px;
  box-shadow: var(--fb-shadow);
  padding: 44px 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

.fb-icon {
  width: 136px;
  height: 136px;
  border-radius: 30px;
  box-shadow: var(--fb-shadow);
}

.fb-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.fb-summary {
  font-size: 1.15rem;
  color: var(--fb-text-2);
  margin-top: 10px;
  max-width: 560px;
}

.fb-release {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fb-accent);
  color: var(--fb-accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Sections */
.fb-section {
  padding: 56px 0;
  border-top: 1px solid var(--fb-border);
}

.fb-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Small folded-corner mark before each section heading */
.fb-section h2::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--fb-accent) 0 50%, transparent 50%);
  border-radius: 3px;
  opacity: 0.9;
}

.fb-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.fb-section p,
.fb-section li {
  color: var(--fb-text-2);
  font-size: 1rem;
  max-width: 720px;
}

.fb-section p + p { margin-top: 12px; }

.fb-lead {
  max-width: 720px;
  margin-bottom: 28px;
}

.fb-list {
  margin: 12px 0 0 20px;
  max-width: 760px;
}

.fb-list li { margin-bottom: 8px; }
.fb-list strong { color: var(--fb-text); }

/* Play modes */
.fb-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.fb-group h3 {
  color: var(--fb-text);
  margin-bottom: 14px;
}

.fb-card {
  position: relative;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  overflow: hidden;
}

/* Folded top-right corner */
.fb-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(225deg, var(--fb-bg) 0 50%, var(--fb-surface-2) 50%);
  border-bottom-left-radius: 6px;
}

.fb-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fb-text);
  margin-bottom: 4px;
}

.fb-card p { font-size: 0.97rem; }

.fb-note {
  font-size: 0.92rem;
  color: var(--fb-text-3);
  margin-top: 8px;
}

/* Video */
.fb-video { margin: 0; max-width: 960px; }

.fb-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--fb-border);
  box-shadow: var(--fb-shadow);
  background: var(--fb-surface);
}

.fb-video figcaption {
  font-size: 0.85rem;
  color: var(--fb-text-3);
  margin-top: 8px;
}

/* Screenshots */
.fb-shots-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.fb-shots-phone {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.fb-shot { margin: 0; }

.fb-shot a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--fb-border);
  box-shadow: var(--fb-shadow);
  background: var(--fb-surface);
}

.fb-shot img {
  width: 100%;
  height: auto;
}

.fb-shot figcaption {
  font-size: 0.85rem;
  color: var(--fb-text-3);
  margin-top: 8px;
}

.fb-shots-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fb-text);
  margin: 4px 0 12px;
}

/* Worlds */
.fb-worlds {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 1000px) {
  .fb-worlds { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
}

.fb-worlds li.fb-world { max-width: none; }

.fb-world {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 16px 14px 14px;
  text-align: center;
}

.fb-world img {
  height: 84px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 10px;
  object-fit: contain;
}

.fb-world-num {
  display: block;
  font-size: 0.8rem;
  color: var(--fb-text-3);
}

.fb-world-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fb-text);
}

.fb-world-char {
  display: block;
  font-size: 0.9rem;
  color: var(--fb-text-2);
}

/* Languages */
.fb-langs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.fb-langs li {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.95rem;
  color: var(--fb-text);
}

/* Support */
.fb-mail {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Footer and legal tweaks for light mode (style.css assumes dark) */
.footer { border-top-color: var(--fb-border); }
.footer-links a:hover { color: var(--fb-text); }
.legal-content a { text-decoration-color: currentColor; }
.legal-content h2 { color: var(--fb-text); }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 10px 0 20px;
  color: var(--fb-text-2);
}
.legal-content th,
.legal-content td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--fb-border);
}
.legal-content th { color: var(--fb-text); font-weight: 600; }
.fb-table-wrap { overflow-x: auto; }

/* Responsive */
@media (max-width: 768px) {
  .fb-wrap { padding: 0 16px; }
  .fb-hero { padding: 32px 0 40px; }
  .fb-sheet {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 20px;
    text-align: center;
  }
  .fb-icon { width: 112px; height: 112px; border-radius: 25px; margin: 0 auto; }
  .fb-summary { margin-left: auto; margin-right: auto; }
  .fb-modes { grid-template-columns: 1fr; gap: 8px; }
  .fb-section { padding: 44px 0; }
  .fb-shots-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fb-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .footer .container { padding: 0 16px; }
  .legal-content .container { padding: 0 16px; }
}
