/* Kingswell Digital — shared site styles
   Used across all pages (index, services, portfolio, about, contact, privacy, terms). */

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

:root {
  --bg: #ffffff;
  --ink: #111315;
  --muted: #5a6472;
  --rule: #e5e7eb;
  --panel: #f7f7f8;
  /* Stronger wash for alternating sections — a genuinely visible light
     teal tint rather than a near-white panel. */
  --alt-bg: #e4f2ef;

  /* Brand accent — deep teal. Reads as credible/professional rather than
     "generic corporate blue" or "AI startup gradient", and nods to the
     Kingswell name (well / wellspring). Used deliberately, not everywhere. */
  --accent: #0f6e64;
  --accent-dark: #0a4f48;
  --accent-tint: #eaf5f3;
  --accent-tint-strong: #cfe8e3;

  /* Dark surfaces — hero gradient + footer. Near-black teal, distinct
     from the mid-tone --accent used for buttons/links on light surfaces. */
  --ink-deep: #07211e;
  --hero-eyebrow: #b3ecdf;
  --footer-muted: #9fc4bd;
  --footer-link: #e3f1ee;
  --footer-link-hover: #8fe6d2;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo-k {
  font-weight: 700;
  color: var(--ink);
}

.logo-d {
  font-weight: 500;
  color: var(--accent);
}

.site-footer .logo-k { color: #eaf5f3; }
.site-footer .logo-d { color: #14a894; }

.logomark { flex-shrink: 0; }
.logomark-bg { fill: var(--accent); }
.logomark-ring { fill: none; stroke: #ffffff; stroke-width: 2; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink);
}

.nav-links a:hover { color: var(--accent); }

.nav-links a.btn { color: #fff; }
.nav-links a.btn:hover { color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--accent);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--accent-tint);
  color: var(--accent-dark);
}

/* ---------- Page hero ---------- */

.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0%, transparent 72%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-hero .eyebrow { color: var(--hero-eyebrow); }

.page-hero p.lede { color: var(--accent-tint-strong); }

/* Secondary button needs to flip to a light outline on the dark hero —
   the default dark-ink text/transparent fill would be unreadable here. */
.page-hero .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.page-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: #ffffff;
}

/* Legal pages (privacy/terms) keep a restrained, light-tinted hero rather
   than the full dark gradient — dense legal text reads better under a
   calmer header. Declared after the generic .page-hero rules above so
   these overrides win despite equal selector specificity. */
.page-hero--legal {
  background: linear-gradient(180deg, var(--accent-tint) 0%, var(--bg) 70%);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.page-hero--legal::before {
  background: radial-gradient(circle at center, var(--accent-tint-strong) 0%, transparent 72%);
}

.page-hero--legal .eyebrow { color: var(--accent); }
.page-hero--legal p.lede { color: var(--muted); }

.page-hero--legal .btn-secondary {
  color: var(--ink);
  border-color: var(--accent);
}

.page-hero--legal .btn-secondary:hover {
  background: var(--accent-tint);
  color: var(--accent-dark);
}

h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

p.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- Hero actions / visual (homepage) ---------- */

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.home-hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-visual { justify-self: end; width: 100%; }

@media (max-width: 860px) {
  .home-hero .container { grid-template-columns: 1fr; }
  .hero-visual { justify-self: start; max-width: 420px; }
}

.browser-mock {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 32px 64px -20px rgba(2, 16, 14, 0.55);
}

.browser-mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}

.browser-mock-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rule);
}

.browser-mock-bar .url-pill {
  margin-left: 8px;
  height: 14px;
  flex: 1;
  max-width: 160px;
  border-radius: 100px;
  background: var(--bg);
  border: 1px solid var(--rule);
}

.browser-mock-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-hero-block {
  height: 68px;
  border-radius: 8px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-strong);
}

.mock-line {
  height: 9px;
  border-radius: 4px;
  background: var(--rule);
}

.mock-line.w-70 { width: 70%; }
.mock-line.w-55 { width: 55%; }
.mock-line.w-40 { width: 40%; }

.mock-btn {
  height: 24px;
  width: 104px;
  border-radius: 100px;
  background: var(--accent);
  margin-top: 4px;
}

.mock-cards {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.mock-card {
  flex: 1;
  height: 46px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--rule);
}

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

section {
  padding: 56px 0;
}

section.alt {
  background: var(--alt-bg);
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 16px;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Icon badges (service cards / process steps) ---------- */

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.icon-circle svg { width: 24px; height: 24px; }

.icon-circle--sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.icon-circle--sm svg { width: 20px; height: 20px; }

/* ---------- Card grids ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent-tint-strong);
  box-shadow: 0 12px 28px -18px rgba(15, 40, 36, 0.35);
  transform: translateY(-2px);
}

.card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}

.card a.card-link {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-dark);
  border-bottom: 1px solid var(--accent);
}

.card a.card-link:hover { color: var(--accent); }

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 4px;
}

.step .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Portfolio thumbnails (CSS/SVG concept mockups) ---------- */

.thumb {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 20px;
}

.thumb-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}

.thumb-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
}

.thumb-bar .url-pill {
  margin-left: 6px;
  height: 12px;
  flex: 1;
  max-width: 120px;
  border-radius: 100px;
  background: var(--bg);
  border: 1px solid var(--rule);
}

.thumb-body {
  height: 150px;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.thumb-wire { flex: 1; min-width: 0; }

.wire-line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(15, 110, 100, 0.18);
  margin-bottom: 8px;
}

.wire-pill {
  display: inline-block;
  margin-top: 4px;
  height: 20px;
  width: 64px;
  border-radius: 100px;
  background: var(--accent);
}

.thumb-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  color: var(--accent);
}

.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
}

.tag--accent {
  color: var(--accent-dark);
  background: var(--accent-tint);
  border-color: var(--accent-tint-strong);
}

.concept-note {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 18px 22px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  border: 1px solid var(--accent-tint-strong);
  border-radius: 12px;
  padding: 44px;
  text-align: center;
  background: var(--accent-tint);
}

.cta-banner h2 { margin-bottom: 10px; }

.cta-banner p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Forms ---------- */

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint-strong);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
}

@media (max-width: 760px) {
  .contact-columns { grid-template-columns: 1fr; }
}

.contact-info h3 {
  margin-top: 28px;
}

.contact-info h3:first-child { margin-top: 0; }

.contact-info p, .contact-info a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.contact-info a { color: var(--accent-dark); font-weight: 500; }
.contact-info a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Prose (legal pages) ---------- */

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 40px;
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.prose a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--accent-tint-strong);
  text-underline-offset: 2px;
}

.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.prose ul, .prose ol {
  margin-left: 22px;
  margin-bottom: 14px;
}

.prose .updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.notice {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

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

.site-footer {
  background: var(--ink-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--footer-link);
  margin-top: auto;
}

.site-footer .logomark-bg {
  /* Brighter than the standard --accent so the brandmark stays crisp
     against the near-black footer background. */
  fill: #14a894;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 24px 32px;
}

@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-muted);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  text-decoration: none;
  color: var(--footer-link);
  margin-bottom: 10px;
}

.footer-col a:hover { color: var(--footer-link-hover); }

.footer-col p {
  font-size: 14px;
  color: var(--footer-muted);
  margin-top: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  font-size: 13px;
  color: var(--footer-muted);
  text-align: center;
}

main { flex: 1; }
