/* ==========================================================================
   Stoiber Software LLC — styles.css
   Dark only. Motion uses transforms + opacity. Reduced motion honoured.
   ========================================================================== */

/* ---------- Font (self-hosted; Bricolage Grotesque, SIL Open Font License) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0B0D0F;
  --surface: #14181B;
  --surface-2: #1B2024;
  --text: #ECEAE3;
  --text-soft: #C8C6BE;
  --muted: #9C9B93;
  --accent: #5FB3B4;
  --accent-bright: #7CC5C6;
  --accent-deep: #3E7B7C;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

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

html {
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--bg); }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
strong { font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 200;
  padding: 10px 14px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-weight: 700;
  transform: translateY(-300%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; outline-color: var(--text); }

/* ---------- Placeholder badge (auto-disappears once hrefs are real) ---------- */
a[href^="["]::after,
a[href^="mailto:["]::after {
  content: "placeholder";
  display: inline-block; margin-left: 0.6em; padding: 0.2em 0.55em;
  border-radius: 999px; background: #E3B341; color: #0B0D0F;
  font-size: 0.62em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  vertical-align: middle; line-height: 1.4;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  pointer-events: none; display: none;
}
.js .progress { display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 13, 15, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand__mark { flex: none; border-radius: 7px; transition: transform 0.35s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__mark text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
/* Below 420px the wordmark cannot sit beside three nav links; keep it for assistive tech, hide it visually. */
@media (max-width: 419px) {
  .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

.site-nav ul { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a {
  position: relative; display: inline-block; padding: 6px 0;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--text-soft);
}
.site-nav a::after,
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right center;
  transition: transform 0.4s var(--ease-out);
}
.site-nav a:hover, .site-nav a:focus-visible,
.text-link:hover, .text-link:focus-visible { color: var(--text); }
.site-nav a:hover::after, .site-nav a:focus-visible::after,
.text-link:hover::after, .text-link:focus-visible::after {
  transform: scaleX(1); transform-origin: left center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0.005em;
  text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.22s var(--ease-out), background-color 0.22s, border-color 0.22s, color 0.22s, box-shadow 0.22s;
}
.btn:active { transform: scale(0.96); transition-duration: 0.08s; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover {
  background: var(--accent-bright); color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -12px rgba(95, 179, 180, 0.7);
}
.btn-primary:active { transform: scale(0.96); box-shadow: none; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); color: var(--text);
  transform: translateY(-1px);
}
.btn-ghost:active { transform: scale(0.96); }

.btn--pending { cursor: default; color: var(--text-soft); }
.btn--pending:hover, .btn--pending:active { transform: none; background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); }

.text-link { position: relative; font-size: 14px; font-weight: 600; color: var(--text-soft); padding-bottom: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: grid; align-items: center;
  min-height: min(calc(100vh - var(--header-h)), 860px);
  min-height: min(calc(100svh - var(--header-h)), 860px);
  padding: clamp(64px, 11vh, 128px) 0 clamp(48px, 7vh, 80px);
}
.hero::after { /* static teal hairlines: shown without JS or with reduced motion */
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(rgba(95, 179, 180, 0.13) 0 1px, transparent 1px 54px);
  background-position: 0 27px;
}
.hero.has-field::after { display: none; }
.hero-field { position: absolute; z-index: -1; inset: 0; pointer-events: none; }

.hero-title {
  font-size: clamp(2.2rem, 10.6vw, 6rem);
  font-weight: 750; line-height: 1.02; letter-spacing: -0.035em;
  color: var(--text);
}
.hero-title__text { display: inline; }

.hero-cycle {
  margin-top: 0.4rem; min-height: 1.15em;
  font-size: clamp(1.25rem, 5.6vw, 3.25rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--muted);
}

.caret {
  display: inline-block; width: 0.07em; height: 0.92em; margin-left: 0.08em;
  vertical-align: -0.06em; border-radius: 2px; background: var(--accent);
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero.is-typing .caret { animation: none; opacity: 1; }
.hero-cycle .caret { display: none; height: 0.9em; }
.js .hero.is-cycling .hero-cycle .caret { display: inline-block; }
.hero.is-cycling .hero-title .caret { display: none; }

.hero-tagline {
  margin-top: clamp(22px, 3vw, 30px); max-width: 38ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--text-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero: JS-gated entrance states (with a CSS fallback if script.js never runs) */
.js .hero-title__text { opacity: 0; }
.js .hero.is-typing .hero-title__text,
.js .hero.is-typed .hero-title__text { opacity: 1; }
.js .hero-cycle, .js .hero-tagline, .js .hero-actions {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.js .hero.is-typed .hero-cycle, .js .hero.is-typed .hero-tagline,
.js .hero.is-typed .hero-actions { opacity: 1; transform: none; }
.js .hero.is-typed .hero-actions { transition-delay: 0.12s; }

/* ---------- Scroll reveals ---------- */
.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* If the inline "js" class was added but script.js failed to load, show everything after 3.5s. */
.js .reveal, .js .hero-title__text, .js .hero-cycle, .js .hero-tagline, .js .hero-actions {
  animation: js-fallback 1ms linear 3.5s forwards;
}
.js-ready .reveal, .js-ready .hero-title__text, .js-ready .hero-cycle,
.js-ready .hero-tagline, .js-ready .hero-actions { animation: none; }
@keyframes js-fallback { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 60ch; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow {
  margin-bottom: 14px;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.028em;
  text-wrap: balance;
}
.lede {
  margin-top: 16px; max-width: 52ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-soft);
}

/* ---------- Product showcases ---------- */
.showcase {
  display: grid; gap: clamp(28px, 4vw, 44px);
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}
.showcase:last-child { padding-bottom: 0; }
.showcase__text { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .showcase__text { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: start; }
  .showcase__details { padding-top: 6px; }
}
.showcase__head { display: flex; align-items: center; gap: 16px; }
.app-icon {
  flex: none; width: 64px; height: 64px; border-radius: 22.5%; overflow: hidden; background: var(--surface);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.app-icon img { display: block; width: 100%; height: 100%; }
.showcase__title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.card-meta { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.showcase__tagline {
  margin-top: 22px;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2;
}
.showcase__desc { margin-top: 14px; max-width: 52ch; font-size: 16.5px; color: var(--text-soft); }
.feature-list { border-top: 1px solid var(--line); }
.feature-list li {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.5; color: var(--text-soft);
}
.feature-list li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 0.6em; border-radius: 50%; background: var(--accent); }
.feature-list strong { color: var(--text); font-weight: 600; }
.card-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.card-note a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(95, 179, 180, 0.45); }
.card-note a:hover { color: var(--text); text-decoration-color: var(--accent); }
.showcase__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; }
.store-badge { display: inline-block; border-radius: 8px; transition: transform 0.22s var(--ease-out); }
.store-badge img { display: block; height: 44px; width: auto; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge:active { transform: scale(0.97); }
.card-links { display: inline-flex; gap: 20px; }

/* Screenshots: three large App Store shots in a row on desktop, a swipeable strip on phones */
.showcase__shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); align-items: start; max-width: 1040px; }
.shot {
  position: relative; margin: 0; aspect-ratio: 560 / 1212;
  border-radius: clamp(14px, 2vw, 22px); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.55s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.shot.is-hover {
  transition-duration: 0.14s, 0.35s, 0.35s;
  border-color: rgba(95, 179, 180, 0.45);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(95, 179, 180, 0.15);
}
.shot img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.shot > .card-glow {
  position: absolute; z-index: 2; left: 0; top: 0;
  width: 22rem; height: 22rem; margin: -11rem 0 0 -11rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 179, 180, 0.22) 0%, rgba(95, 179, 180, 0.06) 40%, rgba(95, 179, 180, 0) 65%);
  opacity: 0; transform: translate(var(--gx, 50%), var(--gy, 50%));
  transition: opacity 0.4s; pointer-events: none; mix-blend-mode: screen;
}
.shot.is-hover .card-glow { opacity: 1; }
@media (hover: none) {
  .shot:active { transform: scale(0.985); transition-duration: 0.1s; }
}
@media (max-width: 899px) {
  .showcase__shots {
    display: flex; align-items: stretch; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 6px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter));
    scrollbar-width: none;
  }
  .showcase__shots::-webkit-scrollbar { display: none; }
  .shot-wrap { flex: 0 0 min(76%, 320px); scroll-snap-align: center; }
}

