/* Inkmoor Labs: eldritch steampunk edition, in dark suede.
   Abyssal green-black and aubergine, tarnished brass fittings, a sickly chartreuse glow,
   occult sigils, watching eyes, and things with tentacles stirring below the fold.
   Headlines use IM Fell English (SIL Open Font License), hosted on this site in assets/fonts/,
   so no third-party font requests are made and the privacy promise still holds. Everything else uses system fonts. */

:root {
  --abyss: #0d0a0e;
  --abyss-2: #0c1210;
  --plum: #1f191f;
  --plum-2: #2a222a;
  --plum-3: #3e323e;
  --nap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --glow: #d4dc72;
  --glow-hi: #f2f5b0;
  --glow-lo: #7f8a2c;
  --brass-hi: #e3c47a;
  --brass: #b8913e;
  --brass-lo: #5e431a;
  --teal: #8fbfa8;
  --text: #ebe6c9;
  --muted: #b0a8bb;

  --brass-grad: linear-gradient(180deg, var(--brass-hi) 0%, var(--brass) 50%, var(--brass-lo) 100%);
  --glow-grad: linear-gradient(180deg, var(--glow-hi) 0%, var(--glow) 45%, var(--glow-lo) 100%);
  --rivet: radial-gradient(circle at 35% 35%, #f5e2ad 0 1.1px, var(--brass) 2px, var(--brass-lo) 3.4px, transparent 4px);

  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --heading: "IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
  --display: Copperplate, "Copperplate Gothic Light", "Iowan Old Style", Palatino, Georgia, serif;
  --type: "American Typewriter", "Courier New", Courier, monospace;
  --container: 1040px;
  --radius: 8px;
}

@font-face {
  font-family: "IM Fell English";
  src: url("assets/fonts/IMFellEnglish-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--abyss); }

body {
  position: relative;
  font-family: var(--font);
  font-size: 1.06rem;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--abyss);
  background-image:
    var(--nap),
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(66, 52, 68, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 45% at 0% 55%, rgba(50, 40, 52, 0.35), transparent 70%),
    radial-gradient(ellipse 60% 45% at 100% 80%, rgba(50, 40, 52, 0.35), transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 110%, rgba(18, 26, 22, 0.8), transparent 70%);
  background-attachment: fixed;
}

/* Drifting motes of witch-light, behind everything */
body::before {
  content: ""; position: fixed; inset: -10% 0 0 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(212, 220, 114, 0.6) 0 1.3px, transparent 2.2px),
    radial-gradient(circle, rgba(212, 220, 114, 0.3) 0 0.9px, transparent 1.6px),
    radial-gradient(circle, rgba(143, 191, 168, 0.4) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(212, 220, 114, 0.45) 0 1.6px, transparent 2.6px),
    radial-gradient(circle, rgba(190, 150, 220, 0.3) 0 1px, transparent 1.8px);
  background-size: 419px 367px, 263px 197px, 311px 449px, 607px 523px, 173px 229px;
  background-position: 37px 11px, 151px 93px, 211px 277px, 389px 151px, 71px 191px;
  animation: motes 70s linear infinite;
  opacity: 0.55;
}
@keyframes motes { to { background-position: 37px -356px, 151px -301px, 211px -621px, 389px -895px, 71px -267px; } }

/* Low fog that rolls along the bottom of the window */
body::after {
  content: ""; position: fixed; left: -20%; right: -20%; bottom: -40px; height: 40vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 30% 60% at 20% 100%, rgba(143, 191, 168, 0.08), transparent 70%),
    radial-gradient(ellipse 35% 55% at 70% 100%, rgba(143, 191, 168, 0.07), transparent 70%);
  animation: fog 40s ease-in-out infinite alternate;
}
@keyframes fog { to { transform: translateX(8%); } }

.site-header, main, .site-footer { position: relative; z-index: 1; }
main { flex: 1; }

a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--glow-hi); }

/* Headlines: antique letterpress. Copperplate stays on the logo, menu, buttons and labels. */
h1, h2, h3 { font-family: var(--heading); font-weight: 400; letter-spacing: 0; }

.container { width: 90%; max-width: var(--container); margin: 0 auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--glow); color: var(--abyss); padding: 0.5rem 1rem;
}
.skip-link:focus { left: 1rem; }

