/* Pixel Fishy website. Colors from the app icon: deep ocean blue and fish orange. */
:root {
  /* Colors from the app's Ocean theme, with the fish orange for buttons and headings. */
  --deep: #0b141b;
  --sea: #0e1820;
  --sea-2: #172430;
  --wave: #4fc3f7;
  --fish: #ffa726;
  --fish-dark: #e08a10;
  --ink: #dcebf5;
  --muted: #8fa8bb;
  --line: #2a4256;
  --card: #1c2c3a;
  --radius: 4px;
  --pixel: "Silkscreen", "Press Start 2P", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 var(--body);
  color: var(--ink);
  /* A faint pixel grid over the deep ocean, like the app's canvas workspace. */
  background-color: var(--deep);
  background-image: linear-gradient(rgba(79,195,247,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
img { max-width: 100%; image-rendering: pixelated; }
a { color: var(--wave); }
a:hover { color: #9be0ff; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; line-height: 1.2; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.05rem; margin: 0 0 0.4em; color: var(--fish); }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: #0e1820; padding: 0.1em 0.35em; border-radius: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 20, 27, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--pixel); font-size: 1.1rem; }
.brand img { width: 34px; height: 34px; border-radius: 6px; }
.top nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--fish); }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--line); color: var(--ink); font: inherit; padding: 4px 10px; border-radius: var(--radius); }
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .top nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--deep); border-bottom: 2px solid var(--line); }
  .top nav.open { display: flex; }
  .top nav a { padding: 12px 20px; width: 100%; }
}

/* Buttons: chunky, pixel-edged */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pixel); font-size: 0.95rem; text-decoration: none;
  padding: 14px 22px; color: #1a1205; background: var(--fish);
  border: none; border-radius: 0;
  box-shadow: 0 -4px 0 0 var(--fish-dark) inset, 4px 4px 0 0 #000;
  transition: transform 0.08s;
}
.btn:hover { color: #1a1205; transform: translate(-1px, -1px); box-shadow: 0 -4px 0 0 var(--fish-dark) inset, 5px 5px 0 0 #000; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 -4px 0 0 var(--fish-dark) inset, 1px 1px 0 0 #000; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset; }
.btn.ghost:hover { color: var(--fish); }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 70% 0%, rgba(26,74,110,0.95) 0%, rgba(14,24,32,0.9) 55%, rgba(11,20,27,0.6) 100%);
  padding: 80px 0 90px;
  border-bottom: 2px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: #cfe3f0; max-width: 34em; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero .fish { width: min(320px, 70%); justify-self: center; animation: swim 4s ease-in-out infinite; filter: drop-shadow(8px 8px 0 rgba(0,0,0,0.35)); }
