/* Ages of Bridges - shared styles. No external resources. */

:root {
  --parchment: #f4e8cc;
  --parchment-2: #ead9b0;
  --paper: #fbf3de;
  --ink: #2b1d12;
  --ink-soft: #5a4632;
  --wood: #5b3a21;
  --wood-dark: #3a2314;
  --wood-light: #8a5a33;
  --rope: #c9a25f;
  --tension: #2a62c4;
  --tension-bg: #dbe7fb;
  --compress: #b8362a;
  --compress-bg: #f8dcd6;
  --grass: #4c8a34;
  --link: #1d4f9c;
  --focus: #d9480f;
  --shadow: rgba(43, 29, 18, .35);
  --display: "Rockwell", "Roboto Slab", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --parchment: #241810;
    --parchment-2: #30211a;
    --paper: #2d2017;
    --ink: #f1e3c3;
    --ink-soft: #cdb998;
    --wood: #4a2e1a;
    --wood-dark: #1c110a;
    --wood-light: #7a4e2b;
    --rope: #c9a25f;
    --tension: #7fb0ff;
    --tension-bg: #1b2c4a;
    --compress: #ff8f7e;
    --compress-bg: #4a211c;
    --link: #8dbbff;
    --focus: #ffb347;
    --shadow: rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--parchment);
  /* faint parchment grain made of two tiny gradients, no image needed */
  background-image:
    radial-gradient(rgba(120, 80, 30, .07) 1px, transparent 1.5px),
    radial-gradient(rgba(120, 80, 30, .05) 1px, transparent 1.5px);
  background-size: 14px 14px, 23px 23px;
  background-position: 0 0, 7px 9px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
.px { image-rendering: crisp-edges; image-rendering: pixelated; }

a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; border: 3px solid var(--ink);
  font-family: var(--display); font-weight: 700;
}
.skip:focus { top: .75rem; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 800; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--ink-soft); max-width: 40em; }
.eyebrow {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .6rem;
}

