:root {
  --ink: #17202a;
  --muted: #657282;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --line: #dde4ee;
  --navy: #173b57;
  --wine: #7b1215;
  --gold: #c9932f;
  --green: #1e8f63;
  --shadow: 0 20px 55px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: var(--wine);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #334155;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  background: #f1f5f9;
  color: var(--wine);
}

.nav .nav-cta {
  background: var(--wine);
  color: white;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 1.4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: clamp(42px, 7vw, 96px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(115deg, rgba(23, 59, 87, 0.95), rgba(123, 18, 21, 0.88)),
    url("../img/logo.png") right 8% center / min(46vw, 520px) no-repeat;
  color: white;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  max-width: 820px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.98;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.03rem, 2vw, 1.22rem);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-actions,
.install-card,
.login-card {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  background: var(--gold);
  color: #211607;
}

.btn.light {
  background: white;
  color: var(--wine);
}

.btn.outline,
.btn.ghost {
  border-color: rgba(255, 255, 255, 0.38);
  color: white;
}

.install-card .btn.ghost {
  border-color: var(--line);
  color: var(--ink);
}

.hero-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.hero-panel img {
  width: min(320px, 74vw);
  margin: 0 auto 22px;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.22));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-grid span {
  min-height: 82px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.metric-grid strong {
  display: block;
  color: white;
  font-size: 1.6rem;
}

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--wine);
  color: white;
}

.strip span {
  padding: 18px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
  font-weight: 800;
}

.section {
  padding: clamp(52px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) 1fr;
  gap: 42px;
  align-items: start;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.feature-grid,
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article,
.card {
  min-height: 178px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.06);
}

.feature-grid article {
  border-top: 4px solid var(--gold);
}

.success-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #eaf7f1;
}

.success-band small {
  display: block;
  max-width: 860px;
  color: #35624d;
  font-weight: 700;
}

.form-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) 1fr;
  gap: 32px;
  background: var(--soft);
}

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

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid #ccd6e3;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

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

.wide {
  grid-column: 1 / -1;
}

.lead-form button,
.admin-form button {
  justify-self: start;
  border: 0;
  background: var(--wine);
  color: white;
}

.page-hero {
  padding: clamp(56px, 9vw, 118px) clamp(18px, 5vw, 72px);
  background: linear-gradient(135deg, #f7fbff 0%, #fff5e4 100%);
}

.page-hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
}

.service-list {
  display: grid;
  gap: 16px;
}

.service-list article {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.service-list h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.text-link {
  color: var(--wine);
  font-weight: 800;
}

.profile-card img,
.gallery-grid img {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid figcaption {
  padding: 10px 2px;
  font-weight: 800;
}

.faq {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.4fr;
  gap: 30px;
  padding: 40px clamp(18px, 5vw, 72px) 86px;
  background: #141820;
  color: rgba(255, 255, 255, 0.76);
}

.footer img {
  width: 110px;
  margin-bottom: 14px;
  background: white;
  border-radius: 8px;
}

.footer h3 {
  color: white;
}

.footer a {
  display: block;
  margin: 8px 0;
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: flex;
  gap: 8px;
}

.floating-actions a {
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.flash {
  margin: 18px clamp(18px, 5vw, 72px) 0;
  padding: 14px 18px;
  border-radius: 8px;
  background: #eaf7f1;
  color: #14583c;
  font-weight: 800;
}

.install-page,
.admin-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #eef5ff, #fff5e4);
}

.install-card,
.login-card {
  display: grid;
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.install-card img,
.login-card img {
  width: 132px;
  margin: auto;
}

.admin-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--soft);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: #111827;
  color: white;
  overflow: auto;
}

.admin-sidebar img {
  width: 118px;
  margin: 0 auto 20px;
  border-radius: 8px;
  background: white;
}

.admin-sidebar a {
  display: block;
  margin-bottom: 7px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: var(--gold);
  color: #211607;
}

.admin-sidebar .logout {
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  padding: 28px;
  overflow: auto;
}

.admin-main h1 {
  margin-top: 0;
}

.admin-form {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.settings-form {
  max-width: 900px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  font-size: 0.9rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.inline-form button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
  font-weight: 800;
}

.error {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: clamp(12px, 4vw, 40px);
    left: auto;
    z-index: 30;
    display: none;
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: grid;
    grid-template-columns: minmax(150px, auto);
  }

  .nav a {
    width: auto;
    min-width: 150px;
    white-space: nowrap;
  }

  .hero,
  .split,
  .form-section,
  .service-list article,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

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

  .success-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .brand {
    min-width: 0;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

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

  .brand small {
    font-size: 0.62rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.5rem, 17vw, 4rem);
  }

  .metric-grid,
  .feature-grid,
  .cards,
  .gallery-grid,
  .lead-form,
  .admin-form,
  .strip,
  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .floating-actions {
    left: 12px;
    right: 12px;
  }

  .floating-actions a {
    flex: 1;
    text-align: center;
  }
}