/* ---------- Header: aubergine panel on a tarnished brass rail ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--nap), linear-gradient(180deg, rgba(31, 25, 31, 0.98), rgba(16, 12, 16, 0.98));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(227, 196, 122, 0.35) inset, 0 8px 28px rgba(0, 0, 0, 0.6);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--brass-grad);
  box-shadow: 0 0 12px rgba(212, 220, 114, 0.25);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; min-height: 70px; gap: 1rem; }

.logo {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--text); text-decoration: none;
}
.logo img { width: 40px; height: 40px; filter: drop-shadow(0 0 6px rgba(212, 220, 114, 0.35)); transition: transform 0.9s ease, filter 0.4s; }
.logo:hover { color: var(--text); }
.logo:hover img { transform: rotate(-60deg); filter: drop-shadow(0 0 10px rgba(212, 220, 114, 0.7)); }
.logo .wordmark { color: var(--text); }
.logo .wordmark span { color: var(--glow); text-shadow: 0 0 10px rgba(212, 220, 114, 0.45); }

.nav ul { list-style: none; display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-family: var(--display); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--glow); text-shadow: 0 0 10px rgba(212, 220, 114, 0.5); }
.nav a.btn-primary { color: var(--glow-hi); padding: 0.45rem 1.1rem; }
.nav a.btn-primary:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.2s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-1px); }
/* Bright button: a lit outline. Same build as the dark button, with an olive wash and glowing letters */
.btn-primary {
  color: var(--glow-hi);
  background: linear-gradient(180deg, rgba(163, 160, 70, 0.32), rgba(100, 98, 40, 0.28));
  border: 1px solid #a3a046;
  text-shadow: 0 0 8px rgba(212, 220, 114, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 220, 0.15), 0 6px 14px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, rgba(163, 160, 70, 0.45), rgba(100, 98, 40, 0.4)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 16px rgba(212, 220, 114, 0.3); }
.btn-primary:active { transform: translateY(1px); }
/* Dark button: a thin olive-brass edge on suede */
.btn-secondary {
  color: var(--text);
  border: 1px solid #a3a046;
  background: var(--nap), linear-gradient(180deg, rgba(58, 46, 58, 0.55), rgba(31, 25, 31, 0.9));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 6px 14px rgba(0, 0, 0, 0.4);
}
.btn-secondary:hover { color: var(--glow-hi); border-color: #cfd27a; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 16px rgba(212, 220, 114, 0.25); }

/* ---------- Hero: a slowly turning sigil, brass gears, and something rising from the deep ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 13vw, 9rem) 0 clamp(6rem, 12vw, 9rem);
  text-align: center;
}
.hero::before {
  /* the sigil */
  content: ""; position: absolute; pointer-events: none;
  width: min(760px, 130vw); aspect-ratio: 1; left: 50%; top: 50%;
  margin-left: calc(min(760px, 130vw) / -2); margin-top: calc(min(760px, 130vw) / -2);
  background: url("assets/sigil.svg") center / contain no-repeat;
  opacity: 0.13;
  filter: drop-shadow(0 0 6px rgba(212, 220, 114, 0.8));
  animation: spin 240s linear infinite;
}
.hero::after {
  /* tentacles rising at both edges */
  content: ""; position: absolute; pointer-events: none; left: 0.5%; right: 0.5%; bottom: -14px; height: clamp(240px, 36vw, 400px);
  background:
    url("assets/tentacle-l.svg") left bottom / auto 100% no-repeat,
    url("assets/tentacle-r.svg") right bottom / auto 100% no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(40, 32, 40, 0.9));
  transform-origin: 50% 100%;
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { from { transform: skewX(-2deg); } to { transform: skewX(2.5deg) translateY(6px); } }

.hero .container { position: relative; z-index: 1; }
.hero .container::before, .hero .container::after {
  /* tarnished brass gears */
  content: ""; position: absolute; z-index: -1; pointer-events: none; opacity: 0.28;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23e3c47a'/%3E%3Cstop offset='.5' stop-color='%23b8913e'/%3E%3Cstop offset='1' stop-color='%235e431a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='43' fill='none' stroke='url(%23b)' stroke-width='12' stroke-dasharray='9.6 7.28'/%3E%3Ccircle cx='50' cy='50' r='38' fill='none' stroke='url(%23b)' stroke-width='6'/%3E%3Cg stroke='url(%23b)' stroke-width='6'%3E%3Cpath d='M50 14v72M14 50h72M24.5 24.5l51 51M75.5 24.5l-51 51'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='12' fill='url(%23b)'/%3E%3Ccircle cx='50' cy='50' r='4.5' fill='%230c1210'/%3E%3C/svg%3E");
}
.hero .container::before { width: 170px; height: 170px; left: -40px; top: -90px; animation: spin 50s linear infinite; }
.hero .container::after { width: 110px; height: 110px; left: 100px; top: -55px; animation: spin 32s linear infinite reverse; }

