/* drew2apps — shared styles */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #fbf8f3;
  --bg-2: #f3eee6;
  --card: #ffffff;
  --ink: #16131c;
  --muted: #6b6577;
  --line: rgba(22, 19, 28, 0.1);
  --red: #ff4d5e;
  --green: #1fcb7a;
  --blue: #3d7bff;
  --yellow: #ffc93c;
  --purple: #8b5cf6;
  --shadow: 0 1px 2px rgba(22, 19, 28, 0.06), 0 8px 24px rgba(22, 19, 28, 0.06);
  --shadow-lg: 0 2px 4px rgba(22, 19, 28, 0.06), 0 18px 40px rgba(22, 19, 28, 0.12);
  --radius: 22px;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121016;
    --bg-2: #1a1720;
    --card: #1d1a24;
    --ink: #f4f1ea;
    --muted: #a49eb0;
    --line: rgba(244, 241, 234, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121016;
  --bg-2: #1a1720;
  --card: #1d1a24;
  --ink: #f4f1ea;
  --muted: #a49eb0;
  --line: rgba(244, 241, 234, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.logo .two {
  display: inline-block;
  margin: 0 1px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--blue), var(--purple), var(--red));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slide 8s linear infinite;
  font-size: 1.15em;
}
@keyframes slide { to { background-position: 300% 0; } }

.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow .dots { display: inline-flex; gap: 4px; }
.eyebrow .dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; }
.hero h1 .r { color: var(--red); }
.hero h1 .g { color: var(--green); }
.hero h1 .b { color: var(--blue); }
.hero .lede { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 30em; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -1px var(--line); }
.btn:active { transform: translateY(0); }

/* RGB venn — additive color on a dark stage */
.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  background: #0d0b11;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  border: 1px solid var(--line);
}
.stage .c {
  position: absolute;
  width: 54%;
  height: 54%;
  border-radius: 50%;
  mix-blend-mode: screen;
  filter: blur(0.5px);
}
.stage .c.r { background: #ff0000; left: 23%; top: 14%; animation: drift-r 14s ease-in-out infinite; }
.stage .c.g { background: #00ff00; left: 10%; top: 38%; animation: drift-g 16s ease-in-out infinite; }
.stage .c.b { background: #0000ff; left: 36%; top: 38%; animation: drift-b 18s ease-in-out infinite; }
@keyframes drift-r { 50% { transform: translate(4%, 6%); } }
@keyframes drift-g { 50% { transform: translate(6%, -4%); } }
@keyframes drift-b { 50% { transform: translate(-6%, -3%); } }
.stage .label {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

/* ---------- sections ---------- */
.section { padding: 48px 0 72px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.section-head p { color: var(--muted); }

/* ---------- app cards ---------- */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.app-card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow-lg); }
.app-card .art { aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.app-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-card h3 { font-size: 28px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.app-card h3 .ico { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.app-card .tag { color: var(--muted); font-size: 15px; }
.app-card .play {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-card:hover .play .arrow { transform: translateX(4px); }
.play .arrow { transition: transform 0.2s; }

/* card art: RGB */
.art-rgb { background: #0d0b11; display: grid; place-items: center; }
.art-rgb .sliders { width: 70%; display: grid; gap: 18px; }
.art-rgb .sl { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); position: relative; }
.art-rgb .sl::before { content: ""; position: absolute; inset: 0 auto 0 0; border-radius: 3px; width: var(--w); background: var(--c); }
.art-rgb .sl::after {
  content: ""; position: absolute; top: 50%; left: var(--w);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--c); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px #0d0b11;
}
.art-rgb .swatch-word {
  font: 800 54px/1 var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-align: center;
}
.art-rgb .swatch-word span:nth-child(1) { color: #ff4040; }
.art-rgb .swatch-word span:nth-child(2) { color: #34d058; }
.art-rgb .swatch-word span:nth-child(3) { color: #4d8bff; }

/* card art: Transition */
.art-transition { display: grid; place-items: center; animation: hue 10s linear infinite; background: hsl(var(--h, 200) 85% 55%); }
@property --h { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes hue { from { --h: 0; } to { --h: 360; } }
.art-transition .clock {
  font: 800 64px/1 var(--font-display);
  color: #fff;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* card art: Colorize */
.art-colorize { background: var(--bg-2); display: grid; place-items: center; }
.art-colorize .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 62%; }
.art-colorize .grid i { aspect-ratio: 1; border-radius: 8px; background: #8b5cf6; display: block; }
.art-colorize .grid i.odd { background: #9d72f8; outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- now strip ---------- */
.now-strip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  box-shadow: var(--shadow);
}
.now-strip .badge {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--yellow), var(--red));
  color: #fff; font: 800 22px/1 var(--font-display);
}
.now-strip h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.now-strip p { color: var(--muted); font-size: 16px; }

/* ---------- about ---------- */
.about-hero { padding: 64px 0 24px; }
.about-hero h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 800; }
.about-hero .lede { margin-top: 18px; font-size: 20px; color: var(--muted); max-width: 34em; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding-top: 24px; padding-bottom: 80px; align-items: start; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.panel .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.now-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.now-list li { display: grid; grid-template-columns: 14px 1fr; gap: 14px; }
.now-list li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; margin-top: 7px; background: var(--dot, var(--blue)); }
.now-list strong { display: block; }
.now-list span { color: var(--muted); font-size: 16px; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px; text-decoration: none;
  background: var(--bg-2); font-weight: 600;
  transition: transform 0.15s;
}
.links a:hover { transform: translateX(4px); }
.links a small { color: var(--muted); font-weight: 500; }
.prose p + p { margin-top: 14px; }

/* ---------- app pages ---------- */
.app-page { padding: 40px 0 72px; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.app-top h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; }
.app-top .tag { color: var(--muted); margin-top: 6px; }
.back { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; display: inline-block; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.app-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.app-notes { margin-top: 28px; color: var(--muted); max-width: 40em; font-size: 16px; }
.app-notes strong { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.rgb-bar { display: flex; height: 4px; }
.rgb-bar i { flex: 1; }

/* ---------- 404 ---------- */
.notfound { padding: 96px 0; text-align: center; }
.notfound h1 { font-size: clamp(64px, 14vw, 160px); font-weight: 800; }
.notfound p { color: var(--muted); margin: 12px 0 28px; font-size: 19px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .stage { max-width: 420px; width: 100%; justify-self: center; }
  .apps { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .apps { grid-template-columns: 1fr; }
  .now-strip { grid-template-columns: 1fr; text-align: left; }
  .section-head { flex-direction: column; align-items: start; }
  .nav a { padding: 8px 10px; }
  .logo { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}
