:root {
  --bg: #0d0d0f;
  --panel: rgba(17, 19, 24, 0.88);
  --panel-solid: #13161d;
  --text: #f4f1e8;
  --muted: #c4c0b7;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #d94b32;
  --accent-2: #f0b24c;
  --success: #8dc891;
  --danger: #ff8f7d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(217, 75, 50, 0.16), transparent 34%),
    linear-gradient(180deg, #0b0b0d 0%, #14181e 50%, #0d0d0f 100%);
}

body.auth-page,
body.admin-page {
  min-height: 100vh;
}

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

a {
  color: inherit;
}

.page-shell {
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(8, 10, 14, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar-inner,
.hero-inner,
.section-inner,
.footer-inner,
.auth-shell,
.admin-shell {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 94px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(217, 75, 50, 0.22), rgba(240, 178, 76, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px;
  box-shadow: var(--shadow);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.28rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy span {
  color: var(--muted);
  font-size: 1rem;
}

.topbar-actions,
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.phone-chip {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ef6c42);
  color: #fffaf5;
  box-shadow: 0 16px 32px rgba(217, 75, 50, 0.28);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: 68px 0 42px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.88) 0%, rgba(8, 10, 14, 0.64) 45%, rgba(8, 10, 14, 0.38) 100%),
    url("/static/images/hero.jpg") center/cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(13, 13, 15, 0), rgba(13, 13, 15, 1));
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 34px;
  align-items: start;
}

.hero-brand {
  width: min(100%, 860px);
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(217, 75, 50, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.hero-brand img {
  width: 100%;
  border-radius: 24px;
}

.hero-brand-tag {
  display: inline-flex;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(217, 75, 50, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff2df;
  font-size: 0.96rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text-block {
  max-width: 700px;
}

.hero-title {
  font-size: clamp(3.4rem, 7vw, 6.6rem);
  max-width: 9.8ch;
}

.hero-subcopy {
  max-width: 54ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent-2);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.9rem);
  max-width: 11ch;
}

.hero-copy p,
.section-title p,
.quote-card p,
.quote-info p,
.service-card p,
.proof-card p,
.policy-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy p {
  max-width: 58ch;
  font-size: 1.16rem;
  margin: 22px 0 0;
}

.hero-actions,
.hero-points,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-points {
  margin-top: 24px;
}

.hero-points span,
.mini-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 10px 14px;
  color: #eee7db;
  font-size: 0.96rem;
}

.hero-card,
.service-card,
.proof-card,
.quote-info,
.quote-card,
.admin-card,
.auth-card {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card {
  justify-self: end;
  width: min(100%, 430px);
  padding: 26px;
}

.hero-card h2 {
  font-size: 1.85rem;
  margin: 16px 0;
}

.stat-grid,
.services-grid,
.proof-grid,
.gallery-grid,
.quote-wrap,
.form-grid,
.service-list,
.check-grid,
.admin-grid,
.record-grid,
.stats-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
}

.stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section {
  padding: 34px 0 90px;
}

.section-title {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.services-grid {
  grid-template-columns: repeat(4, 1fr);
}

.service-card,
.proof-card {
  padding: 22px;
}

.service-card h3,
.proof-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.proof-grid {
  grid-template-columns: repeat(3, 1fr);
}

.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 26px;
}

.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-card {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card.tall {
  min-height: 500px;
  grid-row: span 2;
}

.quote-wrap {
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
}

.quote-info,
.quote-card,
.auth-card,
.admin-card {
  padding: 28px;
}

.quote-card h3,
.auth-card h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-section {
  margin-top: 22px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.form-section h4 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.form-section p {
  margin: 0 0 16px;
}

.service-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 13, 0.5);
}

.service-item h5 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.service-item ul,
.policy-copy ul,
.record-list {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #ece6d8;
  line-height: 1.7;
}

.check-option,
.radio-option,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 13, 0.56);
  color: var(--text);
}

.consent {
  margin: 16px 0 18px;
}

.check-option input,
.radio-option input,
.consent input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  flex: 0 0 auto;
}

.option-copy strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.5;
}

.option-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.policy-copy {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.95rem;
  color: #f1ecdf;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(7, 9, 13, 0.9);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

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

input::placeholder,
textarea::placeholder {
  color: #8f928f;
}

.signature-box {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 16px;
  background: rgba(7, 9, 13, 0.9);
}

.signature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

canvas {
  width: 100%;
  height: 220px;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.02)),
    #fbfaf6;
  border-radius: 14px;
  touch-action: none;
}

.signature-note,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.form-actions {
  margin-top: 18px;
}

.status {
  margin-top: 16px;
  min-height: 24px;
  font-size: 0.98rem;
}

.status.is-success {
  color: var(--success);
}

.status.is-error {
  color: var(--danger);
}

.footer {
  padding: 0 0 90px;
}

.footer-inner {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.call-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  box-shadow: 0 18px 36px rgba(217, 75, 50, 0.34);
}

.auth-shell,
.admin-shell {
  padding: 64px 0 80px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.auth-card {
  width: min(100%, 520px);
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.flash.error {
  color: var(--danger);
}

.flash.info {
  color: var(--accent-2);
}

.admin-shell h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  margin-bottom: 10px;
}

.admin-shell > p {
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 28px;
}

.admin-grid {
  grid-template-columns: 1fr;
}

.record-card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.record-header h2 {
  font-size: 1.55rem;
  margin-bottom: 6px;
}

.record-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-block {
  padding: 16px;
  border-radius: 16px;
  background: rgba(7, 9, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.record-block h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
}

.record-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.record-block.full {
  grid-column: 1 / -1;
}

.signature-preview {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #fff;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero-inner,
  .split,
  .quote-wrap,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    justify-self: stretch;
    width: 100%;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    padding: 10px 0;
  }

  .brand-copy span,
  .phone-chip {
    display: none;
  }

  .brand-mark {
    width: 60px;
    height: 60px;
  }

  .brand-copy strong {
    font-size: 1.05rem;
  }

  .hero {
    min-height: auto;
    padding-top: 40px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(8, 10, 14, 0.84) 0%, rgba(8, 10, 14, 0.65) 45%, rgba(8, 10, 14, 0.94) 100%),
      url("/static/images/hero.jpg") center/cover no-repeat;
  }

  .hero-actions,
  .form-actions,
  .admin-topbar {
    flex-direction: column;
  }

  .hero-brand {
    margin-bottom: 18px;
    padding: 10px;
    border-radius: 22px;
  }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4.4rem);
  }

  .hero-actions .btn,
  .form-actions .btn,
  .admin-topbar .btn {
    width: 100%;
  }

  .stat-grid,
  .services-grid,
  .gallery-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card.tall {
    min-height: 260px;
    grid-row: auto;
  }

  .quote-card,
  .quote-info,
  .footer-inner,
  .auth-card,
  .admin-card {
    padding: 22px;
  }

  .call-float {
    left: 16px;
    right: 16px;
    bottom: 14px;
    width: auto;
  }
}
