/* Dyke Pole: Legends pages — shared styles (from the Pulse pages) */
:root {
  --bg: #0b0a1f;
  --bg2: #15123a;
  --text: #f4f3ff;
  --muted: rgba(236, 233, 255, 0.66);
  --faint: rgba(236, 233, 255, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.055);
  --indigo: #7c6cff;
  --violet: #b06cff;
  --pink: #ff6cb5;
  --cyan: #5ad7ff;
  --green: #4ce3a6;
  --orange: #ffb35a;
  --grad: linear-gradient(120deg, var(--cyan), var(--indigo) 45%, var(--pink));
  --radius: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Ambient background, like the app's drifting glows */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 90% at 10% 0%, #241a5e 0%, transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg) 70%); }
.ambient i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .45; }
.ambient i:nth-child(1) { background: #5b3cff; top: -25vmax; left: -15vmax; animation: drift1 22s ease-in-out infinite; }
.ambient i:nth-child(2) { background: #c23c9e; top: 10vmax; right: -25vmax; opacity: .3; animation: drift2 26s ease-in-out infinite; }
.ambient i:nth-child(3) { background: #1d8fd6; bottom: -30vmax; left: 20vmax; opacity: .28; animation: drift1 30s ease-in-out infinite reverse; }
@keyframes drift1 { 50% { transform: translate(6vmax, 5vmax) scale(1.08); } }
@keyframes drift2 { 50% { transform: translate(-7vmax, 4vmax) scale(.94); } }
@media (prefers-reduced-motion: reduce) { .ambient i { animation: none; } }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 24px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(11, 10, 31, .55); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.brand small { color: var(--faint); font-weight: 500; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 7px 12px; border-radius: 10px; transition: background .2s, color .2s; }
.topbar nav a:hover { color: var(--text); background: var(--glass); }
.topbar nav a[aria-current="page"] { color: var(--text); background: rgba(124, 108, 255, .2); }
@media (max-width: 720px) {
  .topbar .wrap { height: auto; padding-block: 10px; flex-wrap: wrap; }
  .topbar nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid var(--line); background: var(--glass); transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .09); }
.btn.primary { border: 0; background: var(--grad); box-shadow: 0 10px 30px -8px rgba(124, 108, 255, .7); }
.btn.primary:hover { box-shadow: 0 14px 38px -8px rgba(176, 108, 255, .85); }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { padding-block: 84px 40px; text-align: center; }
.hero .icon { width: 132px; height: 132px; margin: 0 auto 26px; filter: drop-shadow(0 18px 40px rgba(124, 108, 255, .55)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; }
.hero h1 .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 18px auto 0; max-width: 640px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); }
.hero .actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 13px; color: var(--faint); }
.pills { margin-top: 26px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { font-size: 12.5px; color: var(--muted); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); }

