/* Swoopy's Support, Terms and Privacy pages.
   Styled with the "Paper" design system from shashwa7.in: warm near-neutral
   ink on paper, no brand hue (accent = ink), emphasis from weight and
   contrast, DM Sans, box radii 16 / 12 / 10 / 8. */

@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-Regular.woff) format("woff"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-SemiBold.woff) format("woff"); font-weight: 600 700; font-display: swap; }

/* Paper light (default) */
:root {
  --background: hsl(40 33% 98.5%);
  --foreground: hsl(35 9% 11%);
  --card: hsl(0 0% 100%);
  --muted: hsl(38 20% 95.5%);
  --muted-foreground: hsl(35 7% 39%);
  --subtle: hsl(35 6% 44%);
  --border: hsl(36 16% 89.5%);
  --border-strong: hsl(36 14% 81%);
  --accent: hsl(35 9% 11%);
  --accent-hover: hsl(35 9% 22%);
  --accent-foreground: hsl(40 33% 99%);
  --ring: hsl(35 9% 30%);
  --radius-2xl: 16px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --measure: 760px;
  color-scheme: light;
}
/* Paper dark: when Swoopy's Appearance is Dark, or it follows a dark system
   (the hosted pages have no setting, so they follow the system). */
:root[data-theme="dark"] {
  --background: hsl(30 7% 5%);
  --foreground: hsl(35 6% 94%);
  --card: hsl(30 7% 8.5%);
  --muted: hsl(30 6% 15%);
  --muted-foreground: hsl(35 6% 63%);
  --subtle: hsl(30 5% 50%);
  --border: hsl(30 6% 16%);
  --border-strong: hsl(30 6% 24%);
  --accent: hsl(35 8% 94%);
  --accent-hover: hsl(35 8% 84%);
  --accent-foreground: hsl(30 7% 6%);
  --ring: hsl(35 6% 70%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --background: hsl(30 7% 5%);
    --foreground: hsl(35 6% 94%);
    --card: hsl(30 7% 8.5%);
    --muted: hsl(30 6% 15%);
    --muted-foreground: hsl(35 6% 63%);
    --subtle: hsl(30 5% 50%);
    --border: hsl(30 6% 16%);
    --border-strong: hsl(30 6% 24%);
    --accent: hsl(35 8% 94%);
    --accent-hover: hsl(35 8% 84%);
    --accent-foreground: hsl(30 7% 6%);
    --ring: hsl(35 6% 70%);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--background); color: var(--foreground); }
