:root {
  --navy: #000062;
  --navy-deep: #020235;
  --red: #b31f24;
  --red-dark: #87161a;
  --fog: #ffffff;
  --white: #ffffff;
  --ink: #1b1b23;
  --muted: #636372;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 18px 50px rgba(2, 2, 53, 0.18);
  --radius: 24px;
  --radius-sm: 16px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--fog);
  line-height: 1.5;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-radius: 999px;
}

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

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-kicker,
.eyebrow,
.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}

.brand-name,
h1,
h2,
h3,
.unit-size,
.unit-price {
  font-family: "Barlow Condensed", sans-serif;
  line-height: 1;
}

.brand-name {
  font-size: 1.9rem;
  color: var(--navy);
}

.brand .brand-kicker {
  order: 2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-weight: 700;
  color: var(--navy);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--red);
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0.5rem;
  border: 0;
  background: var(--navy);
  border-radius: 999px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
}

.hero-banner {
  position: relative;
  padding: 0;
}

.hero-banner .hero-slider {
  width: 100%;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.hero-copy-section {
  position: relative;
  margin-top: 0;
  padding: 2.25rem 0 1.25rem;
  z-index: 1;
  background: linear-gradient(135deg, rgba(0, 0, 98, 0.95), rgba(179, 31, 36, 0.9));
}

.hero-copy {
  max-width: none;
  padding: 1.35rem 1.5rem;
  color: var(--white);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.hero-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.hero-feature-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.hero-feature-panel .section-label {
  margin-top: 0;
}

h1 {
  margin: 0.3rem 0 1rem;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  max-width: 14ch;
}

.hero-text,
.section-heading p,
.panel p,
.unit-details p,
.payment-card p,
.site-footer p {
  font-size: 1.1rem;
}

.hero-actions,
.payment-actions,
.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

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

.button-primary {
  background: var(--red);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--red-dark);
}

.button-secondary {
  background: var(--white);
  border: 1px solid rgba(0, 0, 98, 0.18);
  color: var(--navy);
}

.hero-media {
  position: relative;
  min-height: 0;
}

.hero-slider {
  position: relative;
  min-height: 0;
  aspect-ratio: 4 / 1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 500ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--white);
}

.hero-slider-dots {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.hero-dot {
  width: 0.85rem;
  height: 0.85rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--white);
}

.section {
  padding: 5rem 0;
}

.intro {
  margin-top: -1.5rem;
}

.intro-grid,
.payments-grid,
.location-grid,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.panel,
.unit-card,
.payment-card,
.map-frame {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.panel {
  padding: 2rem;
}

.panel-accent {
  background: linear-gradient(135deg, rgba(0, 0, 98, 0.94), rgba(179, 31, 36, 0.88));
  color: var(--white);
}

.panel-accent .section-label {
  color: rgba(255, 255, 255, 0.8);
}

.contact-list,
.payment-list,
.payment-steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.contact-list li,
.payment-list li,
.payment-steps li {
  margin: 0.5rem 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--navy);
}

.section-contrast {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    linear-gradient(140deg, rgba(0, 0, 98, 0.08), rgba(179, 31, 36, 0.1));
}

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

.unit-card {
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.unit-card:hover {
  transform: translateY(-4px);
}

.unit-trigger {
  width: 100%;
  display: grid;
  gap: 0.8rem;
  text-align: left;
  padding: 1.3rem 1.25rem;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.unit-size {
  font-size: 2.1rem;
  color: var(--navy);
}

.unit-price {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.3rem;
  font-size: 2.2rem;
  color: var(--red);
}

.unit-price span {
  font-size: 1rem;
  color: var(--muted);
  padding-bottom: 0.25rem;
}

.unit-details {
  padding: 0 1.25rem 1.35rem;
  color: var(--muted);
}

.unit-addon {
  font-weight: 700;
  color: var(--navy);
}

.payment-card {
  padding: 2rem;
}

h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--navy);
}

.payment-note {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(179, 31, 36, 0.08);
  color: var(--navy-deep);
  font-weight: 700;
}

.portal-section {
  padding-top: 2.5rem;
}

.portal-page {
  min-height: 100vh;
}

.portal-hero {
  padding-bottom: 2rem;
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.portal-copy {
  max-width: 32rem;
}

.portal-hero h1 {
  max-width: none;
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
}

.portal-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
}

.portal-card,
.metric-card,
.planner-card,
.summary-total-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.portal-card {
  padding: 1.5rem;
}

.portal-card-wide {
  min-width: 0;
}

.portal-header,
.section-split,
.planner-header,
.summary-row,
.account-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.stack-md > * + * {
  margin-top: 1rem;
}

.stack-lg > * + * {
  margin-top: 1.5rem;
}

.stack-xl > * + * {
  margin-top: 2rem;
}

.subtle-text {
  margin: 0;
  color: var(--muted);
}