/* ---------- About ---------- */
.about { display: grid; gap: 40px; }
@media (min-width: 880px) {
  .about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 72px; align-items: start; }
}
.prose { max-width: 60ch; }
.about__text .prose { margin-top: 22px; }
.prose p { color: var(--text-soft); font-size: clamp(1rem, 1.3vw, 1.1rem); }
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 880px) { .facts { padding-top: 6px; } }
.facts__item {
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
}
.facts dt { font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: 6px; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--text); }

/* ---------- Contact ---------- */
.section--contact { padding-bottom: clamp(88px, 12vw, 160px); }
.contact { max-width: 62ch; }
.contact__email {
  display: inline-block; margin-top: 28px;
  font-size: clamp(1.45rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  color: var(--text); overflow-wrap: anywhere;
  border-bottom: 2px solid rgba(95, 179, 180, 0.4);
  transition: color 0.3s, border-color 0.3s;
}
.contact__email:hover { color: var(--accent-bright); border-color: var(--accent-bright); }
.contact__links { margin-top: 22px; font-size: 15px; color: var(--muted); }
.contact__links a, .site-footer a {
  color: var(--text-soft); text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.contact__links a:hover, .site-footer a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14px; color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; }
.site-footer__nav { display: flex; gap: 18px; }

/* ---------- Simple pages (privacy, support) ---------- */
.page { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 128px); }
.page h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; }
.page .updated { margin-top: 12px; font-size: 14px; color: var(--muted); }
.page .intro { margin-top: 22px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-soft); }
.page h2 { margin-top: clamp(44px, 6vw, 64px); font-size: clamp(1.5rem, 3vw, 2rem); }
.page h3 { margin-top: 28px; font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.page p, .page li { color: var(--text-soft); }
.page p { margin-top: 12px; }
.page ul, .page ol { margin-top: 10px; padding-left: 1.25em; }
.page ul { list-style: disc; }
.page ol { list-style: decimal; }
.page li + li { margin-top: 8px; }
.page li::marker { color: var(--muted); }
.page .prose { max-width: 66ch; }
.page .prose a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(95, 179, 180, 0.45); }
.page .prose a:not(.btn):hover { text-decoration-color: var(--accent-bright); }
.page-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-nav a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); font-size: 13.5px; font-weight: 600; color: var(--text-soft);
  text-decoration: none !important;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.page-nav a:hover { color: var(--text); border-color: rgba(95, 179, 180, 0.5); background: rgba(95, 179, 180, 0.08); }
.page-nav a:active { transform: scale(0.97); }
.page .contact-block { margin-top: 12px; line-height: 1.7; }
.page .draft-note {
  margin-top: 24px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(227, 179, 65, 0.10); border: 1px solid rgba(227, 179, 65, 0.4);
  color: var(--text); font-size: 14.5px;
}
mark { background: rgba(227, 179, 65, 0.28); color: var(--text); padding: 0 0.25em; border-radius: 3px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .brand__mark, .btn, .btn:hover, .btn:active, .btn-primary:hover, .btn-ghost:hover,
  .store-badge:hover, .store-badge:active { transform: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
  .js .reveal, .js .hero-cycle, .js .hero-tagline, .js .hero-actions { opacity: 1; transform: none; transition: none; animation: none; }
  .js .hero-title__text { opacity: 1; animation: none; }
  .shot { transform: none; transition: border-color 0.35s, box-shadow 0.35s; }
  .shot:active { transform: none; }
  .card-glow { display: none; }
  .site-nav a::after, .text-link::after { transition: none; }
}
