/* TypeTown website. Logo font: BBB Simulator by Daniel Weiand, SIL Open Font License 1.1 (assets/fonts/OFL-LICENSE.txt). */
@font-face { font-family: 'BBB Black'; src: url('assets/fonts/BBB_Simulator_Black.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'BBB Shade'; src: url('assets/fonts/BBB_Simulator_Shade.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'BBB Sunset'; src: url('assets/fonts/BBB_Simulator_Sunset.otf') format('opentype'); font-display: swap; }

:root {
  --sky: #bfe9ff;
  --sky-deep: #8fd3f7;
  --grass: #8fd67f;
  --grass-deep: #5fbf6a;
  --green: #37b36b;
  --ink: #17324d;
  --ink-soft: #44607a;
  --cream: #fffdf6;
  --timber: #8a5a3a;
  --gold: #ffc531;
  --pixel: 'BBB Black', 'Trebuchet MS', sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: #1f6fb5; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* top bar */
.top { background: var(--sky); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--pixel); font-size: 22px; }
.brand img { width: 40px; height: 40px; image-rendering: pixelated; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--ink); font-weight: 800; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* hero: sky over a strip of meadow, like the title screen */
.hero { background: linear-gradient(var(--sky) 0 calc(100% - 150px), var(--grass-deep) calc(100% - 150px) calc(100% - 140px), var(--grass) calc(100% - 140px) 100%); text-align: center; padding: 36px 0 0; }
.logo { position: relative; isolation: isolate; display: inline-block; line-height: 1; font-size: clamp(52px, 12vw, 128px); white-space: nowrap; margin: 0; font-family: 'BBB Black', sans-serif; font-weight: 400; color: var(--grass); }
/* the shadow and stripe layers are drawn by CSS, so the heading's text is just "TypeTown" */
.logo::before, .logo::after { content: attr(data-t); position: absolute; left: 0; top: 0; }
.logo::before { font-family: 'BBB Shade', sans-serif; color: var(--timber); z-index: -1; }
.logo::after { font-family: 'BBB Sunset', sans-serif; color: var(--grass-deep); }
.tagline { font-size: clamp(20px, 3.2vw, 30px); font-weight: 900; margin: 26px 0 6px; }
.lede { max-width: 640px; margin: 0 auto 24px; color: var(--ink-soft); font-weight: 700; }
.cta { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--pixel); font-size: 24px; letter-spacing: .04em; color: var(--cream); background: var(--green); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 34px 14px; text-decoration: none; }
.cta small { font-family: var(--body); font-size: 14px; font-weight: 800; letter-spacing: 0; color: var(--ink); }
.cta.soon { background: var(--gold); color: var(--ink); cursor: default; }
a.cta:hover { background: #41c478; }
a.cta:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.shot { border: 6px solid var(--ink); box-shadow: 10px 10px 0 rgba(23, 50, 77, .3); background: var(--ink); }
.hero .shot { width: min(920px, 100%); margin: 40px auto 0; position: relative; top: 0; }
.hero .wrap { padding-bottom: 48px; }
/* trailer: a picture with a play button until it is pressed, then the YouTube player */
.video { display: block; position: relative; width: min(920px, 100%); margin: 40px auto 0; text-decoration: none; }
.video .shot { width: 100%; margin: 0; }
.video .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px; font-family: var(--pixel); font-size: clamp(18px, 3vw, 28px); letter-spacing: .04em; white-space: nowrap; color: var(--ink); background: var(--gold); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 14px 26px 16px; }
.video .play i { width: 0; height: 0; border-style: solid; border-width: .5em 0 .5em .8em; border-color: transparent transparent transparent var(--ink); }
.video:hover .play { background: #ffd65e; }
.video:focus-visible { outline: 4px solid var(--ink); outline-offset: 6px; }
.video-frame { display: block; width: min(920px, 100%); aspect-ratio: 16 / 9; margin: 40px auto 0; border: 6px solid var(--ink); box-shadow: 10px 10px 0 rgba(23, 50, 77, .3); background: var(--ink); }

/* sections */
section { padding: 64px 0; }
h2 { font-family: var(--pixel); font-weight: 400; font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 0 0 12px; text-align: center; }
.sub { text-align: center; color: var(--ink-soft); font-weight: 700; max-width: 640px; margin: 0 auto 36px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; background: #fff; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--sky-deep); padding: 20px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; font-family: var(--pixel); font-size: 24px; background: var(--gold); border: 4px solid var(--ink); margin-bottom: 12px; }
.steps h3 { margin: 0 0 6px; font-size: 22px; }
.steps p { margin: 0; color: var(--ink-soft); font-weight: 600; }

.band { background: var(--sky); }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; margin-bottom: 56px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .shot { order: 2; }
.feature h3 { font-size: 28px; line-height: 1.2; margin: 0 0 10px; }
.feature p { margin: 0 0 10px; font-weight: 600; color: var(--ink-soft); }

.grown { background: var(--grass); }
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.promises li { background: var(--cream); border: 4px solid var(--ink); padding: 18px; font-weight: 700; }
.promises b { display: block; font-size: 20px; margin-bottom: 4px; }

.faq { max-width: 760px; margin: 24px auto 0; }
.faq details { background: #fff; border: 4px solid var(--ink); margin-bottom: 12px; padding: 14px 18px; }
.faq summary { font-weight: 900; font-size: 20px; cursor: pointer; }
.faq p { margin: 10px 0 2px; color: var(--ink-soft); font-weight: 600; }

/* plain pages (privacy, support) */
.page { max-width: 760px; padding: 48px 0 72px; }
.page h1 { font-family: var(--pixel); font-weight: 400; font-size: clamp(32px, 6vw, 48px); line-height: 1.1; margin: 0 0 8px; }
.page h2 { text-align: left; font-family: var(--body); font-weight: 900; font-size: 24px; margin: 32px 0 8px; }
.page .date { color: var(--ink-soft); font-weight: 700; }

footer { background: var(--ink); color: #cfe3f2; padding: 28px 0; font-size: 16px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #fff; font-weight: 800; margin-left: 18px; }
footer a:first-child { margin-left: 0; }

@media (max-width: 820px) {
  .steps, .promises { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 18px; }
  .feature.flip .shot { order: 0; }
  section { padding: 44px 0; }
  .top nav { gap: 12px; font-size: 16px; }
}
