/* ==========================================================================
   Diamond Trail Fitness Center — Clean Editorial Gym Theme
   ========================================================================== */

:root {
  --brand-blue: #0077c8;
  --brand-blue-dark: #005b99;
  --ink: #161b22;
  --ink-muted: #4b5563;
  --ink-subtle: #6b7280;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #d5dce4;
  --border-strong: #b8c2ce;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--surface);
  border-top: 4px solid var(--brand-blue);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 3px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--ink-subtle);
  margin-top: 1px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.header-nav a {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
}

.header-nav a.active {
  background: var(--brand-blue);
  color: #ffffff;
}

.header-nav a.active:hover {
  background: var(--brand-blue-dark);
  color: #ffffff;
}

.header-nav a.about-anchor {
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding-left: 0.9rem;
  margin-left: 0.25rem;
}

/* ==========================================================================
   Shared Typography Helpers
   ========================================================================== */

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
}

/* ==========================================================================
   Portal Section
   ========================================================================== */

.portal-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Desktop Embedded Frame */
.desktop-portal-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 2rem;
  padding: 0 1.25rem;
}

.portal-frame-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.desktop-portal-note {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.desktop-portal-note p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.desktop-portal-note strong {
  color: var(--ink);
}

.portal-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-subtle);
}

.portal-url {
  font-weight: 600;
  color: var(--ink-muted);
}

.open-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-blue);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.open-tab-btn:hover {
  border-color: var(--brand-blue);
  text-decoration: none;
}

.portal-iframe {
  width: 100%;
  height: calc(100vh - 230px);
  min-height: 700px;
  border: 0;
  display: block;
  background: #ffffff;
}

/* Mobile Layout (hidden on desktop) */
.mobile-portal-card {
  display: none;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.25rem 1.25rem;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.about-main h2 {
  margin: 0 0 0.85rem;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.about-lead {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.about-facts {
  margin: 0;
  border-top: 1px solid var(--border);
}

.fact-row {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.fact-row dt {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.fact-row dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-muted);
}


.history-block {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.history-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.history-block p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.history-block p:last-child {
  margin-bottom: 0;
}

/* Sidebar */
.about-sidebar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.about-sidebar h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.info-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.info-list li {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--ink);
}

.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-subtle);
  margin-bottom: 1px;
}

.about-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-about-primary,
.btn-about-secondary {
  display: block;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-about-primary {
  background: var(--brand-blue);
  color: #ffffff;
  border: 1px solid var(--brand-blue);
}

.btn-about-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  text-decoration: none;
}

.btn-about-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-about-secondary:hover {
  background: var(--bg);
  text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  font-size: 0.84rem;
  color: var(--ink-subtle);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-inner a {
  color: var(--ink-muted);
  font-weight: 500;
}

.footer-inner a:hover {
  color: var(--brand-blue);
}

.footer-compliance-note {
  max-width: 1200px;
  margin: 0.75rem auto 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-subtle);
}

.footer-compliance-note a {
  color: var(--ink-muted);
}

/* ==========================================================================
   Responsive Mobile Breakpoint (<= 820px)
   ========================================================================== */

@media (max-width: 820px) {
  .header-inner {
    padding: 0.65rem 1rem;
  }

  .brand-logo {
    height: 38px;
  }

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

  .brand-sub {
    font-size: 0.72rem;
  }

  .header-nav a.portal-link {
    display: none;
  }

  .header-nav a.about-anchor {
    border-left: none;
    margin-left: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
  }

  .desktop-portal-wrap {
    display: none;
  }

  .mobile-portal-card {
    display: block;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.15rem 1.75rem;
  }

  .mobile-card-inner {
    max-width: 540px;
    margin: 0 auto;
  }

  .mobile-card-inner h1 {
    margin: 0 0 0.85rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
  }

  .member-guide {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
  }

  .member-guide p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ink-muted);
  }

  .member-guide strong {
    color: var(--ink);
  }

  .mobile-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .btn-mobile {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-size: 0.96rem;
    font-weight: 600;
    text-decoration: none;
  }

  .btn-mobile:hover {
    text-decoration: none;
  }

  .btn-mobile-primary {
    background: var(--brand-blue);
    color: #ffffff;
    border: 1px solid var(--brand-blue);
  }

  .btn-mobile-primary:active {
    background: var(--brand-blue-dark);
  }

  .btn-mobile-secondary {
    background: var(--ink);
    color: #ffffff;
    border: 1px solid var(--ink);
  }

  .btn-mobile-outline {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
  }

  .btn-mobile-outline:active {
    background: var(--bg);
  }

  .mobile-steps-note {
    margin-top: 1.4rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ink-muted);
  }

  .mobile-steps-note strong {
    color: var(--ink);
  }

  .mobile-steps-note a {
    color: var(--brand-blue);
    font-weight: 600;
  }

  .about-section {
    padding: 2.25rem 1.15rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .about-main h2 {
    font-size: 1.38rem;
  }

  .fact-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
