:root {
  color-scheme: light;
  --ink: #10201f;
  --paper: #fbfbf6;
  --surface: #ffffff;
  --muted: #5d6864;
  --line: #d9e1dc;
  --green: #0c6b58;
  --green-deep: #0f2e2a;
  --gold: #c98a22;
  --gold-soft: #f2d79d;
  --shadow: 0 24px 60px rgba(16, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 16px 5vw;
  background: rgba(251, 251, 246, 0.94);
  border-bottom: 1px solid rgba(16, 32, 31, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  flex: 0 0 auto;
  color: var(--green-deep);
  font-size: 1.28rem;
  font-weight: 800;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 15px;
  border-radius: 999px;
  color: #273a37;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: #e8efe9;
  color: var(--green);
  outline: none;
}

.header-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green-deep);
  font-weight: 850;
  cursor: pointer;
}

.logout-button {
  appearance: none;
}

.hero {
  position: relative;
  min-height: 72svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(9, 27, 24, 0.88) 0%, rgba(9, 27, 24, 0.76) 38%, rgba(9, 27, 24, 0.22) 76%),
    url("./assets/control-board-hero.png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-inner {
  width: min(1120px, 90vw);
  margin: 0 auto;
  padding: 76px 0 88px;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--gold-soft);
  font-size: 0.94rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: 5rem;
  line-height: 1.03;
  font-weight: 900;
}

.hero-lead {
  max-width: 700px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.44rem;
  line-height: 1.55;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
}

.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #17120b;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: 3px solid rgba(242, 215, 157, 0.5);
  outline-offset: 3px;
}

.section {
  padding: 92px 0;
}

.section-inner {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
  gap: 52px;
  align-items: start;
}

.section-label {
  color: var(--green);
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  color: var(--green-deep);
  font-size: 3rem;
  line-height: 1.14;
  font-weight: 900;
}

.intro-copy p,
.section-heading p,
.business-card p,
.proof-item p,
.site-footer p {
  margin: 0;
}

.intro-copy {
  display: grid;
  gap: 20px;
  color: #2f3f3b;
  font-size: 1.24rem;
  font-weight: 600;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 54px;
}

.proof-item,
.business-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.proof-item {
  padding: 28px;
}

.proof-number {
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 2.55rem;
  line-height: 1;
  font-weight: 900;
}

.proof-item h3,
.business-card h3 {
  margin: 0 0 12px;
  color: var(--green-deep);
  font-size: 1.42rem;
  line-height: 1.25;
}

.proof-item p,
.business-card p,
.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 560;
}

.business-section {
  background: #eef4ef;
}

.auth-section {
  background: #fbfbf6;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 34px;
  align-items: start;
}

.auth-heading {
  margin-bottom: 0;
}

.auth-session-panel {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.auth-session-panel strong {
  color: var(--green-deep);
  font-size: 1.2rem;
  line-height: 1.35;
}

.auth-session-panel span {
  color: var(--muted);
  font-size: 1rem;
}

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

.auth-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-card h3 {
  margin: 0;
  color: var(--green-deep);
  font-size: 1.55rem;
  line-height: 1.25;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: #2c3b37;
  font-size: 0.98rem;
  font-weight: 800;
}

.auth-card input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cdd8d2;
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--ink);
  font-size: 1rem;
}

.auth-card input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(12, 107, 88, 0.16);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.checkbox-row input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
}

.form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.form-button:hover,
.form-button:focus-visible,
.header-auth-link:hover,
.header-auth-link:focus-visible {
  outline: 3px solid rgba(201, 138, 34, 0.32);
  outline-offset: 3px;
}

.form-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-message {
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.form-message.is-error {
  color: #a13a2a;
}

.form-message.is-success {
  color: var(--green);
}

body.is-authenticated .auth-forms {
  display: none;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-heading h2 {
  margin-bottom: 20px;
}

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

.business-card {
  min-height: 260px;
  padding: 30px 26px;
}

.business-card::before {
  content: "";
  display: block;
  width: 52px;
  height: 5px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 5vw;
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p:first-child {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 850;
}

@media (max-width: 920px) {
  body {
    font-size: 19px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: auto;
    padding: 14px 5vw;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .header-auth {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .site-nav a {
    min-height: 46px;
    padding: 8px 16px;
    font-size: 1.03rem;
  }

  .hero {
    min-height: 66svh;
    background-image:
      linear-gradient(180deg, rgba(9, 27, 24, 0.9) 0%, rgba(9, 27, 24, 0.72) 58%, rgba(9, 27, 24, 0.28) 100%),
      url("./assets/control-board-hero.png");
    background-position: 58% center;
  }

  .hero-inner {
    width: min(680px, 90vw);
    padding: 58px 0 68px;
  }

  .hero h1 {
    font-size: 3.3rem;
  }

  .hero-lead {
    font-size: 1.28rem;
  }

  .section {
    padding: 72px 0;
  }

  h2 {
    font-size: 2.25rem;
  }

  .intro-grid,
  .proof-grid,
  .business-grid,
  .auth-layout,
  .auth-forms {
    grid-template-columns: 1fr;
  }

  .business-card {
    min-height: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 18px;
  }

  .brand {
    font-size: 1.18rem;
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    flex: 1 1 88px;
  }

  .hero {
    min-height: 64svh;
  }

  .hero-inner {
    padding: 48px 0 58px;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .hero-lead,
  .intro-copy {
    font-size: 1.18rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 58px;
  }

  .header-auth-link {
    flex: 1 1 132px;
  }

  .proof-item,
  .business-card,
  .auth-card {
    padding: 24px;
  }
}
