/* Krondor Tech — site styles. Self-hosted fonts only — no external requests (privacy-first). */

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/oswald-600.woff2") format("woff2");
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/oswald-700.woff2") format("woff2");
}
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-700.woff2") format("woff2"); }

:root {
  --font-display: "Oswald", "Segoe UI", system-ui, sans-serif;
  --accent: #5b6cff;
  --accent-2: #8b7cff;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark (default) */
:root,
[data-theme="dark"] {
  --bg: #0c0d12;
  --bg-alt: #101119;
  --surface: #15161f;
  --surface-2: #1b1d28;
  --text: #f1f2f6;
  --muted: #a2a5b8;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

a { color: inherit; }

.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 24px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.wordmark--sm { font-size: 0.92rem; }
.wordmark__mark { height: 32px; width: auto; display: block; }
.wordmark--sm .wordmark__mark { height: 26px; }
.dot { color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--accent) 85%, transparent); transform: translateY(-1px); }
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  background: var(--bg) url("/assets/img/bg/hero.jpg") center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg) 26%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, color-mix(in srgb, var(--bg) 20%, transparent) 100%),
    linear-gradient(to bottom, transparent 52%, var(--bg) 100%);
}
.hero .container { position: relative; z-index: 1; }
/* ── Hero orb — simple lit sphere (recolours with the scheme) ────────── */
.hero__orb {
  position: absolute;
  top: 50%;
  right: -20px;
  width: 400px;
  height: 400px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}
.orb__sphere {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%,
    color-mix(in srgb, var(--accent-2) 78%, #ffffff) 0%,
    var(--accent-2) 16%,
    var(--accent) 42%,
    color-mix(in srgb, var(--accent) 55%, #0b0b18) 72%,
    color-mix(in srgb, var(--accent) 22%, #07070e) 100%);
  box-shadow:
    inset -16px -22px 64px rgba(0, 0, 0, 0.55),
    0 0 55px color-mix(in srgb, var(--accent) 38%, transparent);
  animation: orb-float 8s ease-in-out infinite;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.eyebrow {
  position: relative;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero__title {
  position: relative;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  margin-bottom: 22px;
  max-width: 22ch;
  /* Reserve a fixed two-line box and centre the text in it, so rotating
     taglines (all sized to wrap to two lines) never shift the page. */
  display: flex;
  align-items: center;
  min-height: 2.3em;
}
#tagline {
  display: inline-block;
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
#tagline.is-fading {
  opacity: 0;
  transform: translateY(8px);
}
.hero__lede {
  position: relative;
  max-width: 480px;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: var(--muted);
  margin: 0 0 34px;
}
.hero__cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__trust {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.hero__trust li {
  position: relative;
  padding-left: 23px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.hero__trust li::before {
  content: "";
  position: absolute; left: 0; top: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.hero__trust li::after {
  content: "";
  position: absolute; left: 4px; top: 6px;
  width: 6px; height: 3px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

/* Sections */
.section { padding: 76px 0; }
#what {
  background-color: var(--bg);
  background-image: linear-gradient(rgba(12, 13, 18, 0.85), rgba(12, 13, 18, 0.93)), url("/assets/img/bg/whatwedo.jpg");
  background-size: cover;
  background-position: center;
}
#contact {
  position: relative;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(12, 13, 18, 0.78), rgba(12, 13, 18, 0.9)), url("/assets/img/bg/contact.jpg");
  background-size: cover;
  background-position: center;
}
.section--alt {
  background-color: var(--bg-alt);
  background-image: linear-gradient(rgba(14, 15, 22, 0.86), rgba(14, 15, 22, 0.93)), url("/assets/img/bg/texture.jpg");
  background-size: cover;
  background-position: center;
  border-block: 1px solid var(--border);
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.section__lede {
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 40px;
  font-size: 1.05rem;
}

/* Grid + cards */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.18s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__top h3 { margin: 0; }
.apps-more { margin-top: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); }
.card__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* App feature */
.app {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.app__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, #16161f), #14151f);
  overflow: hidden;
}
.app__mark {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}
.app__media--gist,
.app__media--chinwag,
.app__media--business {
  background-size: cover;
  background-position: center;
}
.app__media--gist { background-image: linear-gradient(135deg, rgba(8, 8, 16, 0.5), rgba(8, 8, 16, 0.12)), url("/assets/img/bg/gist.jpg"); }
.app__media--chinwag { background-image: linear-gradient(135deg, rgba(8, 8, 16, 0.5), rgba(8, 8, 16, 0.12)), url("/assets/img/bg/chinwag.jpg"); }
.app__media--business { background-image: linear-gradient(135deg, rgba(8, 8, 16, 0.55), rgba(8, 8, 16, 0.18)), url("/assets/img/bg/business.jpg"); }
.app__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.app + .app { margin-top: 22px; }
.app--reverse { grid-template-columns: 1.15fr 0.85fr; }
.app--reverse .app__media { order: 2; }
.app--reverse .app__body { order: 1; padding: 16px 0 16px 22px; }
.app__body { padding: 16px 22px 16px 0; }
.app__body h3 { font-size: 1.7rem; margin-bottom: 4px; }
.app__tagline { color: var(--accent); font-weight: 600; margin: 0 0 14px; }
.app__body p { color: var(--muted); margin: 0 0 16px; }

.ticks { list-style: none; padding: 0; margin: 0 0 22px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 9px;
  color: var(--text);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

.app__cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.pill--sm { font-size: 0.74rem; padding: 5px 11px; white-space: nowrap; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.contact { text-align: center; }
.contact .section__lede { margin-inline: auto; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.footer__links a:hover { color: var(--text); }
.footer__meta { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* Legal pages */
.legal {
  padding: 60px 0 80px;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(12, 13, 18, 0.9), rgba(12, 13, 18, 0.95)), url("/assets/img/bg/texture.jpg");
  background-size: cover;
  background-position: center;
}
.legal__inner { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: 8px; }
.legal .updated { color: var(--muted); margin: 0 0 8px; font-size: 0.95rem; }
.legal .back { display: inline-block; margin-bottom: 30px; color: var(--accent); text-decoration: none; font-weight: 600; }
.legal .back:hover { text-decoration: underline; }
.legal h2 { font-size: 1.3rem; margin: 38px 0 12px; }
.legal h3 { font-size: 1.08rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .lead { font-size: 1.1rem; color: var(--muted); }
.legal .callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
}
.legal .callout p { margin: 0; }
.legal a { color: var(--accent); }

/* Responsive */
@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .app, .app--reverse { grid-template-columns: 1fr; }
  .app__body, .app--reverse .app__body { padding: 8px 18px 18px; order: 0; }
  .app--reverse .app__media { order: 0; }
  .app__media { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .nav__links { gap: 16px; }
  .nav__links a { font-size: 0.9rem; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 60px 0; }
  /* Narrow screens may wrap the longest tagline to three lines — reserve for it
     so the swap still never shifts the page. */
  .hero__title { min-height: 3.45em; }
  /* Tuck the orb into the top-right corner so it stays a background accent. */
  .hero__orb { width: 260px; height: 260px; right: -70px; top: 15%; }
}

/* Reveal-on-scroll (progressive, no-JS safe) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