.error-text {
  color: var(--red-dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill-soft {
  background: rgba(0, 0, 98, 0.08);
  color: var(--navy);
}

.status-pill-live {
  background: rgba(179, 31, 36, 0.12);
  color: var(--red-dark);
}

.status-pill-muted {
  background: rgba(99, 99, 114, 0.12);
  color: var(--muted);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.field input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 98, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.field select {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.85rem 2.8rem 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 98, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.field input:focus {
  outline: 2px solid rgba(179, 31, 36, 0.24);
  outline-offset: 2px;
}

.field select:focus {
  outline: 2px solid rgba(179, 31, 36, 0.24);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.dashboard-shell {
  min-width: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1.2rem;
}

.metric-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.metric-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
  color: var(--navy);
}

.metric-note {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty-state {
  padding: 1.25rem;
  border: 1px dashed rgba(0, 0, 98, 0.16);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.planner-summary {
  padding: 1.3rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0, 0, 98, 0.04), rgba(179, 31, 36, 0.03));
  border: 1px solid rgba(0, 0, 98, 0.08);
}

.summary-total-card {
  padding: 1.2rem;
}

.summary-row {
  padding: 0.45rem 0;
  color: var(--muted);
}

.summary-row strong {
  color: var(--navy);
}

.summary-row-total {
  margin-top: 0.3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 98, 0.08);
  font-size: 1.05rem;
}

.history-table-shell {
  overflow-x: auto;
}

.admin-toolbar,
.admin-unit-form,
.pricing-rule-list,
.admin-unit-list {
  display: grid;
  gap: 1rem;
}

.admin-toolbar {
  grid-template-columns: minmax(0, 1.4fr) minmax(13rem, 0.6fr);
  align-items: end;
}

.pricing-toolbar {
  grid-template-columns: minmax(14rem, 18rem);
}

.tenant-toolbar {
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
}

.tenant-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
}

.tenant-toolbar-note {
  min-height: 100%;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 98, 0.05);
  border: 1px solid rgba(0, 0, 98, 0.08);
}

.tenant-table-shell {
  overflow-x: auto;
}

.tenant-table {
  min-width: 840px;
}

.admin-layout {
  display: block;
}

.admin-section-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy);
  font-weight: 700;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--red);
}

.pricing-rule-list {
  grid-template-columns: 1fr;
}

.admin-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 98, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.admin-table-compact {
  min-width: 900px;
}

.admin-table th,
.admin-table td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 98, 0.08);
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 249, 255, 0.98);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-unit-row:hover {
  background: rgba(0, 0, 98, 0.025);
}

.admin-unit-number {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  color: var(--navy);
}

.admin-table-input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 98, 0.14);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.admin-table-input-small {
  min-width: 7rem;
}

.admin-table-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--navy);
  font-weight: 700;
}

.admin-table-checkbox input {
  width: 1.05rem;
  height: 1.05rem;
}

.admin-table-actions {
  display: grid;
  gap: 0.6rem;
}

.admin-table-button {
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
}

.admin-row-message {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
}

.admin-reference-block strong {
  display: block;
  font-size: 1rem;
  color: var(--navy);
  word-break: break-word;
}

.admin-breakdown-list {
  display: grid;
  gap: 0.55rem;
}

.admin-breakdown-list-compact {
  max-height: 15rem;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.admin-breakdown-line {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 98, 0.04);
}

.admin-breakdown-line strong {
  color: var(--navy);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.history-table th,
.history-table td {
  padding: 0.9rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 98, 0.08);
}

.history-table th {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty-row {
  color: var(--muted);
}

.map-frame {
  overflow: hidden;
  min-height: 26rem;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 26rem;
  border: 0;
}

.site-footer {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: var(--white);
  padding: 4rem 0;
}

.site-footer h2 {
  color: var(--white);
}

.footer-list {
  padding-left: 0;
  list-style: none;
}

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

.footer-admin-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

.footer-admin-link a {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.footer-admin-link a:hover,
.footer-admin-link a:focus-visible {
  color: var(--white);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .intro-grid,
  .hero-copy-grid,
  .portal-grid,
  .portal-hero-grid,
  .payments-grid,
  .location-grid,
  .footer-grid,
  .unit-grid,
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 0;
  }

  .hero-copy-section {
    padding-top: 1.75rem;
  }

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

  .tenant-toolbar,
  .tenant-add-form {
    grid-template-columns: 1fr;
  }
}

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

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 1rem;
    left: 1rem;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(179, 31, 36, 0.08);
  }

  .hero-copy {
    max-width: none;
    padding: 1.2rem 1.15rem;
  }

  .hero-media {
    min-height: 0;
  }

  .hero-banner {
    padding-top: 0;
  }

  .hero-banner .hero-slider {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .tenant-table-shell {
    overflow: visible;
  }

  .tenant-table {
    min-width: 0;
  }

  .tenant-table thead {
    display: none;
  }

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

  .tenant-table tr {
    padding: 0.9rem 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 98, 0.08);
    background: rgba(255, 255, 255, 0.9);
  }

  .tenant-table td {
    padding: 0.4rem 0;
    border: 0;
  }

  .tenant-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
  }

  .tenant-table td[data-label="Actions"]::before {
    margin-bottom: 0.5rem;
  }

  .tenant-table .admin-table-actions {
    width: 100%;
  }

  .tenant-table .admin-table-button,
  .tenant-table .admin-table-input {
    width: 100%;
  }

  .panel,
  .payment-card,
  .portal-card {
    padding: 1.4rem;
  }

  .section {
    padding: 4rem 0;
  }

  .portal-header,
  .section-split,
  .planner-header,
  .summary-row,
  .account-summary,
  .line-item-card {
    flex-direction: column;
  }

  .line-item-values {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 1.2rem), var(--container));
  }

  .header-inner {
    min-height: 4.5rem;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  h1 {
    max-width: none;
  }

  .hero-actions,
  .button-row,
  .payment-actions,
  .location-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-media {
    min-height: 0;
  }

  .hero-copy-section {
    padding-top: 1.25rem;
    padding-bottom: 1.2rem;
  }

  .hero-slider {
    aspect-ratio: 4 / 1;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
