:root,
html[data-theme="dark"] {
  color-scheme: dark;

  --brand: #f68b1f;
  --brand-hover: #ff9c38;
  --brand-soft: rgba(246, 139, 31, 0.11);
  --brand-line: rgba(246, 139, 31, 0.38);

  --page-bg: #090c0e;
  --shell-bg: #0e1215;
  --header-bg: rgba(14, 18, 21, 0.92);
  --surface: #151b1f;
  --surface-2: #1a2126;
  --surface-3: #101518;
  --input-bg: #0f1417;

  --text: #f4f6f7;
  --heading: #ffffff;
  --muted: #a8b1b6;
  --muted-strong: #c7ced2;

  --border: #2d363b;
  --border-soft: #252d31;
  --focus-ring: rgba(246, 139, 31, 0.18);

  --success-bg: rgba(86, 153, 99, 0.12);
  --success-border: rgba(112, 181, 124, 0.35);
  --success-text: #cce8d1;

  --error-bg: rgba(184, 76, 65, 0.12);
  --error-border: rgba(219, 108, 95, 0.35);
  --error-text: #f1b8b0;

  --shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] {
  color-scheme: light;

  --brand: #e47d16;
  --brand-hover: #f68b1f;
  --brand-soft: rgba(246, 139, 31, 0.09);
  --brand-line: rgba(228, 125, 22, 0.32);

  --page-bg: #eceff1;
  --shell-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.94);
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --surface-3: #f0f2f3;
  --input-bg: #ffffff;

  --text: #34383b;
  --heading: #202326;
  --muted: #687177;
  --muted-strong: #4d555a;

  --border: #dfe3e5;
  --border-soft: #e9ecee;
  --focus-ring: rgba(246, 139, 31, 0.14);

  --success-bg: #f1f8f2;
  --success-border: #c9e0cd;
  --success-text: #3f6947;

  --error-bg: #fff5f3;
  --error-border: #efc7bf;
  --error-text: #8b4137;

  --shadow: 0 20px 45px rgba(37, 45, 50, 0.08);
  --shadow-soft: 0 9px 24px rgba(37, 45, 50, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, var(--brand-soft), transparent 28rem),
    var(--page-bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--brand);
  color: #ffffff;
}

.site-shell {
  width: min(100%, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
  background: var(--shell-bg);
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.container {
  width: min(calc(100% - 48px), 1160px);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 22%, var(--brand) 78%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand img {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  color: var(--heading);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-tagline {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.nav-links a {
  padding: 10px 12px;
  color: var(--muted-strong);
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav-links .nav-cta {
  margin-left: 4px;
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta.active {
  color: #ffffff;
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.menu-btn {
  display: none;
  min-height: 40px;
  padding: 0 13px;
  color: var(--heading);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-weight: 700;
}

/* Typography and shared section structure */
.page-title {
  padding: 64px 0 34px;
  border-bottom: 1px solid var(--border-soft);
  background:
    linear-gradient(135deg, var(--brand-soft), transparent 42%),
    var(--shell-bg);
}

.page-title h1,
.home-hero h1 {
  margin: 0;
  color: var(--heading);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.page-title h1 {
  max-width: 900px;
  font-size: clamp(42px, 6vw, 68px);
}

.page-title p {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.accent-line {
  width: 62px;
  height: 4px;
  margin-top: 16px;
  background: var(--brand);
  border-radius: 99px;
}

.section {
  padding: 34px 0;
}

.section + .section {
  padding-top: 24px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-heading p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.section-heading .accent-line {
  width: 55px;
  height: 3px;
  margin-top: 11px;
}

.card,
.form-card,
.appointment-info,
.product-card,
.project-card,
.about-card,
.feature-band,
.about-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* Buttons */
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 750;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

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

.btn-secondary {
  color: var(--heading);
  background: var(--surface-2);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--muted);
}

.mini-link {
  color: var(--brand);
  font-weight: 750;
}

.mini-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Common cards */
.card {
  padding: 24px;
  border-radius: 9px;
}

.card h3 {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
}

.card p {
  margin: 10px 0 18px;
  color: var(--muted);
}

.notice {
  padding: 15px 17px;
  color: var(--muted-strong);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand);
  border-radius: 7px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 9px;
  color: var(--muted-strong);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

/* Footer */
.site-footer {
  margin-top: 52px;
  background: var(--surface-3);
  border-top: 4px solid var(--brand);
}

.footer-main {
  min-height: 178px;
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 34px 0;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.footer-brand {
  color: var(--heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.footer-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-theme {
  justify-self: end;
}

.theme-control-title {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  background: #2d3438;
  border: 1px solid #464f54;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.theme-switch input:checked + .switch-track {
  background: var(--brand);
  border-color: var(--brand);
}

.theme-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(22px);
}

.theme-switch input:focus-visible + .switch-track {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-mode {
  min-width: 70px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.footer-bottom {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-theme {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 32px), 1160px);
  }

  .header-inner {
    min-height: 72px;
  }

  .brand-tagline {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 9px 9px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links .nav-cta {
    margin-left: 0;
  }

  .page-title {
    padding: 46px 0 28px;
  }

  .page-title p {
    font-size: 16px;
  }
}

@media (max-width: 620px) {
  .site-shell {
    border-left: 0;
    border-right: 0;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-theme {
    justify-self: start;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
