/* ==========================================================================
   Kyntic shared site styles
   Single source of truth for nav, footer, typography, base components.
   ========================================================================== */

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

:root {
  --ink: #0d1117;
  --ink-soft: #2a2f3a;
  --body: #3a3f4b;
  --muted: #6b7280;
  --line: #e6e4dd;
  --line-soft: #efece4;
  --bg: #ffffff;
  --surface: #faf8f3;
  --surface-2: #f3f1ea;
  --accent: #d97706;          /* signal amber, used sparingly */
  --accent-soft: #fef3c7;
  --max: 1080px;
  --r: 10px;
}

html {
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1.15;
  font-weight: 800;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); }
h3 { font-size: 1.1rem; }

strong { color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  z-index: 1001;
  text-decoration: none;
  border-radius: var(--r);
}
.skip-link:focus { top: 0.5rem; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  display: none;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  border-radius: var(--r);
  transition: transform 0.15s ease, background 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); text-decoration: none; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25); }

.btn-secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }

.btn-block { display: block; width: 100%; }

/* --- Page header (used on sub-pages) --- */
.page-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.page-header h1 { margin-bottom: 0.6rem; }
.page-header .lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
}

/* Generic content sections */
.content { padding: 3rem 0 4rem; }
.content h2 { margin: 2.5rem 0 0.9rem; font-size: 1.4rem; }
.content h2:first-child { margin-top: 0; }
.content p { color: var(--body); margin-bottom: 1rem; }
.content ul { margin: 0 0 1.25rem 1.25rem; }
.content li { margin-bottom: 0.5rem; }
.content a { color: var(--accent); }

/* --- Footer --- */
.footer {
  padding: 3rem 0 2.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}
.footer-brand .nav-logo { display: inline-block; margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.85rem; color: var(--muted); max-width: 280px; }
.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
  font-weight: 700;
}
.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.18rem 0;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); margin: 0; }
.footer-bottom .legal {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom .legal a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-bottom .legal a:hover { color: var(--ink); }

/* Tablet */
@media (min-width: 640px) {
  html { font-size: 17px; }
  .container, .container-narrow { padding: 0 1.75rem; }
  .nav-inner { padding: 0 1.75rem; height: 4rem; }
  .nav-link { display: inline; }
  .page-header { padding: 5rem 0 2.5rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}

/* Desktop */
@media (min-width: 960px) {
  html { font-size: 18px; }
  .nav-inner { height: 4.25rem; }
  .page-header { padding: 6rem 0 3rem; }
}
