/* lulik.dev — warm paper-and-lantern theme drawn from the Lulik game art */

:root {
  /* light: washi paper at dusk */
  --bg: #fdf7ef;
  --bg-tint: #f8e9dd;
  --card: #fffdf9;
  --fg: #3b2a20;
  --fg-soft: #614739;
  --muted: #8a7260;
  --line: #ead9c6;
  --line-soft: #f2e5d6;
  --accent: #b4632c;          /* lantern copper, AA on cream */
  --accent-fg: #fffaf3;
  --accent-soft: #f6e2cf;
  --sakura: #c2496b;          /* blossom, AA on cream */
  --sakura-soft: #fbe2e8;
  --jade: #4a6b4f;
  --gold: #a9792b;
  --shadow: 0 1px 2px rgba(80, 48, 28, .06), 0 10px 28px -12px rgba(80, 48, 28, .22);
  --shadow-lift: 0 2px 4px rgba(80, 48, 28, .08), 0 18px 40px -16px rgba(80, 48, 28, .34);
  --radius: 18px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* dark: the game's night-garden board */
    --bg: #17110d;
    --bg-tint: #20170f;
    --card: #221913;
    --fg: #f3e7d8;
    --fg-soft: #e0cdb8;
    --muted: #b49c86;
    --line: #38291e;
    --line-soft: #2b1f17;
    --accent: #e8a860;
    --accent-fg: #221913;
    --accent-soft: #33241a;
    --sakura: #f09ab0;
    --sakura-soft: #33202a;
    --jade: #8fb394;
    --gold: #d9ae63;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 20px 44px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--sans);
  /* a soft lantern glow top-left and blossom warmth top-right */
  background-image:
    radial-gradient(60rem 32rem at 8% -6%, var(--bg-tint) 0%, transparent 62%),
    radial-gradient(44rem 26rem at 102% 2%, var(--sakura-soft) 0%, transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: var(--accent); overflow-wrap: anywhere; text-underline-offset: 2px; }
a:hover { color: var(--sakura); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

.skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto; overflow: visible;
  clip-path: none; z-index: 10; background: var(--card); color: var(--fg);
  padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); text-decoration: none;
}

.wrap { max-width: 860px; margin: 0 auto; padding-inline: 22px; }
body > * { min-width: 0; }

/* ---------- header ---------- */

header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(8px);
  position: sticky; top: 0; z-index: 5;
}
header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; padding-block: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.06rem; font-weight: 700; letter-spacing: .01em;
  color: var(--fg); text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; flex: none; box-shadow: var(--shadow); }
nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding-block: 2px; border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--fg); }
nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---------- layout ---------- */

main { padding-block: 44px 72px; }

h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.15; margin: 0 0 14px;
}
h2 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin: 2.2em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1.6em 0 .3em; }
.lead { color: var(--fg-soft); font-size: 1.14rem; line-height: 1.6; margin-top: 0; max-width: 56ch; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 14px;
}

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center;
  padding: 34px 32px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 26px;
  background:
    linear-gradient(142deg, var(--card) 0%, color-mix(in srgb, var(--bg-tint) 55%, var(--card)) 100%);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after {
  /* blossom watermark, decorative only */
  content: ""; position: absolute; right: -34px; bottom: -42px; width: 190px; height: 190px;
  background: url("/brand/tiles/sakura.webp") center/contain no-repeat;
  opacity: .14; transform: rotate(-12deg); pointer-events: none;
}
.hero-art { flex: none; }
.hero-art img {
  width: 132px; height: 132px; border-radius: 30px; display: block;
  box-shadow: var(--shadow-lift);
}
.hero-text { min-width: 0; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 10px; }
.hero .lead { margin-bottom: 0; }
@media (max-width: 620px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; text-align: left; }
  .hero-art img { width: 104px; height: 104px; border-radius: 24px; }
}

/* ---------- motif strip ---------- */

.motifs {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  list-style: none; margin: 26px 0 0; padding: 0;
}
.motifs li { flex: none; }
.motifs img {
  width: 46px; height: 46px; object-fit: contain; display: block;
  filter: drop-shadow(0 4px 8px rgba(80, 48, 28, .16));
}
.motif-note { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

/* ---------- link cards ---------- */

.links { display: grid; gap: 14px; padding: 0; list-style: none; margin: 34px 0 0; }
.links a {
  display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--fg); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  font-weight: 600;
}
.links a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--accent); color: var(--fg); }
.links span { display: block; color: var(--muted); font-size: .93rem; font-weight: 400; margin-top: 3px; }

/* ---------- app cards ---------- */

.apps { display: grid; gap: 22px; padding: 0; list-style: none; margin: 34px 0 0; }
.app {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  padding: 24px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--card); box-shadow: var(--shadow);
}
.app > img, .app .app-icon {
  width: 92px; height: 92px; border-radius: 21px; flex: none; display: block;
  box-shadow: var(--shadow-lift);
}
.app > div { min-width: 0; }
.app h2, .app h3 { font-family: var(--serif); margin: 0; font-size: 1.3rem; line-height: 1.25; }
.app p { margin: 8px 0 12px; color: var(--fg-soft); }
.meta { font-size: .9rem; color: var(--muted); }

.features { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 16px; padding: 0; }
.features li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px 6px 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: .88rem; color: var(--fg-soft);
}
.features img { width: 22px; height: 22px; object-fit: contain; display: block; }

@media (max-width: 560px) {
  .app { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .app > img, .app .app-icon { width: 76px; height: 76px; border-radius: 18px; }
}

/* ---------- buttons and badges ---------- */

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none;
  font-weight: 650; font-size: .96rem; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { color: var(--accent-fg); filter: brightness(1.07); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.status {
  display: inline-block; padding: 6px 15px; border-radius: 999px;
  border: 1px dashed var(--line); background: var(--accent-soft);
  color: var(--fg-soft); font-size: .88rem; font-weight: 500;
}

/* ---------- forms ---------- */

label { display: block; font-weight: 650; margin-bottom: 8px; }
select {
  font: inherit; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); max-width: 100%; box-shadow: var(--shadow);
}

/* ---------- long-form policy ---------- */

.policy p, .policy li { max-width: 68ch; color: var(--fg-soft); }
.policy h2 {
  padding-top: .35em; border-top: 1px solid var(--line-soft);
}
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: .4em; }

/* ---------- callout ---------- */

.note-card {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--card); border-radius: 14px; padding: 16px 18px; margin: 26px 0;
  box-shadow: var(--shadow);
}
.note-card p { margin: 0; color: var(--fg-soft); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem;
  background: color-mix(in srgb, var(--bg-tint) 42%, transparent);
}
footer .wrap {
  padding-block: 30px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
}
footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); text-decoration: underline; }