/* macOS window frame for screenshots */
.window { position: relative; border-radius: 14px; overflow: hidden; background: #1b1934;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 120px -30px rgba(124, 108, 255, .55); }
.window img { width: 100%; height: auto; }
.showcase { margin-top: 56px; perspective: 1800px; }
.showcase .window { transform: rotateX(8deg) scale(.98); transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.showcase:hover .window { transform: none; }
.float-card { position: absolute; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 60px -16px rgba(0, 0, 0, .8); }
.showcase { position: relative; }
.showcase .fc-menu { width: 21%; right: -3%; top: 8%; }
.showcase .fc-rules { width: 22%; left: -3%; bottom: 10%; }
@media (max-width: 860px) { .float-card { display: none; } }

/* Sections */
section.block { padding-block: 84px; }
.label { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--cyan); font-weight: 600; }
h2.title { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -.025em; margin-top: 10px; max-width: 780px; }
p.sub { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 680px; }

/* Feature grid */
.grid { margin-top: 40px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { position: relative; padding: 24px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: transform .25s, border-color .25s; text-decoration: none; display: block; }
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .2); }
.card h3 { font-size: 18px; margin-top: 14px; letter-spacing: -.01em; }
.card p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.badge svg { width: 22px; height: 22px; }
.b-violet { background: linear-gradient(135deg, #8f7bff, #5b4bdb); }
.b-cyan { background: linear-gradient(135deg, #6fe0ff, #3a8ff0); }
.b-pink { background: linear-gradient(135deg, #ff86c8, #c04bd6); }
.b-orange { background: linear-gradient(135deg, #ffbf6b, #ff6c7a); }
.b-green { background: linear-gradient(135deg, #63f0b4, #24b3b0); }
.b-blue { background: linear-gradient(135deg, #7aa8ff, #6a5bff); }

/* Alternating feature rows with screenshots */
.row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 56px; align-items: center; margin-top: 90px; }
.row.flip { grid-template-columns: 1.35fr 1fr; }
.row.flip .text { order: 2; }
.row h3 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin-top: 10px; line-height: 1.15; }
.row p { margin-top: 12px; color: var(--muted); font-size: 16.5px; }
.row ul { margin-top: 16px; list-style: none; display: grid; gap: 9px; }
.row li { padding-left: 26px; position: relative; color: var(--muted); }
.row li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.row .more { display: inline-block; margin-top: 18px; color: var(--cyan); text-decoration: none; font-weight: 600; }
.row .more:hover { text-decoration: underline; }
@media (max-width: 860px) { .row, .row.flip { grid-template-columns: 1fr; gap: 28px; margin-top: 64px; } .row.flip .text { order: 0; } }

/* Skins: the screenshot gallery with tinted glows */
.skins { margin-top: 40px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.skin { border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); background: var(--glass); text-decoration: none; transition: transform .3s; }
.skin:hover { transform: translateY(-4px) rotate(-.3deg); }
.skin .window { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 20px 50px -18px rgba(0, 0, 0, .8), 0 0 80px -20px var(--glow, rgba(124, 108, 255, .6)); }
.skin figcaption { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; }
.skin figcaption span { color: var(--faint); font-weight: 400; font-size: 14px; }
.skin.violet { --glow: rgba(124, 108, 255, .7); background: linear-gradient(160deg, rgba(124, 108, 255, .16), rgba(255, 255, 255, .03)); }
.skin.cyan { --glow: rgba(90, 215, 255, .6); background: linear-gradient(160deg, rgba(90, 215, 255, .14), rgba(255, 255, 255, .03)); }
.skin.pink { --glow: rgba(255, 108, 181, .6); background: linear-gradient(160deg, rgba(255, 108, 181, .14), rgba(255, 255, 255, .03)); }
.skin.orange { --glow: rgba(255, 179, 90, .55); background: linear-gradient(160deg, rgba(255, 179, 90, .13), rgba(255, 255, 255, .03)); }
.skin.green { --glow: rgba(76, 227, 166, .55); background: linear-gradient(160deg, rgba(76, 227, 166, .13), rgba(255, 255, 255, .03)); }

/* Lightbox (CSS-only, via :target) */
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 24px; background: rgba(5, 4, 18, .86); backdrop-filter: blur(8px); }
.lightbox:target { display: grid; }
.lightbox img { max-height: 88vh; width: auto; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
.lightbox .close { position: absolute; inset: 0; }

/* CTA */
.cta { text-align: center; padding: 56px 28px; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(80% 120% at 50% 0%, rgba(124, 108, 255, .35), transparent 70%), var(--glass); }
.cta h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.cta p { color: var(--muted); margin: 10px auto 26px; max-width: 560px; }

/* Docs pages */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding-block: 56px 90px; }
.doc aside { position: sticky; top: 84px; align-self: start; }
.doc aside p { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 8px; }
.doc aside a { display: block; text-decoration: none; color: var(--muted); font-size: 14.5px; padding: 6px 10px; border-radius: 8px; }
.doc aside a:hover { background: var(--glass); color: var(--text); }
.doc article { min-width: 0; max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -.03em; line-height: 1.1; }
.doc .intro { margin-top: 12px; font-size: 18px; color: var(--muted); }
.doc h2 { font-size: 25px; letter-spacing: -.015em; margin-top: 52px; padding-top: 8px; scroll-margin-top: 80px; }
.doc h3 { font-size: 18px; margin-top: 28px; }
.doc p, .doc li { color: var(--muted); font-size: 16px; }
.doc p { margin-top: 12px; }
.doc ul, .doc ol { margin-top: 12px; padding-left: 22px; display: grid; gap: 6px; }
.doc strong { color: var(--text); }
.doc code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.doc pre { margin-top: 14px; overflow-x: auto; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.doc pre code { background: none; padding: 0; }
.doc figure { margin-top: 22px; }
.doc figure .window { max-width: 100%; }
.doc figcaption { margin-top: 10px; font-size: 13.5px; color: var(--faint); }
.doc .narrow { max-width: 340px; }
.callout { margin-top: 20px; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(90, 215, 255, .3); background: rgba(90, 215, 255, .08); }
.callout.warn { border-color: rgba(255, 179, 90, .35); background: rgba(255, 179, 90, .08); }
.callout p { margin-top: 0; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.doc th { color: var(--text); font-weight: 600; }
details { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); padding: 4px 18px; }
details summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--text); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--faint); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 14px; }
.next { margin-top: 56px; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; gap: 20px; } .doc aside { position: static; display: flex; flex-wrap: wrap; gap: 2px; } .doc aside p { width: 100%; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 30px 40px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; margin-left: 16px; }
footer a:first-child { margin-left: 0; }
footer a:hover { color: var(--text); }

/* Dyke Pole palette: night steppe, embers and gold */
:root { --bg: #120d14; --bg2: #24131c; --indigo: #d9a441; --violet: #e0733a; --pink: #c8372d; --cyan: #f2d27a;
  --grad: linear-gradient(120deg, #f2d27a, #d9a441 45%, #c8372d); }
.ambient { background: radial-gradient(120% 90% at 10% 0%, #4a1f1c 0%, transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg) 70%); }
.ambient i:nth-child(1) { background: #a8402a; }
.ambient i:nth-child(2) { background: #b8862c; }
.ambient i:nth-child(3) { background: #5a2a4a; }
.hero .icon { border-radius: 28px; filter: drop-shadow(0 18px 40px rgba(217, 164, 65, .45)); }
.topbar .brand img { border-radius: 7px; }
.btn.primary { color: #1b1210; box-shadow: 0 10px 30px -8px rgba(217, 164, 65, .6); }
.btn.primary:hover { box-shadow: 0 14px 38px -8px rgba(224, 115, 58, .8); }
.phones { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.phones img { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
@media (max-width: 720px) { .phones { grid-template-columns: repeat(2, 1fr); } }
.langs { margin-top: 10px; font-size: 14px; color: var(--faint); }
.langs a { color: var(--muted); }
