/* polygonsheep.com — one stylesheet, no build step, no third-party requests. */

:root {
  --bg: #0a0c11;
  --bg-2: #0e1118;
  --surface: #131722;
  --surface-2: #1a1f2c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eceff6;
  --text-2: #b4bccc;
  --muted: #8a93a6;
  --brand: #8ea2ff;
  --brand-2: #b38bff;

  --stealth: #3aa0ff;
  --sketchy: #e6ab6f;
  --mousing: #c98bff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 17, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font: 600 1.15rem/1 var(--font-display); letter-spacing: -0.01em; color: var(--text-2); }
.brand-name b { color: var(--text); font-weight: 750; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none; color: var(--text-2); font-size: 0.95rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.site-nav .nav-contact { margin-left: 6px; border: 1px solid var(--line-strong); }

.menu-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; margin-right: -8px; cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 18px;
    background: rgba(10, 12, 17, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 1.05rem; }
  .site-nav .nav-contact { margin: 6px 0 0; text-align: center; }
}

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 0.98rem/1 var(--font); text-decoration: none;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--text); color: #0b0d12; }
.btn-primary:hover { box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.45); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }
.btn-accent { background: var(--accent); color: #07090d; }
.btn-accent:hover { box-shadow: 0 12px 34px -12px var(--accent); }
.btn small { font-weight: 500; opacity: 0.65; }

.store-badge { display: inline-block; line-height: 0; transition: transform .15s, opacity .15s; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge img { height: 52px; width: auto; }
.store-badge-soon {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px;
  border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 0.95rem;
}
.store-badge-soon b { color: var(--text); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.78rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent, var(--brand));
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.pill {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 5px 11px; border-radius: 999px; color: var(--accent, var(--text-2));
  background: color-mix(in srgb, var(--accent, #fff) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #fff) 28%, transparent);
}

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-2); line-height: 1.55; max-width: 38em; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(80px, 13vw, 150px) 0 clamp(70px, 10vw, 120px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 140%; z-index: -2;
  background:
    radial-gradient(40% 50% at 18% 30%, rgba(58, 160, 255, 0.20), transparent 70%),
    radial-gradient(35% 45% at 82% 25%, rgba(201, 139, 255, 0.18), transparent 70%),
    radial-gradient(40% 40% at 60% 70%, rgba(230, 171, 111, 0.10), transparent 70%);
  filter: blur(10px);
  mask-image: linear-gradient(#000 45%, transparent 75%);
  -webkit-mask-image: linear-gradient(#000 45%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("/assets/img/mesh.svg") center / 1400px auto no-repeat;
  opacity: 0.55;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 85%);
}
.hero h1 { max-width: 13em; }
.gradient-text {
  background: linear-gradient(100deg, var(--stealth) 0%, var(--brand-2) 55%, var(--sketchy) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-apps { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.hero-app {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 10px 18px 10px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  transition: border-color .15s, background .15s, transform .15s;
}
.hero-app:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.hero-app img, .hero-app .icon-stealth { width: 44px; height: 44px; border-radius: 11px; }
.hero-app span { display: grid; line-height: 1.25; }
.hero-app b { font-weight: 600; font-size: 0.98rem; }
.hero-app small { color: var(--muted); font-size: 0.82rem; }

.icon-stealth {
  display: grid; place-items: center; background: linear-gradient(145deg, #23314a, #0f1522);
  border: 1px solid rgba(58, 160, 255, 0.35);
}
.icon-stealth svg { width: 60%; height: 60%; }

/* ---------- Sections ---------- */

.section { padding: clamp(70px, 9vw, 120px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-alt { background: var(--bg-2); }

/* Product feature rows on the home page */
.product {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center;
}
.product + .product { margin-top: clamp(90px, 12vw, 150px); }
.product.flip .product-media { order: -1; }
.product-icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 22px; box-shadow: 0 14px 40px -14px var(--accent); }
.product h2 { margin-bottom: 0.35em; }
.product .tagline { color: var(--accent); font-weight: 600; font-size: 1.05rem; margin-bottom: 1em; }
.product p { color: var(--text-2); }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.product .actions { margin-top: 30px; }
.product-media { position: relative; }
.product-media::before {
  content: ""; position: absolute; inset: 8% 6%; z-index: -1; border-radius: 50%;
  background: var(--accent); opacity: 0.22; filter: blur(70px);
}

@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .product.flip .product-media { order: 0; }
}

.frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); background: var(--surface);
}
.frame-window { padding-top: 30px; position: relative; background: #1b1f29; }
.frame-window::before {
  content: ""; position: absolute; top: 11px; left: 14px; width: 9px; height: 9px; border-radius: 50%;
  background: #ff5f57; box-shadow: 15px 0 0 #febc2e, 30px 0 0 #28c840;
}

/* Phone stack for Mousing Around */
.phones { display: flex; justify-content: center; align-items: center; gap: 0; padding: 10px 0; }
.phone {
  width: 37%; border-radius: 30px; overflow: hidden; border: 6px solid #1f2430;
  box-shadow: var(--shadow); background: #000; flex: none;
}
.phone img { width: 100%; }
.phones .phone:nth-child(1) { transform: translateX(14%) rotate(-6deg) scale(0.88); opacity: 0.85; }
.phones .phone:nth-child(2) { position: relative; z-index: 2; }
.phones .phone:nth-child(3) { transform: translateX(-14%) rotate(6deg) scale(0.88); opacity: 0.85; }

/* Sketchy illustration (no screenshots yet) */
.sketchy-art {
  aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(80% 80% at 50% 40%, #2a2219, #15120f);
}
.sketchy-art svg { width: 78%; height: auto; }

/* ---------- Product page ---------- */

.page-hero { padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: -30% -20% auto; height: 130%; z-index: -1;
  background: radial-gradient(45% 55% at 25% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
}
.page-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }
.page-hero .product-icon { width: 88px; height: 88px; border-radius: 22px; }
.page-hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.feature-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-bottom: 0.4em; }
.feature p { color: var(--text-2); font-size: 0.97rem; margin: 0; }

.checklist { columns: 2; column-gap: 40px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 700px) { .checklist { columns: 1; } }
.checklist li { break-inside: avoid; position: relative; padding: 9px 0 9px 30px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* Screenshot gallery */
.gallery {
  display: grid; grid-auto-flow: column; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 22px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.gallery.wide { grid-auto-columns: min(78%, 720px); }
.gallery.tall { grid-auto-columns: min(46%, 250px); }
.gallery button {
  scroll-snap-align: start; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface); cursor: zoom-in; transition: border-color .15s, transform .15s;
}
.gallery.tall button { border-radius: 22px; }
.gallery button:hover { border-color: var(--accent); }
.gallery img { width: 100%; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh;
}
.lightbox::backdrop { background: rgba(5, 6, 9, 0.88); backdrop-filter: blur(6px); }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; border-radius: 12px; }
.lightbox form { position: fixed; top: 16px; right: 16px; }
.lightbox button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(20, 24, 33, 0.9); color: var(--text); font-size: 22px; cursor: pointer;
}

/* Download cards */
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .downloads { grid-template-columns: 1fr; } }
.download {
  display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  transition: border-color .15s, transform .15s, background .15s;
}
.download:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.download-os { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,0.06); flex: none; }
.download-os svg { width: 26px; height: 26px; fill: var(--text); }
.download b { display: block; font-size: 1.1rem; }
.download small { color: var(--muted); }
.download .arrow { margin-left: auto; color: var(--accent); }
.download .arrow svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fineprint { color: var(--muted); font-size: 0.9rem; margin-top: 18px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 26px; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details p { color: var(--text-2); padding-bottom: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.media-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* CTA band */
.cta {
  border-radius: 28px; padding: clamp(36px, 6vw, 64px); text-align: center; position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line);
}
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 90% at 50% 0%, color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent), transparent 70%);
}
.cta p { color: var(--text-2); max-width: 34em; margin-left: auto; margin-right: auto; }
.cta .actions { justify-content: center; }

/* ---------- Prose (privacy) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--brand); text-underline-offset: 3px; }
.prose strong { color: var(--text); }

.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 10px; }
.toc a { text-decoration: none; }

.summary-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0; }
@media (max-width: 600px) { .summary-cards { grid-template-columns: 1fr; } }
.summary-card { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.summary-card b { display: block; margin-bottom: 4px; }
.summary-card span { color: var(--text-2); font-size: 0.93rem; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 100px;
}
.contact-card:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.contact-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.contact-card header img, .contact-card header .icon-stealth { width: 48px; height: 48px; border-radius: 12px; }
.contact-card h2 { font-size: 1.25rem; margin: 0; }
.contact-card p, .contact-card li { color: var(--text-2); font-size: 0.96rem; }
.contact-card ul { padding-left: 1.1em; margin: 0 0 1.2em; }
.contact-card .btn { margin-top: auto; align-self: flex-start; }

.email-block {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 40px;
}
.email-block a.email { font: 600 clamp(1.2rem, 2.6vw, 1.6rem)/1.2 var(--font-display); text-decoration: none; letter-spacing: -0.01em; }
.email-block a.email:hover { color: var(--brand); }
.email-block p { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }

address { font-style: normal; color: var(--text-2); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand p { color: var(--muted); margin: 14px 0 0; max-width: 22em; font-size: 0.95rem; }
.footer-nav { display: flex; gap: 64px; }
.footer-nav h2 { font: 600 0.78rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 16px; }
.footer-nav a { display: block; text-decoration: none; color: var(--text-2); padding: 4px 0; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-legal {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.footer-legal .build { font-family: var(--mono); font-size: 0.78rem; opacity: 0.7; }
@media (max-width: 600px) { .footer-nav { gap: 40px; } }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Per-product accent */
[data-accent="stealth"] { --accent: var(--stealth); }
[data-accent="sketchy"] { --accent: var(--sketchy); }
[data-accent="mousing"] { --accent: var(--mousing); }