/* ---------- header: a plank bar ---------- */
.site-header {
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(0,0,0,.28) 118px 120px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 3px, rgba(0,0,0,.08) 3px 6px),
    var(--wood);
  border-bottom: 6px solid var(--wood-dark);
  box-shadow: 0 4px 0 var(--rope), 0 8px 14px -4px var(--shadow);
  position: relative; z-index: 5;
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fbeccb; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.35rem; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.brand img { width: 44px; height: 44px; border: 3px solid var(--wood-dark); border-radius: 6px; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: .25rem .4rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  display: block; padding: .35rem .8rem; color: #fbeccb; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; border-radius: 4px;
}
.site-header nav a:hover { background: rgba(0,0,0,.25); }
.site-header nav a[aria-current="page"] { border-color: var(--rope); background: rgba(0,0,0,.25); }
.site-header :focus-visible { outline-color: #ffd27a; }

/* ---------- buttons / badges ---------- */
.badge-soon {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: .1rem;
  padding: .7rem 1.4rem .7rem 1.1rem; background: var(--wood-dark); color: #fbeccb;
  border: 3px solid var(--rope); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--shadow); font-family: var(--display); line-height: 1.2;
}
.badge-soon small { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #e3c78f; }
.badge-soon strong { font-size: 1.25rem; font-weight: 800; }
.btn {
  display: inline-block; padding: .6rem 1.2rem; font-family: var(--display); font-weight: 800; text-decoration: none;
  color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #2b1d12;
  background: #9fd3f5 url("assets/bg_era1.png") center bottom / cover no-repeat;
  image-rendering: pixelated;
  border-bottom: 6px solid var(--wood-dark);
}
.hero::before { /* soften the sky so text stays readable */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,248,226,.55) 0%, rgba(255,248,226,.25) 55%, rgba(76,138,52,.25) 100%);
}
.hero .wrap { position: relative; display: grid; gap: 2rem; padding-block: clamp(2rem, 6vw, 4.5rem) 0; align-items: center; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 1.35fr 1fr; } }
.hero h1 { color: #2b1d12; text-shadow: 0 3px 0 rgba(255,255,255,.55); margin-bottom: .2em; }
.hero h1 span { display: block; }
.hero h1 .tint { color: #8f2a1e; }
.hero .lede { color: #3a2a1b; }
.hero-text { background: rgba(251,243,222,.84); border: 4px solid var(--wood-dark); border-radius: 4px; padding: 1.4rem 1.6rem 1.6rem; box-shadow: 6px 6px 0 rgba(43,29,18,.35); }
.hero-text .eyebrow, .hero-text .lede, .hero-text .hero-meta p { color: #3a2a1b; }
.tagline { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 1rem; }
.tagline em { font-style: normal; color: #1d4f9c; }
.hero-icon { justify-self: center; position: relative; }
.hero-icon img {
  display: block; width: min(60vw, 280px); aspect-ratio: 1; border: 6px solid var(--wood-dark); border-radius: 22px;
  box-shadow: 8px 8px 0 rgba(43,29,18,.4); transform: rotate(3deg);
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.5rem; }
.hero-meta p { margin: 0; font-size: 1rem; color: #3a2a1b; max-width: 17rem; line-height: 1.4; }

/* characters walking across a plank bridge at the foot of the hero */
.crossing { position: relative; height: 158px; margin-top: 1.5rem; }
.crossing .plank {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background:
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(0,0,0,.35) 62px 64px),
    linear-gradient(#a8703d, #7a4a24);
  border-top: 4px solid #c99259; border-bottom: 4px solid var(--wood-dark);
}
.crossing .rope-line { position: absolute; left: 0; right: 0; bottom: 30px; height: 0; border-top: 4px dotted var(--rope); opacity: .0; }
.crossing .cast { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; gap: clamp(1rem, 4vw, 3rem); align-items: flex-end; padding-inline: 1rem; justify-content: center; }
.crossing .cast img { height: 138px; width: auto; filter: drop-shadow(3px 3px 0 rgba(43,29,18,.35)); }
.crossing .cast .frog { height: 52px; margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .crossing .cast img { animation: bob 1.1s steps(2, jump-none) infinite; }
  .crossing .cast img:nth-child(2n) { animation-delay: -.3s; }
  .crossing .cast img:nth-child(3n) { animation-delay: -.7s; }
}
@keyframes bob { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } }
@media (max-width: 40rem) { .crossing .cast img:nth-child(n+5) { display: none; } .crossing .cast { gap: .8rem; } }

/* ---------- sections ---------- */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section + section { border-top: 4px double var(--rope); }
.section-head { max-width: 44rem; margin-bottom: 2rem; }

/* chunky panel */
.panel { background: var(--paper); border: 4px solid var(--ink); border-radius: 4px; padding: 1.25rem 1.4rem; box-shadow: 6px 6px 0 var(--shadow); }

.steps { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; top: -.9rem; left: 1rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  background: var(--wood); color: #fbeccb; font-family: var(--display); font-weight: 900; font-size: 1.3rem; border: 3px solid var(--ink); border-radius: 50%;
}
.steps li { background: var(--paper); border: 4px solid var(--ink); padding: 2.2rem 1.2rem 1.1rem; box-shadow: 6px 6px 0 var(--shadow); border-radius: 4px; }
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; font-size: 1rem; }

/* tension vs compression */
.tc { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tc .panel h3 { display: flex; align-items: center; gap: .6rem; }
.beam { display: block; height: 18px; border: 3px solid var(--ink); border-radius: 3px; margin-bottom: 1rem; }
.beam.t { background: repeating-linear-gradient(45deg, var(--tension) 0 8px, #6a9bea 8px 16px); box-shadow: 0 0 14px 2px var(--tension); }
.beam.c { background: repeating-linear-gradient(90deg, var(--compress) 0 10px, #e6705e 10px 12px, var(--compress) 12px 20px); box-shadow: 0 0 14px 2px var(--compress); }
.tc .t-panel { background: var(--tension-bg); }
.tc .c-panel { background: var(--compress-bg); }
.note { font-size: .98rem; color: var(--ink-soft); }

/* characters */
.cast-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); list-style: none; padding: 0; margin: 0; }
.cast-grid li { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: end; background: var(--paper); border: 4px solid var(--ink); border-radius: 4px; padding: 1rem; box-shadow: 6px 6px 0 var(--shadow); }
.cast-grid .sprite { display: flex; justify-content: center; align-items: flex-end; min-height: 142px; background: linear-gradient(transparent 70%, rgba(76,138,52,.35) 70%); border-radius: 3px; }
.cast-grid .sprite img { height: 138px; width: auto; max-width: 88px; object-fit: contain; object-position: bottom; }
.cast-grid .sprite img.small { height: 104px; }
.cast-grid h3 { font-size: 1.1rem; margin-bottom: .25em; }
.cast-grid p { margin: 0; font-size: .95rem; line-height: 1.45; }
.cast-grid q { font-style: italic; color: var(--ink-soft); }

/* era journey */
.eras { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.era { background: var(--paper); border: 4px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.era figure { margin: 0; position: relative; border-bottom: 4px solid var(--ink); }
.era img { display: block; width: 100%; aspect-ratio: 400 / 224; }
.era .body { padding: .8rem 1rem 1rem; }
.era h3 { font-size: 1.1rem; margin: 0; }
.era .yrs { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); margin: .1rem 0 .4rem; }
.era .blurb { font-size: .95rem; line-height: 1.45; margin: 0 0 .6rem; }
.tag { display: inline-block; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .55rem; border: 2px solid var(--ink); background: var(--grass); color: #fff; border-radius: 3px; }
.tag.part { background: #b07a1a; }
.tag.soon { background: transparent; color: var(--ink); border-style: dashed; }
.era.locked img { filter: grayscale(.85) brightness(.9) contrast(.95); }
.era.locked figure::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(43,29,18,.14) 0 6px, transparent 6px 12px); }
@media (prefers-color-scheme: dark) { .tag { color: #12210b; background: #8fd070; } .tag.part { background: #e0b04e; color: #2b1d12; } }

/* report card + features */
.two { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.card-report { font-family: var(--mono); font-size: .95rem; line-height: 1.5; background: #fffaf0; color: #2b1d12; transform: rotate(-1.2deg); }
@media (prefers-color-scheme: dark) { .card-report { background: #f4e8cc; } }
.card-report h3 { color: #2b1d12; border-bottom: 2px dashed #5a4632; padding-bottom: .4rem; }
.card-report ul { list-style: none; padding: 0; margin: 0 0 .8rem; }
.card-report li { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; border-bottom: 1px dotted #b79e72; }
.card-report .stamp { font-family: var(--display); font-weight: 900; color: #8f2a1e; border: 3px solid #8f2a1e; display: inline-block; padding: .1rem .7rem; transform: rotate(-4deg); margin: .3rem 0 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.ticks li { padding-left: 2rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1rem; height: 1rem; background: var(--wood); border: 3px solid var(--ink); transform: rotate(45deg); }
.ticks strong { font-family: var(--display); }

/* screenshots placeholder */
.shots { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.shot {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 1rem;
  border: 4px dashed var(--ink-soft); border-radius: 10px; color: var(--ink-soft);
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(120,80,30,.08) 14px 28px);
}
.shot span { font-family: var(--display); font-weight: 800; font-size: 1.1rem; display: block; }
.shot small { font-family: var(--mono); font-size: .78rem; }

/* credits */
.credits { text-align: center; }
.credits dl { display: inline-grid; grid-template-columns: auto auto; gap: .4rem 1.2rem; margin: 1rem auto 0; text-align: left; font-size: 1.15rem; }
.credits dt { font-family: var(--mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); align-self: center; }
.credits dd { margin: 0; font-family: var(--display); font-weight: 800; }

/* ---------- document pages ---------- */
.doc { padding-block: clamp(2rem, 5vw, 3.5rem); }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); }
.doc h2 { font-size: 1.55rem; margin-top: 2.2rem; padding-top: 1.2rem; border-top: 3px dotted var(--rope); }
.doc h3 { font-size: 1.15rem; margin-top: 1.4rem; }
.doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: .35rem; }
.doc .meta { font-family: var(--mono); font-size: .88rem; color: var(--ink-soft); }
.draft-note { background: #fff1b8; color: #3b2a00; border: 3px solid #b07a1a; padding: .7rem 1rem; font-size: 1rem; border-radius: 4px; }
.placeholder { background: #fff1b8; color: #3b2a00; padding: 0 .35rem; border: 1px dashed #b07a1a; border-radius: 3px; font-family: var(--mono); font-size: .92em; }
.faq details { background: var(--paper); border: 3px solid var(--ink); border-radius: 4px; padding: .2rem 1rem; margin-bottom: .8rem; box-shadow: 4px 4px 0 var(--shadow); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 800; padding: .7rem 0; font-size: 1.1rem; }
.faq details[open] summary { border-bottom: 2px dotted var(--rope); margin-bottom: .6rem; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 0; color: #fbeccb; border-top: 6px solid var(--wood-dark);
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(0,0,0,.28) 118px 120px),
    var(--wood);
  box-shadow: inset 0 4px 0 var(--rope);
  padding: 2rem 0 2.2rem; font-size: 1rem;
}
.site-footer .wrap { display: grid; gap: 1.2rem 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-footer a { color: #ffe3a6; }
.site-footer :focus-visible { outline-color: #ffd27a; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer p { margin: 0 0 .3rem; }
.site-footer .small { grid-column: 1 / -1; font-size: .88rem; color: #e3c78f; border-top: 2px dotted rgba(255,255,255,.25); padding-top: 1rem; }
.site-footer .fl { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #e3c78f; margin-bottom: .4rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Support form */
.contact { display: grid; gap: 1rem; margin-block: 1rem 1.25rem; }
.contact .field { display: grid; gap: .3rem; min-width: 0; }
.contact .field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.contact label { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.contact .hint { font-family: var(--body); font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.contact input, .contact select, .contact textarea {
  font: inherit; color: var(--ink); background: var(--parchment); width: 100%; box-sizing: border-box;
  border: 3px solid var(--ink); border-radius: 4px; padding: .55rem .7rem; min-height: 2.9rem;
}
.contact textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.contact ::placeholder { color: var(--ink-soft); opacity: .8; }
.contact input:focus-visible, .contact select:focus-visible, .contact textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.contact .btn { justify-self: start; cursor: pointer; font: inherit; font-family: var(--display); font-weight: 700; }
.contact .note { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
