/* ============================================================
   TILLMAN PLACE HOA — SHARED STYLESHEET
   ============================================================
   All pages link to this file. To change a color or font
   site-wide, edit the :root variables below.
   ============================================================ */

/* ---- DESIGN TOKENS ------------------------------------------- */
:root {
  /* Brand colors — pulled from logo navy */
  --navy: #0f2e3d;
  --deep: #1a4659;
  --sky: #7ba9bd;
  --sand: #e6dcc9;
  --mist: #f0efea;
  --white: #ffffff;
  --ink: #0a1a22;
  --coral: #e8704f;
  --coral-dark: #d05a3a;
  --line: rgba(15, 46, 61, 0.12);
  --line-strong: rgba(15, 46, 61, 0.2);

  /* Typography */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1400px;
  --gutter: 48px;
}

/* ---- RESET & BASE ------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--mist);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

.serif { font-family: var(--serif); }
.italic { font-style: italic; color: var(--coral); }

/* ---- HEADER (shared on all pages) -------------------------- */
.site-header {
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header.on-hero {
  background: transparent;
  border-bottom: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy);
}
.logo-link img { height: 100px; width: auto; }

.on-hero .logo-link { color: var(--white); filter: brightness(0) invert(1); }

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(15, 46, 61, 0.06);
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.on-hero .main-nav ul {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
}

.main-nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}
.on-hero .main-nav a { color: var(--white); }

.main-nav a:hover { background: rgba(15, 46, 61, 0.08); }
.on-hero .main-nav a:hover { background: rgba(255,255,255,0.15); }

.main-nav a.active { background: var(--navy); color: var(--white); }
.on-hero .main-nav a.active { background: var(--white); color: var(--navy); }

.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 100px;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.portal-btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.portal-btn::after {
  content: "↗";
  font-size: 14px;
}

/* ---- MOBILE NAV TOGGLE -------------------------------------- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}
.on-hero .mobile-toggle { color: var(--white); }

/* ---- PAGE HERO (for non-home pages) ------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--deep) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 140px var(--gutter) 80px;
  margin-top: -85px; /* pull under sticky header area */
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(232,112,79,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 80%, rgba(123,169,189,0.3) 0%, transparent 50%);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.5;
}
.page-hero-inner {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 60px;
}
.page-hero .tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: 20px;
  max-width: 900px;
}
.page-hero .lede {
  font-size: 18px;
  max-width: 620px;
  opacity: 0.85;
  line-height: 1.6;
}

/* ---- BUTTONS ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--coral);
  color: var(--white);
}
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: var(--sand); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ---- FOOTER (shared on all pages) -------------------------- */
.site-footer {
  background: var(--navy);
  color: var(--mist);
  padding: 80px var(--gutter) 40px;
  margin-top: 120px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .serif {
  font-size: 32px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.7;
  max-width: 340px;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
}
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: var(--mist);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-col a:hover { opacity: 1; }

.footer-portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 100px;
  margin-top: 8px;
  opacity: 1 !important;
  transition: background 0.2s;
}
.footer-portal:hover { background: var(--coral-dark); }
.footer-portal::after { content: "↗"; font-size: 14px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.5;
  letter-spacing: 0.05em;
}

/* ---- UTILITY ------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 16px;
}

h2.section-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 20px;
}

/* ---- RESPONSIVE -------------------------------------------- */
@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .mobile-toggle { display: block; }
  .nav-wrap { gap: 12px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 4px;
  }
  .main-nav a { width: 100%; padding: 14px 16px; }

  .portal-btn span { display: none; }
  .portal-btn { padding: 10px 14px; font-size: 12px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .page-hero { padding: 120px var(--gutter) 60px; }

  .logo-link img { height: 42px; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
