/* ==========================================================================
   Theba LLC — theballc.com
   Single shared stylesheet. No external fonts, no trackers, no dependencies.
   ========================================================================== */

:root {
  --ink:        #14181d;
  --ink-soft:   #4a5560;
  --ink-faint:  #7b8794;
  --rule:       #e3e7eb;
  --paper:      #ffffff;
  --paper-alt:  #f7f8f9;
  --accent:     #1d4e6f;
  --accent-dk:  #143b55;
  --focus:      #b8860b;

  --measure:    68ch;
  --wrap:       1080px;
  --gutter:     clamp(1.25rem, 5vw, 3rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-dk); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Layout --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  border-top: 1px solid var(--rule);
}

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

.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover { color: var(--accent); }

.nav__cta {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent) !important;
  white-space: nowrap;
}
.nav__cta:hover {
  background: var(--accent);
  color: #fff !important;
}

@media (max-width: 33rem) {
  .nav__item { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  padding-block: clamp(4rem, 13vw, 8.5rem);
}

.hero h1 {
  font-size: clamp(2rem, 1.35rem + 3.1vw, 3.4rem);
  max-width: 20ch;
  margin-bottom: 1.35rem;
}

.hero__sub {
  font-size: clamp(1.0625rem, 1rem + 0.42vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.5rem;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--accent);
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  color: #fff;
}

/* --- Services ------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: clamp(2rem, 4vw, 3.25rem);
  margin-top: 0.5rem;
}

.service h3 {
  font-size: 1.3rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--accent);
  margin-bottom: 0.65rem;
}

.service p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* --- About ---------------------------------------------------------------- */

.about h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  max-width: 24ch;
  margin-bottom: 1.5rem;
}

/* --- Contact / form ------------------------------------------------------- */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 52rem) {
  .contact__grid { grid-template-columns: 1fr 1.1fr; }
}

.contact h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  margin-bottom: 1.1rem;
}

.contact__intro { color: var(--ink-soft); }

.field { margin-bottom: 1.35rem; }

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c8ced4;
  border-radius: 3px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.field textarea { min-height: 9rem; resize: vertical; }

.field__hint {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}

.hp { position: absolute; left: -9999px; }

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  margin-top: 1rem;
  max-width: 44ch;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.75rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* --- Text pages (legal, 404, success) ------------------------------------- */

.page {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.page h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.7vw, 2.5rem);
  margin-bottom: 0.4rem;
}

.page__meta {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-bottom: 2.75rem;
}

.page h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
}

.page ul { max-width: var(--measure); padding-left: 1.25rem; margin: 0 0 1.15em; }
.page li { margin-bottom: 0.45rem; }

.page .lead { font-size: 1.0625rem; color: var(--ink-soft); }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--paper-alt);
  padding: 1.1rem 1.35rem;
  margin: 0 0 2rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.callout p:last-child { margin-bottom: 0; }

/* --- Centered narrow pages (success, 404) --------------------------------- */

.narrow {
  max-width: 40rem;
  padding-block: clamp(4.5rem, 14vw, 9rem);
  text-align: center;
}
.narrow p { margin-inline: auto; }
.narrow .btn { margin-top: 1.25rem; }

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  .site-header, .nav, .btn, .skip-link { display: none; }
  body { color: #000; }
  a { text-decoration: underline; }
}