body {
  font: 15px/1.65 "DM Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
a { color: var(--foreground); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 4px; transition: text-decoration-color 0.15s ease-out; }
a:hover { text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.icon { display: inline-flex; flex: none; }
strong { font-weight: 600; color: var(--foreground); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--background) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-in { max-width: var(--measure); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 10px; }
.nav .logo { width: 30px; height: 30px; border-radius: var(--radius-md); background: #f6f8ef; padding: 2px; }
.nav .brand { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; color: var(--foreground); text-decoration: none; }
.nav .links { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.nav .links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-foreground); text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: var(--radius-md); transition: background-color 0.15s ease-out, color 0.15s ease-out; }
.nav .links a:hover { color: var(--foreground); background: var(--muted); }
.nav .links a[aria-current="page"] { color: var(--accent-foreground); background: var(--accent); font-weight: 500; }

/* ---------- Reading pages (Terms, Privacy) ---------- */
main { max-width: var(--measure); margin: 0 auto; padding: 32px 24px 48px; }
@media (min-width: 768px) { main { padding: 48px 24px 48px; } }
h1 { font-size: 36px; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.4; margin: 36px 0 8px; }
.updated { font: 11px/1.45 "IBM Plex Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--subtle); margin: 0 0 24px; }
.lede { font-size: 17px; line-height: 1.5; color: var(--muted-foreground); }
p, li { color: var(--muted-foreground); }
.callout { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; margin: 20px 0; }
.callout, .callout p { color: var(--foreground); }
ul { padding-left: 20px; }
li { margin: 6px 0; }
li::marker { color: var(--subtle); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 13px; }
.foot .nav-in { padding: 20px 24px; flex-wrap: wrap; }
.foot a { color: var(--muted-foreground); }

/* "Made with love by offcod8": the mark is a solid PNG used as a mask, so it takes the text color */
.maker { display: inline-flex; align-items: center; gap: 5px; color: var(--foreground); font-weight: 600; text-decoration: none; }
.maker:hover { text-decoration: underline; text-underline-offset: 4px; }
.maker-mark {
  width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: url(icons/offcod8-mark.png) center / contain no-repeat; mask: url(icons/offcod8-mark.png) center / contain no-repeat;
}
.foot .maker { color: var(--foreground); }
.foot .maker-line { display: inline-flex; align-items: center; gap: 4px; }

/* "free": a hand-drawn ink swoosh under the word (an SVG mask filled with the ink) */
.swoosh { position: relative; display: inline-block; white-space: nowrap; z-index: 0; }
.swoosh::after {
  content: ""; position: absolute; z-index: -1; left: -8%; right: -10%; bottom: -0.42em; height: 0.8em;
  background: var(--muted-foreground); opacity: 0.85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15 C 26 8, 58 5, 92 7 S 112 10, 116 8' stroke-width='5'/%3E%3Cpath d='M30 18 C 50 14, 74 13, 98 14' stroke-width='3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15 C 26 8, 58 5, 92 7 S 112 10, 116 8' stroke-width='5'/%3E%3Cpath d='M30 18 C 50 14, 74 13, 98 14' stroke-width='3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-1.5deg);
}

/* ---------- Support page ---------- */
.s-main { max-width: var(--measure); }
.s-hero { text-align: center; padding: 8px 0 0; }
.s-mascot { width: 120px; height: 120px; margin: 0 auto 20px; border-radius: var(--radius-2xl); background: #f6f8ef; border: 1px solid var(--border); padding: 10px; }
.s-mascot img { width: 100%; height: 100%; display: block; }
.s-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px;
  font: 11px/1.45 "IBM Plex Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--subtle);
}
.s-hero h1 { font-size: 36px; margin: 0 0 10px; }
.s-lede { max-width: 540px; margin: 0 auto; color: var(--muted-foreground); font-size: 17px; line-height: 1.5; }
.s-lede .maker { vertical-align: baseline; }

/* Featured Buy Me a Coffee card */
.s-feature { max-width: 520px; margin: 36px auto 0; }
.s-feature-in { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 24px; }
.s-feature-head { display: flex; align-items: center; gap: 14px; }
.s-feature-head h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.s-feature-head p { margin: 0; color: var(--muted-foreground); font-size: 13px; }
.s-cup { width: 44px; height: 44px; border-radius: var(--radius-lg); display: grid; place-items: center; flex: none; background: var(--muted); color: var(--foreground); }
.s-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0 16px; padding: 10px 20px;
  border-radius: var(--radius-md); background: var(--accent); color: var(--accent-foreground); font-weight: 500; font-size: 15px; text-decoration: none;
  transition: background-color 0.15s ease-out;
}
.s-cta:hover { background: var(--accent-hover); }
.s-cta .icon:last-child { opacity: 0.7; }
.s-perks { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; }
.s-perks li { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted-foreground); }
.s-perks .icon { color: var(--foreground); }

/* Other ways to help: equal-height cards, action pinned to the bottom */
.s-more { margin-top: 56px; }
.s-more h2 { text-align: center; font-size: 24px; line-height: 1.25; margin: 0 0 20px; }
.s-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.s-card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius-lg); text-decoration: none; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border); transition: border-color 0.15s ease-out;
}
.s-card[hidden] { display: none; }
.s-card:hover { border-color: var(--border-strong); }
.s-badge { width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--muted); color: var(--foreground); margin-bottom: 10px; }
.s-card b { font-size: 15px; font-weight: 600; }
.s-card small { color: var(--muted-foreground); font-size: 13px; line-height: 1.55; }
.s-action { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--foreground); font-weight: 500; font-size: 13px; }
.s-action .icon { transition: transform 0.15s ease-out; }
.s-card:hover .s-action .icon { transform: translateX(3px); }
.s-fine { max-width: 560px; margin: 40px auto 0; text-align: center; color: var(--subtle); font-size: 13px; }

@media (max-width: 560px) {
  h1, .s-hero h1 { font-size: 30px; }
  .s-feature-in { padding: 20px; }
  .s-cta { padding: 10px 12px; white-space: nowrap; }
  .s-cta .icon:last-child { display: none; }
  .nav .brand { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
