:root {
  --navy: #1a3a5c;
  --teal: #2a9d8f;
  --teal-dark: #21867a;
  --sky: #e8f4f8;
  --cream: #faf9f7;
  --text: #2c3e50;
  --muted: #5a6b7d;
  --border: #d8e2ea;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(26, 58, 92, 0.08);
  --max: 1080px;
  --font: "Lato", system-ui, -apple-system, sans-serif;
  --header-logo-width: 120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}

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

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--navy);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: var(--header-logo-width);
  height: auto;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.brand-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.35rem 0.85rem;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.site-nav a + a {
  border-left: 1px solid var(--border);
}

.site-nav a:hover {
  color: var(--teal-dark);
}

.site-nav a[aria-current="page"],
.site-nav a[aria-current="page"]:hover {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
  background: none;
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy) !important;
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--sky);
  border-color: var(--teal);
}

.hero {
  background: linear-gradient(135deg, var(--sky) 0%, var(--white) 55%, var(--cream) 100%);
  padding: 3rem 1.25rem 4rem;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 1rem;
}

.hero .lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

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

.hero-visual {
  text-align: center;
}

.hero-visual img {
  max-width: 340px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section {
  padding: 3.5rem 1.25rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-alt {
  background: var(--white);
}

.section h2 {
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.section-intro {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.section-alt .card {
  background: var(--cream);
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.prose {
  max-width: 72ch;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose h2 {
  margin-top: 2rem;
}

.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 1.25rem;
}

.page-header-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.page-header p {
  margin: 0;
  opacity: 0.9;
  max-width: 55ch;
}

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-inner a {
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Forms */
.form-shell {
  max-width: 900px;
  margin: 0 auto;
}

.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.form-section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--navy);
  border-bottom: 2px solid var(--sky);
  padding-bottom: 0.5rem;
}

.form-section h3 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

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

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

.field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.checkbox-row input {
  margin-top: 0.25rem;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid var(--border);
  padding: 0.45rem;
  text-align: center;
}

.schedule-table th {
  background: var(--sky);
  color: var(--navy);
}

.form-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.auth-stage {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 2.5rem;
}

.auth-tile {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}

.auth-tile h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--navy);
}

.auth-tile .field input,
.auth-tile .btn {
  min-height: 44px;
  width: 100%;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
}

.staff-table th,
.staff-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}

.staff-table th {
  color: var(--navy);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.admin-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  border-bottom: 2px solid var(--navy);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  background: var(--sky);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.admin-tab:hover {
  background: var(--white);
}

.admin-tab[aria-current="page"] {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
  box-shadow: inset 0 3px 0 var(--teal);
  margin-bottom: -2px;
  padding-bottom: calc(0.55rem + 2px);
}

.status-note {
  display: inline;
  color: var(--muted);
  font-size: 0.85rem;
}

.customer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.customer-list li {
  display: grid;
  grid-template-columns: minmax(8rem, 1.2fr) minmax(10rem, 1.6fr) 5.5rem 6.5rem minmax(8rem, 1fr);
  gap: 0.75rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0;
  background: none;
}

.customer-list-head {
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.customer-list .customer-link {
  width: auto;
  min-height: 44px;
}

.send-file-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.send-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
}

.send-file-list .btn {
  width: auto;
  min-height: 44px;
}

.customer-row {
  cursor: pointer;
}

.customer-link {
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  padding: 0.35rem 0;
  min-height: 44px;
  cursor: pointer;
  text-align: left;
}

.customer-dialog {
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
}

.customer-dialog::backdrop {
  background: rgba(26, 58, 92, 0.45);
}

.customer-dialog-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}

/* Video slot (Home — Progress in Motion) */
.video-slot {
  margin: 1.5rem 0 1.75rem;
  max-width: 720px;
}

.video-slot video {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--sky);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 1.5rem;
}

/* Staff page */
.staff-card {
  text-align: center;
}

.staff-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--sky);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.5rem;
  text-align: center;
}

.staff-card .staff-role {
  display: block;
  margin: 0.15rem 0 0.75rem;
  color: var(--teal-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .brand img {
    width: 56px;
  }

  .brand {
    gap: 0.35rem;
    flex: 0 0 auto;
  }

  .brand-text strong {
    font-size: clamp(0.7rem, 2.4vw, 0.95rem);
  }

  .brand-text span {
    display: none;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem;
  }

  .site-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    justify-content: flex-end;
    gap: 0;
  }

  .site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.52rem, 1.9vw, 0.8rem);
    line-height: 1.15;
    padding: 0.4rem 0.45rem;
    min-height: 44px;
    white-space: nowrap;
    text-align: center;
  }

  .section {
    padding: 1.25rem 0.85rem;
  }

  .field input,
  .field select,
  .field textarea {
    width: 100%;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .admin-tab {
    flex: 1 1 30%;
    padding: 0.55rem 0.4rem;
    font-size: 0.92rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn,
  .form-actions form,
  .form-actions button {
    width: 100%;
  }

  .staff-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .staff-table,
  .staff-table tbody,
  .staff-table tr,
  .staff-table td {
    display: block;
    width: 100%;
  }

  .staff-table tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.75rem;
    background: var(--white);
  }

  .staff-table td {
    border: 0;
    padding: 0.35rem 0;
  }

  .staff-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .staff-table td[data-label=""]::before {
    content: none;
  }

  .customer-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    margin: auto;
    padding: 0.4rem 0.75rem 0.85rem;
  }

  .customer-list li {
    grid-template-columns: 1fr auto;
    gap: 0.15rem 0.75rem;
    padding: 0.65rem 0;
    border-radius: 0;
    margin: 0;
  }

  .customer-list-head {
    display: none;
  }

  .customer-list .customer-link {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .customer-list .customer-email {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }

  .site-nav a {
    font-size: clamp(0.5rem, 2.35vw, 0.68rem);
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}
