/* Paper Cut! website: the same desk, paper and lettering as the game (lib/theme.dart). */

@font-face { font-family: Barlow; src: url(fonts/BarlowCondensed-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Barlow; src: url(fonts/BarlowCondensed-ExtraBold.ttf); font-weight: 800; font-display: swap; }
@font-face { font-family: Bricolage; src: url(fonts/BricolageGrotesque-800.ttf); font-weight: 800; font-display: swap; }

:root {
  --bg-top: #262830;
  --bg-bottom: #111216;
  --panel: #1b1c22;
  --line: #2c2e35;
  --ivory: #f2ede3;
  --ink: #1a1b20;
  --text: #d9d6ce;
  --muted: #9497a3;
  --red: #d9533f;
  --mustard: #e6b53e;
  --cobalt: #3f70d6;
  --sage: #4f9c6b;
  --mat: #2f6e5b;
  --wide: 1080px;
  --prose: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-bottom) linear-gradient(var(--bg-top), var(--bg-bottom) 900px) no-repeat;
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--mustard); text-underline-offset: 3px; }
a:hover { color: #f5d485; }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }

/* labels in the game's spaced capitals */
.caps {
  font-family: Barlow, sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em; font-size: 14px; color: var(--muted);
}
h1, h2, h3 { font-family: Barlow, sans-serif; font-weight: 800; color: var(--ivory); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 64px); }
h2 { font-size: clamp(30px, 4.5vw, 42px); }
h3 { font-size: 24px; letter-spacing: .02em; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: Barlow, sans-serif; font-weight: 800; font-size: 22px; letter-spacing: .04em; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-family: Barlow, sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; font-size: 14px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ivory); }

/* the torn-paper logo from the home screen */
.logo { display: inline-flex; transform: rotate(-3deg); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.logo b {
  background: var(--ivory); color: var(--ink); font-family: Barlow, sans-serif; font-weight: 800;
  font-size: clamp(48px, 9vw, 92px); letter-spacing: .06em; padding: .08em .28em; line-height: 1;
}
.logo b:first-child { clip-path: polygon(0 4%, 100% 0, 92% 100%, 0 100%); padding-right: .5em; }
.logo b:last-child { clip-path: polygon(10% 0, 100% 6%, 100% 96%, 0 100%); margin-left: -.18em; padding-left: .45em; transform: translateY(-.06em); }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 72px; }
.hero .tag { margin: 26px 0 14px; }
.hero p.lead { font-size: 20px; color: var(--text); max-width: 34ch; margin: 0 0 28px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 14px;
  font-family: Barlow, sans-serif; font-weight: 800; font-size: 19px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; background: var(--ivory); color: var(--ink); box-shadow: 0 4px 0 #b9b1a1;
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 5px 0 #b9b1a1; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b9b1a1; }
.btn.ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--muted); }
.btn svg { width: 20px; height: 20px; }
.soon { margin-top: 12px; font-size: 14px; color: var(--muted); }

.phone {
  border-radius: 34px; overflow: hidden; border: 8px solid #08090b; background: #08090b;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
  aspect-ratio: 9 / 16;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.hero .phone { max-width: 340px; margin-left: auto; transform: rotate(2deg); }

/* sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
.head { max-width: 640px; margin-bottom: 40px; }
.head .caps { display: block; margin-bottom: 10px; }
.head p { margin: 14px 0 0; color: var(--text); font-size: 18px; }

/* how to play: three paper cards */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li {
  background: var(--ivory); color: #3b3b43; border-radius: 6px 6px 6px 22px; padding: 24px;
  box-shadow: 0 6px 0 #b9b1a1, 0 16px 30px rgba(0, 0, 0, .35); position: relative;
}
.steps li:nth-child(1) { transform: rotate(-1deg); }
.steps li:nth-child(3) { transform: rotate(1deg); }
.steps li h3 { color: var(--ink); margin: 10px 0 6px; }
.steps li p { margin: 0; font-size: 16px; }
.steps .n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: Barlow, sans-serif; font-weight: 800; font-size: 22px; color: #fff;
}

/* screenshots strip */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.shots figure { margin: 0; }
.shots .phone { border-width: 5px; border-radius: 22px; }
.shots figcaption { margin-top: 10px; text-align: center; }

/* features grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.feature .swatch { width: 34px; height: 22px; border-radius: 3px 3px 3px 10px; margin-bottom: 14px; }
.feature h3 { font-size: 22px; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 16px; color: var(--muted); }

/* FAQ */
.faq { max-width: var(--prose); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ivory); font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--text); }

/* closing call */
.cta { text-align: center; }
.cta .buttons { justify-content: center; margin-top: 24px; }

/* legal pages */
.doc { max-width: var(--prose); padding: 32px 0 80px; }
.doc h1 { margin-bottom: 8px; }
.doc .caps { display: block; margin-bottom: 32px; }
.doc h2 { font-size: 28px; margin: 44px 0 12px; }
.doc h3 { font-size: 20px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ivory); }
.doc .summary { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--mustard); border-radius: 12px; padding: 18px 22px; }
.doc .summary p { margin: 0; }
.doc .toc { columns: 2; column-gap: 32px; padding-left: 22px; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-family: Barlow, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--muted); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ivory); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .logo { margin-left: 8px; }
  .hero .phone { margin: 0 auto; max-width: 280px; }
  .steps, .features { grid-template-columns: 1fr; }
  .steps li { transform: none !important; }
  .shots { grid-template-columns: repeat(5, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots figure { scroll-snap-align: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav { gap: 12px; }
  .top nav a { font-size: 13px; letter-spacing: .1em; }
  .brand span { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  .top nav a.hide-sm { display: none; }
  section { padding: 56px 0; }
  .doc .toc { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
