/* Sahur Sort site. Cream paper, dark brown outlines, warm comic accents. */
:root {
  --cream: #fff9ec;
  --cream-2: #fdeccb;
  --ink: #3A2E2A;
  --ink-2: #6b5a52;
  --orange: #ff8a3d;
  --pink: #ff5fa2;
  --teal: #2ec4b6;
  --yellow: #ffc93c;
  --link: #b64a00;
  --display: Bangers, Impact, "Arial Black", sans-serif;
  --body: Fredoka, "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 18px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .03em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 9vw, 5rem); }
h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-top: 1.6em; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .4em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--cream); padding: 8px 12px; border: 3px solid var(--ink); border-radius: 10px; }

/* Header */
.top { background: var(--cream); border-bottom: 4px solid var(--ink); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 1.7rem var(--display); letter-spacing: .04em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: 3px solid var(--ink); }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a:hover, .top nav a[aria-current] { color: var(--link); text-decoration: underline; text-decoration-thickness: 3px; }

/* Hero */
.hero { padding: 48px 0 40px; background: var(--cream-2); border-bottom: 4px solid var(--ink); }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .hero .wrap { grid-template-columns: 1.3fr 1fr; } }
.hero h1 { color: var(--ink); text-shadow: 3px 3px 0 var(--yellow); }
.hero .lede { font-size: 1.2rem; max-width: 34em; }
.hero-icon { width: min(240px, 60vw); border-radius: 22%; border: 5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); margin: 0 auto; }

/* Store buttons */
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 180px; min-height: 56px; padding: 8px 20px; background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 14px; text-decoration: none; line-height: 1.15; box-shadow: 4px 4px 0 var(--orange); }
.store small { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.store strong { font: 400 1.4rem var(--display); letter-spacing: .04em; }
a.store:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--orange); }
.store.soon { background: var(--cream); color: var(--ink); box-shadow: 4px 4px 0 var(--teal); }

/* Sections */
section { padding: 44px 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 18px 20px; box-shadow: 5px 5px 0 var(--ink); }
.card h3 { margin-bottom: .3em; }
.card p { margin: 0; color: var(--ink-2); }
.card:nth-child(4n+1) { background: #ffe3cc; }
.card:nth-child(4n+2) { background: #ffd9ea; }
.card:nth-child(4n+3) { background: #cdf3ee; }
.card:nth-child(4n+4) { background: #fff0b8; }

/* Screenshots */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots figure { margin: 0; flex: 0 0 min(250px, 68vw); scroll-snap-align: start; }
.shots img { width: 100%; border: 4px solid var(--ink); border-radius: 22px; background: var(--cream-2); }
.shots figcaption { margin-top: 8px; font-weight: 600; font-size: .95rem; text-align: center; }

/* Document pages */
.doc { padding: 40px 0 56px; }
.doc h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); text-shadow: 3px 3px 0 var(--yellow); }
.doc .meta { font-weight: 600; color: var(--ink-2); margin-bottom: .2em; }
.doc .lede { font-size: 1.15rem; }
.doc-box { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 8px 22px 12px; box-shadow: 5px 5px 0 var(--ink); }
details { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 0 18px; margin: 0 0 12px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
details[open] { background: var(--cream-2); }
details p:last-child, details ul:last-child { margin-bottom: 1em; }
.note { background: #fff0b8; border: 3px dashed var(--ink); border-radius: 14px; padding: 12px 18px; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; background: #fff; }
th, td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--cream-2); }
.tablewrap { overflow-x: auto; }

/* Footer */
footer { border-top: 4px solid var(--ink); background: var(--cream-2); padding: 28px 0 40px; font-size: .95rem; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
footer p { margin: 0; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } a.store:hover { transform: none; } }
