:root {
  --bg: #140A05;
  --bg-raised: #1F110A;
  --surface: #341F11;
  --surface-2: #432816;
  --border-hair: #704526;
  --border-hair-soft: #4E311C;

  --text-primary: #FFF9F3;
  --text-secondary: #E3C6AD;
  --text-tertiary: #BE9C82;

  --accent-green: #FF8A3D;
  --accent-green-dim: #FF9A55;
  --accent-red: #FF5C72;

  --focus-ring: #FFB27A;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 1100px 600px at 50% -15%, rgba(255, 138, 61, 0.10), transparent 60%),
    var(--bg);
}

h1, h2, p, form { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font-family: inherit; color: inherit; background: none; border: none; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.field-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text-primary);
  font-size: 14px;
}
.text-input::placeholder { color: var(--text-tertiary); }

.btn-primary {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-green);
  color: #140A05;
  font-size: 13.5px;
  font-weight: 650;
  text-align: center;
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hair);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  display: inline-block;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border-hair-soft);
}
.landing-brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-hair);
  padding: 3px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 650; font-size: 15px; }

.landing-nav-links { display: flex; gap: 28px; flex: 1; justify-content: center; }
.landing-nav-links a { font-size: 13.5px; color: var(--text-secondary); }
.landing-nav-links a:hover { color: var(--text-primary); }

/* ==========================================================================
   Hero
   ========================================================================== */

.landing-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 84px 24px 70px;
  text-align: center;
}
.hero-copy { max-width: 760px; margin: 0 auto; }
.landing-hero h1 {
  font-size: 46px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.landing-hero h1 em { font-style: normal; color: var(--accent-green); }
.hero-copy p {
  margin-top: 22px;
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; margin-top: 32px; }
.hero-cta { min-width: 140px; }

/* ==========================================================================
   Feature strip
   ========================================================================== */

.landing-strip {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 90px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.strip-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.strip-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 138, 61, 0.1);
  color: var(--accent-green);
  display: flex; align-items: center; justify-content: center;
}
.strip-card strong { font-size: 14.5px; }
.strip-card p { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.5; }

/* ==========================================================================
   Solutions section (intro + meter showcase)
   ========================================================================== */

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.landing-solutions { max-width: 980px; margin: 0 auto; padding: 40px 24px 0; }
.solutions-intro { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.solutions-intro h2 { font-size: 30px; font-weight: 700; line-height: 1.25; }
.solutions-intro p { margin-top: 14px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; }

.meters-showcase {
  margin-top: 60px;
  padding: 40px 0 90px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 40px;
  align-items: center;
}
.meters-showcase-text h3 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.meters-showcase-text p { margin-top: 12px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

.meters-showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meter-photo {
  margin: 0;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.meter-photo img { display: block; width: 100%; height: 180px; object-fit: cover; }
.meter-photo figcaption { padding: 10px 12px; font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }

/* ==========================================================================
   Partners
   ========================================================================== */

.landing-partners { max-width: 980px; margin: 0 auto; padding: 0 24px 90px; text-align: center; }
.landing-partners h2 { font-size: 26px; font-weight: 700; margin-top: 6px; }
.partners-grid {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 200px;
  padding: 26px 20px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.partner-logo { height: 64px; width: 100%; display: flex; align-items: center; justify-content: center; }
.partner-card img { max-width: 150px; max-height: 56px; object-fit: contain; border-radius: 4px; }
.partner-card span { font-size: 12.5px; color: var(--text-secondary); font-weight: 550; }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.landing-testimonials { max-width: 1080px; margin: 0 auto; padding: 0 24px 100px; text-align: center; }
.landing-testimonials h2 { font-size: 26px; font-weight: 700; margin-top: 6px; }
.testimonials-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
}
.testimonial-card {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.testimonial-title { font-size: 14px; font-weight: 650; color: var(--text-primary); }
.testimonial-quote { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.6; flex: 1; }
.testimonial-author { font-size: 12px; font-weight: 650; color: var(--accent-green); }

@media (max-width: 640px) {
  .meters-showcase { grid-template-columns: 1fr; }
  .meters-showcase-grid { grid-template-columns: 1fr; }
}

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

.landing-footer {
  text-align: center;
  padding: 24px;
  font-size: 11.5px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-hair-soft);
}

/* ==========================================================================
   Sign In modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 32px 28px 28px;
}

.modal-close-btn {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-tertiary);
}
.modal-close-btn:hover { color: var(--text-primary); }

.modal-heading { font-size: 22px; font-weight: 700; text-align: center; }
.modal-subheading { font-size: 13px; color: var(--text-secondary); text-align: center; margin-top: 6px; margin-bottom: 24px; }

.modal-error {
  font-size: 12.5px;
  color: var(--accent-red);
  background: rgba(255, 92, 114, 0.08);
  border: 1px solid rgba(255, 92, 114, 0.3);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 16px;
}

.modal-form { display: flex; flex-direction: column; gap: 14px; }

.password-field { position: relative; }
.password-field .text-input { padding-right: 42px; }
.password-toggle-btn {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

.modal-link-btn { align-self: flex-end; font-size: 12px; color: var(--accent-green-dim); margin-top: -6px; }
.modal-link-btn:hover { color: var(--accent-green); }

.modal-submit-btn { margin-top: 6px; width: 100%; }

.modal-switch { text-align: center; font-size: 12.5px; color: var(--text-secondary); margin-top: 20px; }
.modal-switch a { color: var(--accent-green-dim); font-weight: 600; }
.modal-switch a:hover { color: var(--accent-green); }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* (mobile rules now live at the end of this file, after the new sections) */

/* ==========================================================================
   Page-wide additions: smooth scrolling, sticky nav, mobile menu
   ========================================================================== */

html { scroll-behavior: smooth; }
.btn-primary { display: inline-block; }
section[id], header[id] { scroll-margin-top: 76px; }

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 10, 5, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.landing-nav-links { gap: 26px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 40px; height: 38px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.landing-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.landing-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.landing-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero: pill + app preview
   ========================================================================== */

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  margin-bottom: 22px;
  border: 1px solid var(--border-hair);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  color: var(--text-secondary);
}
.hero-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.15);
}


/* ==========================================================================
   Roles ("Built for everyone in the estate")
   ========================================================================== */

.landing-strip { padding-bottom: 56px; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: 30px; font-weight: 700; line-height: 1.25; }
.section-head p { margin-top: 14px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; }
.section-head--sub { margin-bottom: 28px; }
.section-head--sub h3 { margin: 0; font-size: 22px; font-weight: 700; }

.roles {
  padding: 0 24px 90px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.role-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.role-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 138, 61, 0.1);
  color: var(--accent-green);
}
.role-card h3 { margin: 0; font-size: 17px; }
.role-lead { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.5; }
.role-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.role-list li {
  position: relative;
  padding-left: 25px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.role-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1px;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23FF8A3D' fill-opacity='.15'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23FF8A3D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.landing-how { max-width: 1040px; margin: 0 auto; padding: 20px 24px 100px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.step-num {
  width: 34px; height: 34px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-green);
  color: #140A05;
  font-size: 14px;
  font-weight: 700;
}
.step h3 { margin: 0 0 8px; font-size: 15px; }
.step p { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.55; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 41px; right: -20px;
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--accent-green-dim), transparent);
}

