/* Fix & Fable website. Colours and shapes follow the game: dark workshop wood, cream paper, teal buttons, brass trim. */
:root {
  --wood: #1f150d;
  --wood-2: #2b1d12;
  --wood-3: #3a2717;
  --paper: #f6ecd8;
  --paper-2: #efe0c2;
  --ink: #2b2118;
  --ink-soft: #6b5843;
  --teal: #2f8f86;
  --teal-dark: #1d5f59;
  --amber: #f0b44c;
  --brass: #b8893f;
  --rose: #c95d74;
  --cream-text: #f3e6cc;
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream-text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(240, 180, 76, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(47, 143, 134, .14), transparent 60%),
    var(--wood);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); }
a:hover { color: #ffd38a; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(31, 21, 13, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 137, 63, .25);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream-text); font-weight: 900; font-size: 20px; letter-spacing: .2px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--cream-text); text-decoration: none; font-weight: 700; font-size: 15px; opacity: .85; }
.nav a:hover { opacity: 1; color: var(--amber); }
.nav .btn { opacity: 1; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 16px; border: 0; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 17px; letter-spacing: .3px; text-decoration: none;
  color: #fff; background: linear-gradient(#3aa79c, var(--teal));
  box-shadow: 0 5px 0 var(--teal-dark), 0 10px 22px rgba(0,0,0,.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--teal-dark), 0 4px 10px rgba(0,0,0,.3); }
.btn.small { padding: 9px 16px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--teal-dark); }
.btn.amber { background: linear-gradient(#f6c46a, #e09a2c); color: #3a2410; box-shadow: 0 5px 0 #9c6618, 0 10px 22px rgba(0,0,0,.35); }

/* Store button: swap for Apple's official badge artwork once the app is live. */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; text-decoration: none;
  border: 1.5px solid #a6a6a6; border-radius: 13px;
  padding: 9px 20px 9px 16px; min-height: 58px;
}
.store-btn:hover { color: #fff; background: #111; }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .3px; opacity: .9; line-height: 1.1; }
.store-btn strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.15; letter-spacing: -.2px; }
.store-btn.soon { cursor: default; border-style: dashed; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 80px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(img/title.webp) center 30% / cover no-repeat;
  opacity: .22; filter: blur(2px) saturate(1.1);
  mask-image: linear-gradient(#000 40%, transparent);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-logo { width: min(250px, 60%); filter: drop-shadow(0 10px 24px rgba(0,0,0,.55)); margin: 0 0 18px -6px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; margin: 0 0 16px; font-weight: 900; letter-spacing: -.5px; color: #fff4dd; }
.hero h1 em { font-style: normal; color: var(--amber); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: rgba(243, 230, 204, .88); max-width: 34em; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cta-note { margin-top: 14px; font-size: 14px; color: rgba(243, 230, 204, .65); }

.phones { position: relative; height: 620px; }
.phone {
  position: absolute; width: 270px; aspect-ratio: 1320 / 2868;
  border-radius: 44px; padding: 10px; background: #0d0907;
  box-shadow: 0 0 0 2px #3b2a1b, 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 35px; }
.phones .phone:nth-child(1) { left: 2%; top: 60px; transform: rotate(-7deg); opacity: .95; }
.phones .phone:nth-child(2) { right: 4%; top: 0; transform: rotate(4deg); z-index: 2; }
.floaty { animation: floaty 6s ease-in-out infinite; }
.phones .phone:nth-child(1).floaty { animation-delay: -3s; }
@keyframes floaty { 50% { translate: 0 -10px; } }

@media (max-width: 900px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { margin-inline: auto; width: 160px; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .phones { height: 470px; max-width: 460px; margin: 10px auto 0; width: 100%; }
  .phone { width: 220px; }
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.eyebrow { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.section-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; margin: 0 0 14px; font-weight: 900; color: #fff4dd; letter-spacing: -.3px; }
.section-lede { font-size: 18px; color: rgba(243, 230, 204, .8); max-width: 40em; margin: 0 0 40px; }
.center { text-align: center; }
.center .section-lede { margin-inline: auto; }

/* Paper card, like the game's popups: cream with a dashed stitched edge. */
.paper {
  position: relative; background: var(--paper); color: var(--ink);
  border-radius: var(--radius); padding: 26px;
  box-shadow: 0 0 0 3px #6b4a2b, 0 0 0 5px rgba(184,137,63,.6), 0 18px 40px rgba(0,0,0,.4);
}
.paper::after {
  content: ""; position: absolute; inset: 9px; border-radius: calc(var(--radius) - 8px);
  border: 2px dashed rgba(120, 82, 44, .32); pointer-events: none;
}
.paper h3 { margin: 0 0 8px; font-size: 22px; font-weight: 900; }
.paper p { margin: 0; color: var(--ink-soft); font-weight: 600; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step .num { position: absolute; top: -16px; left: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 900; box-shadow: 0 3px 0 var(--teal-dark); z-index: 1; }
.step .art { height: 120px; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.step .art img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.step .art .portrait { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--paper-2); border: 3px solid var(--brass); }
@media (max-width: 1060px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 38px 24px; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

/* Cutaway */
.cutaway { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.bench {
  position: relative; border-radius: 28px; padding: 22px;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    #1e4d49;
  box-shadow: 0 0 0 3px #4a3420, 0 24px 50px rgba(0,0,0,.5), inset 0 0 60px rgba(0,0,0,.35);
}
.reveal { position: relative; aspect-ratio: 1; user-select: none; touch-action: pan-y; }
.reveal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); pointer-events: none; }
.reveal .outside { clip-path: inset(0 0 0 var(--cut, 50%)); }
.reveal .seam { position: absolute; top: 4%; bottom: 4%; left: var(--cut, 50%); width: 3px; margin-left: -1.5px; background: var(--amber); border-radius: 3px; box-shadow: 0 0 12px rgba(240,180,76,.8); pointer-events: none; }
.reveal .seam::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; translate: -50% -50%;
  border-radius: 50%; background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a2410' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 3px 0 #9c6618, 0 6px 14px rgba(0,0,0,.4);
}
.reveal input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.reveal-labels { display: flex; justify-content: space-between; margin-top: 10px; font-weight: 900; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(243,230,204,.75); }
.picker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.picker button {
  font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; color: var(--cream-text);
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(184,137,63,.45);
}
.picker button[aria-pressed=true] { background: var(--amber); color: #3a2410; border-color: var(--amber); }
.tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.tools li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06); font-weight: 800; font-size: 14px; }
.tools img { width: 32px; height: 32px; object-fit: contain; }
@media (max-width: 860px) { .cutaway { grid-template-columns: 1fr; } .bench { max-width: 460px; margin-inline: auto; width: 100%; } }

/* Screenshots */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 26px; scrollbar-width: thin; }
.shots figure { margin: 0; scroll-snap-align: center; }
.shots .phone { position: relative; width: 100%; }
.shots figcaption { text-align: center; margin-top: 16px; font-weight: 800; color: rgba(243,230,204,.85); }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 26px 12px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1.5px solid rgba(184,137,63,.3); }
.stat b { display: block; font-size: clamp(32px, 4vw, 46px); line-height: 1; color: var(--amber); font-weight: 900; }
.stat span { display: block; margin-top: 8px; font-weight: 800; color: rgba(243,230,204,.85); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.world { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: 0 0 0 3px #4a3420, 0 18px 36px rgba(0,0,0,.45); isolation: isolate; }
.world img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.world:hover img { transform: scale(1.05); }
.world::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 35%, rgba(18, 11, 6, .92)); }
.world .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.world h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; color: #fff4dd; }
.world p { margin: 0; font-size: 15px; color: rgba(243,230,204,.85); font-weight: 600; }
.world .tag { position: absolute; top: 16px; left: 16px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; background: rgba(18,11,6,.7); color: var(--cream-text); border: 1px solid rgba(255,255,255,.18); }
.world .tag.free { background: var(--teal); border-color: transparent; color: #fff; }
@media (max-width: 960px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .worlds { grid-template-columns: 1fr; } .world { aspect-ratio: 4 / 3.4; } }

/* Customers */
.people { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.person { text-align: center; }
.person .face { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff6e2, var(--paper-2)); border: 4px solid var(--brass); box-shadow: 0 8px 18px rgba(0,0,0,.4); }
.person .face img { width: 100%; height: 118%; object-fit: cover; object-position: top; }
.person b { display: block; margin-top: 10px; font-size: 15px; color: #fff4dd; }
.person span { display: block; font-size: 13px; color: rgba(243,230,204,.7); font-weight: 600; line-height: 1.3; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .people { grid-template-columns: repeat(3, 1fr); gap: 14px; } }

/* Final CTA */
.final .paper { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 34px; }
.final .paper img { width: 110px; height: 110px; border-radius: 26px; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.final h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
@media (max-width: 760px) { .final .paper { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 50px; border-top: 1px solid rgba(184,137,63,.25); font-size: 15px; color: rgba(243,230,204,.7); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: rgba(243,230,204,.85); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--amber); }

/* ---------- Document pages (privacy, support) ---------- */
.doc { padding: 56px 0 80px; }
.doc .paper { max-width: 820px; margin: 0 auto; padding: 44px clamp(22px, 5vw, 56px); }
.doc h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 40px); font-weight: 900; color: var(--ink); }
.doc h2 { margin: 34px 0 10px; font-size: 21px; font-weight: 900; color: var(--ink); }
.doc p, .doc li { color: #4b3c2c; font-weight: 500; font-size: 16.5px; }
.doc .updated { color: var(--ink-soft); font-weight: 700; margin-bottom: 26px; }
.doc a { color: var(--teal-dark); font-weight: 700; }
.doc a.btn { color: #fff; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
details { border-radius: 14px; background: rgba(120, 82, 44, .07); padding: 4px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 800; color: var(--ink); padding: 12px 0; font-size: 17px; }
details[open] summary { border-bottom: 1px dashed rgba(120, 82, 44, .3); margin-bottom: 8px; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; margin: 26px 0 8px; padding: 20px 22px; border-radius: 16px; background: #fff8ea; border: 2px solid rgba(184,137,63,.45); }
.contact-card p { margin: 0; }

/* Magnifying glass over an object (How it works, step 2). */
.lens-art { position: relative; display: block; width: 108px; height: 108px; margin-right: 18px; }
.lens-glass { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; z-index: 1;
  background: radial-gradient(circle at 50% 45%, #2f7568, #1e4d49);
  box-shadow: 0 0 0 6px #c9973a, 0 0 0 8px #7a5524, 0 8px 16px rgba(0,0,0,.35); }
.lens-glass img { width: 170px; height: 170px; max-width: none; object-fit: contain; transform: translate(14px, 8px); }
.lens-glass::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,.28), transparent 50%); }
.lens-art::after { content: ""; position: absolute; width: 16px; height: 54px; border-radius: 9px; background: linear-gradient(90deg, #7a4b2a, #4a2c17);
  right: -20px; bottom: -36px; transform: rotate(-45deg); }
.step .art { overflow: visible; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.final .store-row { justify-content: flex-end; }
@media (max-width: 760px) { .final .store-row { justify-content: center; } }