.eyebrow {
  display: inline-block;
  font: 0.8rem/1 var(--type);
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--glow);
  text-shadow: 0 0 8px rgba(212, 220, 114, 0.5);
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  margin-bottom: 1.5rem;
}
.eyebrow::before, .eyebrow::after { content: "\25C8"; color: var(--brass); text-shadow: none; margin: 0 0.7em; }

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.2rem);
  line-height: 1.12;
  max-width: 14em;
  margin: 0 auto 1.2rem;
  color: var(--text);
  text-shadow: 0 2px 0 #050806, 0 0 18px rgba(212, 220, 114, 0.2), 0 0 60px rgba(40, 32, 40, 0.9);
}

.hero p.lede {
  font-size: clamp(1.08rem, 2.4vw, 1.32rem);
  font-style: italic;
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 2.4rem;
}

.actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Section dividers: a brass rail watched by a single eye ---------- */
.section { position: relative; padding: clamp(3.4rem, 8vw, 5.4rem) 0; }
.section + .section::before,
.hero + .section::before {
  content: ""; position: absolute; top: 0; left: 6%; right: 6%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass) 12%, var(--brass-hi) 50%, var(--brass) 88%, transparent);
  box-shadow: 0 0 10px rgba(212, 220, 114, 0.25);
}
.section + .section::after,
.hero + .section::after {
  content: ""; position: absolute; top: -15px; left: 50%; width: 64px; height: 32px; margin-left: -32px;
  background: url("assets/eye.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(212, 220, 114, 0.6));
  animation: blink 9s infinite;
  transform-origin: 50% 50%;
}
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.08); } }

.section-title {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  color: var(--text);
  margin-bottom: 0.4rem;
}
.section-title::after {
  content: ""; display: block; width: 110px; height: 2px; margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--glow), rgba(212, 220, 114, 0));
  box-shadow: 0 0 8px rgba(212, 220, 114, 0.5);
}

.section-subtitle { color: var(--muted); font-style: italic; font-size: 1.1rem; margin-bottom: 2.4rem; max-width: 40em; }

/* ---------- Cards: riveted aubergine panels with a double bezel ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

.card {
  position: relative;
  color: var(--text);
  background:
    var(--nap),
    linear-gradient(180deg, var(--plum-2), var(--plum) 60%, #151115);
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem 1.7rem;
  box-shadow:
    inset 0 0 0 3px #141014,
    inset 0 0 0 4px rgba(227, 196, 122, 0.35),
    inset 0 0 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px #080608,
    0 12px 28px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.3s, transform 0.2s;
}
.card::before {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  background: var(--rivet) top left / 9px 9px no-repeat, var(--rivet) top right / 9px 9px no-repeat,
              var(--rivet) bottom left / 9px 9px no-repeat, var(--rivet) bottom right / 9px 9px no-repeat;
}
.card:hover {
  box-shadow:
    inset 0 0 0 3px #141014,
    inset 0 0 0 4px rgba(212, 220, 114, 0.55),
    inset 0 0 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px #080608,
    0 0 26px rgba(212, 220, 114, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.55);
}
.card h3 { font-size: 1.42rem; line-height: 1.25; margin-bottom: 0.45rem; color: var(--brass-hi); }
.card p { color: var(--muted); font-size: 1rem; }
.card .icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #2a3418, #0c1210 70%);
  border: 3px solid var(--brass);
  box-shadow: 0 0 0 1px #080608, 0 0 8px rgba(212, 220, 114, 0.18), inset 0 0 8px rgba(212, 220, 114, 0.15);
  color: var(--glow);
  margin-bottom: 1.1rem;
}
.card .icon svg { width: 22px; height: 22px; filter: drop-shadow(0 0 3px rgba(212, 220, 114, 0.7)); }

.product-card { display: flex; gap: 1.3rem; align-items: center; }
.product-card .badge {
  display: inline-block;
  font: 0.72rem/1 var(--type);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--glow-hi);
  background: linear-gradient(180deg, rgba(163, 160, 70, 0.32), rgba(100, 98, 40, 0.28));
  border: 1px solid #a3a046;
  text-shadow: 0 0 6px rgba(212, 220, 114, 0.5);
  padding: 0.38rem 0.65rem;
  border-radius: 2px;
  margin-bottom: 0.55rem;
}
.placeholder-icon {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  border: 2px dashed var(--brass);
  display: grid; place-items: center; color: var(--muted);
}

.btn-disabled { border: 1px dashed var(--brass); color: var(--muted); cursor: default; }
.btn-disabled:hover { transform: none; }

.product-link { color: var(--text); text-decoration: none; }
.product-link:hover { color: var(--text); transform: translateY(-3px); }
.product-icon {
  flex: none; width: 76px; height: 76px; border-radius: 18px;
  border: 3px solid var(--brass);
  box-shadow: 0 0 0 1px #080608, 0 0 18px rgba(212, 220, 114, 0.25), 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* ---------- App pages ---------- */
