/* KABiQ Tech — marketing site
   Dark charcoal, silver/chrome accents, geometric rhythm */

:root {
  --bg-deep: #0c0d10;
  --bg-elevated: #12141a;
  --bg-card: #161920;
  --border-subtle: rgba(200, 208, 220, 0.12);
  --border-strong: rgba(200, 208, 220, 0.28);
  --chrome: linear-gradient(145deg, #e8eaef 0%, #a8aeb8 45%, #d2d6de 100%);
  --text: #e8eaef;
  --text-muted: #9aa3b2;
  --text-dim: #6b7280;
  --accent: #c5cad6;
  --accent-bright: #eef0f4;
  --focus: #8eb4ff;
  --header-h: 5.75rem;
  --radius: 2px;
  --shadow-panel: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 48px rgba(0, 0, 0, 0.45);
  font-size: 100%;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav {
    transition: none;
  }
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(90, 100, 120, 0.15), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, #0a0b0e 100%);
  min-height: 100vh;
}

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

a {
  color: var(--accent-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #fff;
}

code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.92;
}

.brand-logo {
  width: auto;
  height: clamp(3.25rem, 9vw, 5rem);
  max-width: min(16rem, 52vw);
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .brand-logo {
    height: clamp(3.75rem, 5.5vw, 5.25rem);
    max-width: 18rem;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0 auto;
  background: var(--accent);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(10, 11, 14, 0.97);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.site-nav.is-open {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .site-nav {
    position: static;
    inset: auto;
    background: transparent;
    padding: 0;
    transform: none;
    transition: none;
  }
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
}

.nav-list a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.nav-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
}

.nav-list a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Sections */
.section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 42rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

/* Hero */
.hero {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  color: var(--accent-bright);
}

.hero-lead {
  font-size: clamp(1.125rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 36rem;
}

.hero-sub {
  margin: 0 0 2rem;
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-brand-card {
  margin: 0;
  width: min(100%, 22rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 50%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}

.hero-brand-img {
  position: relative;
  width: 100%;
  height: auto;
  max-height: clamp(11rem, 28vw, 15rem);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.35));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(180deg, #f0f2f6 0%, #b8bec8 100%);
  color: #1a1d24;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #fff 0%, #c8ced8 100%);
  color: #0c0d10;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border-strong);
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(200, 208, 220, 0.4);
}

/* About */
.about {
  background: rgba(255, 255, 255, 0.02);
}

.about p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Services */
.services-intro {
  margin-bottom: 2rem;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.service-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
}

.service-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Youth */
.youth {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(22, 25, 32, 0.5) 0%, var(--bg-deep) 100%);
}

.youth-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .youth-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.youth-copy p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.youth-copy strong {
  color: var(--accent-bright);
  font-weight: 600;
}

.youth-logo-wrap {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.youth-logo-link {
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.youth-logo-link:hover {
  opacity: 1;
}

.youth-logo-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.youth-logo-link img {
  max-height: clamp(7rem, 22vw, 11rem);
  width: min(100%, 20rem);
  margin: 0 auto;
  object-fit: contain;
}

/* Contact */
.contact-inner .section-intro {
  max-width: 42rem;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.contact-block {
  padding: 0;
}

.contact-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}

.contact-link {
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-hint {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.contact-form-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-status-success {
  color: #9ae6b4;
}

.form-status-error {
  color: #feb2b2;
}

.contact-form-block {
  position: relative;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text);
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-dim);
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--border-strong);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: transparent;
}

.contact-submit-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.contact-progress {
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contact-progress.is-active {
  opacity: 1;
}

.contact-progress-bar {
  height: 100%;
  width: 35%;
  max-width: 8rem;
  background: linear-gradient(90deg, #8a909c, #e8eaef, #8a909c);
  border-radius: 2px;
  animation: contact-progress-slide 1.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .contact-progress-bar {
    animation: none;
    width: 100%;
    opacity: 0.5;
  }
}

@keyframes contact-progress-slide {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(400%);
  }
}

.btn-primary.is-loading {
  cursor: wait;
  opacity: 0.92;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 1.25rem 3rem;
  background: var(--bg-elevated);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-brand:hover {
  opacity: 0.9;
}

.footer-logo {
  height: clamp(3rem, 8vw, 4rem);
  max-width: 15rem;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-meta {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