@keyframes swim { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-14px, -10px); } }
.bubbles span { position: absolute; width: 10px; height: 10px; background: rgba(255,255,255,0.35); animation: rise 7s linear infinite; }
.bubbles span:nth-child(2) { left: 70%; width: 6px; height: 6px; animation-delay: 2s; }
.bubbles span:nth-child(3) { left: 85%; animation-delay: 4s; }
.bubbles span:nth-child(4) { left: 60%; width: 8px; height: 8px; animation-delay: 5.5s; }
.bubbles span:nth-child(1) { left: 78%; }
@keyframes rise { from { bottom: -20px; opacity: 0; } 10% { opacity: 1; } to { bottom: 110%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero .fish, .bubbles span { animation: none; } }
@media (max-width: 800px) { .hero .wrap { grid-template-columns: 1fr; } .hero .fish { order: -1; width: 180px; } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.tags li { font-family: var(--pixel); font-size: 0.75rem; padding: 4px 10px; border: 2px solid rgba(255,255,255,0.35); }

/* Sections */
section { padding: 70px 0; }
section.alt { background: rgba(14,24,32,0.85); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.section-lead { color: var(--muted); max-width: 46em; margin-top: -0.3em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 30px; }
.card { background: var(--card); border: 2px solid var(--line); padding: 22px; box-shadow: 4px 4px 0 0 #000; }
.card ul { margin: 0.4em 0 0; padding-left: 1.1em; color: #c6dbe8; }
.card li { margin: 0.15em 0; }
.card .icon { width: 36px; height: 36px; margin-bottom: 10px; image-rendering: pixelated; }

/* Feature spotlight: words beside a GIF */
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.spot.flip > :first-child { order: 2; }
@media (max-width: 800px) { .spot { grid-template-columns: 1fr; } .spot.flip > :first-child { order: 0; } }

/* GIF / screenshot frames, with a placeholder until the file exists */
.gif { margin: 0; background: #08111a; border: 2px solid var(--line); box-shadow: 4px 4px 0 0 #000; aspect-ratio: 9 / 16; max-height: 560px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gif.wide { aspect-ratio: 16 / 10; }
.gif img { width: 100%; height: 100%; object-fit: contain; }
.gif figcaption { display: none; }
.gif.missing img { display: none; }
.gif.missing figcaption { display: block; font-family: var(--pixel); font-size: 0.8rem; color: var(--muted); text-align: center; padding: 20px; }

/* Free vs Pro */
table.plans { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--card); border: 2px solid var(--line); }
.plans th, .plans td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.plans th { font-family: var(--pixel); font-weight: 400; font-size: 0.85rem; color: var(--fish); }
.plans td.c { text-align: center; width: 90px; }
.yes { color: #6fe39a; }
.no { color: #5f7488; }

/* Docs layout */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0 80px; }
.toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 0.95rem; }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--fish); border-color: var(--fish); }
.toc b { display: block; font-family: var(--pixel); font-weight: 400; font-size: 0.8rem; color: var(--ink); margin: 16px 0 6px; }
.doc h1 + p + h2 { margin-top: 1.2em; }
.doc h2 { margin-top: 2.2em; padding-top: 0.6em; border-top: 2px solid var(--line); }
.doc h2:first-child { margin-top: 0; border-top: none; }
.doc h3 { margin-top: 1.6em; }
.doc .gif { max-width: 260px; margin: 16px 0; }
.doc .tip { background: #13212d; border-left: 4px solid var(--fish); padding: 10px 14px; margin: 14px 0; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .toc { position: static; max-height: none; } }

/* Footer */
footer { border-top: 2px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
footer a { color: var(--muted); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Hero phone: a drawn Pixel Fishy screen with the goldfish on the canvas. */
.phone { justify-self: center; width: 270px; height: 540px; border-radius: 38px; background: #05090c; padding: 12px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65), 0 0 0 2px var(--line); }
.phone .notch { position: absolute; top: 18px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: #222; transform: translateX(-50%); z-index: 2; }
.phone .screen { border-radius: 28px; overflow: hidden; height: 100%; background: #0e1820; display: flex; flex-direction: column; font: 11px/1 var(--body); color: var(--ink); }
.am-bar { display: flex; gap: 6px; align-items: center; padding: 10px; background: #172430; }
.am-bar span { width: 14px; height: 14px; border-radius: 3px; background: rgba(255,255,255,0.13); }
.am-bar span:first-child { background: var(--wave); }
.am-bar em { margin-left: auto; font-style: normal; opacity: 0.7; }
.am-canvas { flex: 1; display: grid; place-items: center; margin: 10px; border-radius: 4px; background-color: rgba(255,255,255,0.07);
  background-image: linear-gradient(45deg, rgba(0,0,0,.13) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.13) 75%),
    linear-gradient(45deg, rgba(0,0,0,.13) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.13) 75%);
  background-size: 18px 18px; background-position: 0 0, 9px 9px; }
.am-canvas img { width: 180px; animation: swim 4s ease-in-out infinite; }
.am-pal { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 0 10px; }
.am-pal i { aspect-ratio: 1; border-radius: 2px; border: 1px solid rgba(0,0,0,0.3); }
.am-tools { display: flex; justify-content: space-around; padding: 12px 10px 16px; }
.am-tools b { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--wave); opacity: 0.85; }
.am-tools b:first-child { background: var(--wave); }
.card .spr { margin-bottom: 12px; image-rendering: pixelated; }
@media (max-width: 800px) { .phone { order: -1; width: 220px; height: 440px; } .am-canvas img { width: 140px; } }
@media (prefers-reduced-motion: reduce) { .am-canvas img { animation: none; } }