.app-hero .app-icon {
  display: block;
  width: 124px; height: 124px;
  margin: 0 auto 1.6rem;
  border-radius: 28px;
  border: 4px solid var(--brass);
  box-shadow: 0 0 0 2px #080608, 0 0 0 8px rgba(58, 46, 58, 0.8), 0 0 40px rgba(212, 220, 114, 0.35), 0 16px 40px rgba(0, 0, 0, 0.7);
}

.screens {
  display: flex; gap: 1.8rem; justify-content: center;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 1rem 0.6rem 1.2rem;
}
.screens figure { flex: 0 0 auto; width: min(240px, 62vw); scroll-snap-align: center; text-align: center; }
.screens img {
  width: 100%; height: auto;
  border-radius: 30px;
  border: 6px solid var(--brass);
  box-shadow: 0 0 0 2px #080608, inset 0 0 0 1px var(--brass-hi), 0 0 28px rgba(212, 220, 114, 0.18), 0 16px 34px rgba(0, 0, 0, 0.7);
}
.screens figcaption {
  font: 0.85rem/1.3 var(--type);
  letter-spacing: 0.08em;
  color: var(--glow);
  margin-top: 0.9rem;
}
@media (max-width: 760px) { .screens { justify-content: flex-start; } }

.eyebrow a { color: inherit; text-decoration: none; }

/* ---------- Long-form pages: an aubergine folio in a brass frame ---------- */
.prose { max-width: 46em; }
.section > .prose {
  position: relative;
  background:
    var(--nap),
    linear-gradient(180deg, rgba(42, 34, 42, 0.94), rgba(24, 19, 24, 0.96));
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 3.2rem);
  box-shadow:
    inset 0 0 0 4px #141014,
    inset 0 0 0 5px rgba(227, 196, 122, 0.3),
    inset 0 0 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px #080608,
    0 16px 36px rgba(0, 0, 0, 0.6);
}
.section > .prose::before {
  content: ""; position: absolute; inset: 12px; pointer-events: none;
  background: var(--rivet) top left / 9px 9px no-repeat, var(--rivet) top right / 9px 9px no-repeat,
              var(--rivet) bottom left / 9px 9px no-repeat, var(--rivet) bottom right / 9px 9px no-repeat;
}
.prose h1 { font-size: clamp(2.2rem, 5.6vw, 3.1rem); line-height: 1.15; margin-bottom: 0.6rem; color: var(--text); text-shadow: 0 0 22px rgba(212, 220, 114, 0.25); }
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 0.5rem; color: var(--brass-hi); }
.prose .section-title { color: var(--text); }
.prose h3 { font-size: 1.25rem; margin: 1.4rem 0 0.3rem; color: var(--brass-hi); }
.prose p, .prose li { margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li::marker { color: var(--glow); }
.prose strong { color: var(--text); }
.prose .meta { color: var(--muted); font-style: italic; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  font-size: 0.95rem;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(31, 25, 31, 0.92), rgba(12, 18, 16, 0.98));
  box-shadow: inset 0 2px 0 var(--brass-lo), inset 0 3px 0 rgba(227, 196, 122, 0.4);
}
.footer-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 2rem; }
.site-footer p { font-family: var(--display); letter-spacing: 0.08em; }
.site-footer ul { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--glow); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .nav ul { gap: 1rem; }
  .nav .hide-sm { display: none; }
  .logo { font-size: 1.02rem; }
  .logo img { width: 34px; height: 34px; }
  .hero .container::before { width: 120px; height: 120px; left: -50px; top: -70px; }
  .hero .container::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, body::after, .hero::before, .hero::after,
  .hero .container::before, .hero .container::after,
  .section + .section::after, .hero + .section::after { animation: none; }
  .btn, .logo img, .card { transition: none; }
}