/* ==========================================================================
   Products (meter showcase gets its own section)
   ========================================================================== */

.landing-products { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.landing-products .meters-showcase { margin-top: 0; padding-top: 0; }

/* ==========================================================================
   Call to action band (meter photo behind a dark overlay)
   ========================================================================== */

.landing-cta { max-width: 1080px; margin: 0 auto; padding: 0 24px 100px; }
.cta-inner {
  padding: 68px 32px;
  border: 1px solid var(--border-hair);
  border-radius: 16px;
  text-align: center;
  background:
    linear-gradient(rgba(20, 10, 5, 0.70), rgba(20, 10, 5, 0.90)),
    url("assets/meters/meter-installed.jpg") center / cover;
}
.cta-inner h2 { max-width: 600px; margin: 0 auto; font-size: 30px; font-weight: 700; line-height: 1.25; }
.cta-inner p { max-width: 480px; margin: 14px auto 0; font-size: 14.5px; color: #E6CDB8; line-height: 1.6; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }
.cta-inner .hero-ctas { margin-top: 28px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.landing-contact { max-width: 980px; margin: 0 auto; padding: 0 24px 100px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-card:hover { border-color: var(--accent-green-dim); transform: translateY(-2px); }
.contact-card--email { grid-column: 1 / -1; }
.contact-icon {
  flex: 0 0 42px;
  height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 138, 61, 0.1);
  color: var(--accent-green);
}
.contact-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-label { font-size: 11.5px; color: var(--text-tertiary); }
.contact-value { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

/* ==========================================================================
   Site footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--border-hair-soft); background: var(--bg-raised); }
.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: 36px;
}
.footer-brand p { margin-top: 14px; max-width: 280px; font-size: 12.5px; color: var(--text-tertiary); line-height: 1.6; }
.footer-col h4 { margin: 0 0 12px; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.footer-col a, .footer-link-btn { display: block; padding: 5px 0; font-size: 13px; color: var(--text-tertiary); text-align: left; }
.footer-col a:hover, .footer-link-btn:hover { color: var(--text-primary); }
.footer-bottom { padding: 18px 24px; border-top: 1px solid var(--border-hair-soft); text-align: center; font-size: 12px; color: var(--text-tertiary); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .landing-nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 14px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-hair);
  }
  .landing-nav.is-open .landing-nav-links { display: flex; }
  .landing-nav-links a { padding: 13px 4px; font-size: 14.5px; border-bottom: 1px solid var(--border-hair-soft); }
  .landing-nav-links a:last-child { border-bottom: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .roles { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .landing-nav { padding: 14px 20px; }
  .landing-hero { padding-top: 52px; }
  .landing-hero h1 { font-size: 32px; }
  .section-head h2, .solutions-intro h2, .cta-inner h2 { font-size: 24px; }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 16px; gap: 12px; }
  .contact-card--email .contact-value { font-size: 13px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: 46px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; }
}

@media (max-width: 340px) {
  .contact-card--email .contact-value { font-size: 11.5px; }
}

/* ==========================================================================
   Global safety net: the `hidden` attribute must always win, no matter
   what a class rule elsewhere sets `display` to. .modal-overlay sets
   display:flex directly, which defeats [hidden] on the sign-in modal
   (same root-cause bug already fixed once in admin-style.css and once in
   the main app's style.css — this is that same pattern's third spot).
   Without this, #signin-overlay renders visible from the moment the page
   loads, blocking the whole landing page. ========================================================================== */
[hidden] { display: none !important; }

/* Header + hero buttons stay on one line */
.nav-actions .btn-primary, .nav-actions .btn-secondary { white-space: nowrap; display: inline-flex; align-items: center; }
.hero-ctas { align-items: stretch; }
.hero-ctas .hero-cta { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
@media (max-width: 640px) {
  #nav-resident-link { display: none; }
  .nav-actions .btn-primary { padding-left: 14px; padding-right: 14px; }
}
