:root{
  /* Fixed brand accents — same in both themes */
  --thread:#B23A2E; --chalk:#3E5C76;

  /* Theme-aware roles (light values here; dark overrides below) */
  --bg:#F5F2E9;           /* page background */
  --bg-alt:#EDE7D6;       /* alternating section background */
  --surface:#FBFAF6;      /* card / input background */
  --text:#2A2924;         /* primary text */
  --text-muted:#6E6A5F;   /* secondary text */
  --border:#EDE7D6;       /* subtle borders/dividers */
  --accent-bg:#2A2924;    /* button / icon-circle background */
  --accent-text:#FBFAF6;  /* text on accent-bg */

  /* Kept for the hero + rich footer, which are always dark regardless of
     site theme (see the "Landing page + rich footer" block below) —
     these values never change between light/dark mode on purpose. */
  --ink:#2A2924; --muslin:#EDE7D6; --white:#FBFAF6;
}
:root[data-theme="dark"]{
  --bg:#1B1A16; --bg-alt:#211F1A; --surface:#252420;
  --text:#EDE7D6; --text-muted:#A39E8F; --border:#3A362D;
  --accent-bg:#EDE7D6; --accent-text:#1B1A16;
  --thread:#E2685A; --chalk:#7CA0C4;
}

*{box-sizing:border-box;}
body{margin:0; font-family:'IBM Plex Sans', Arial, sans-serif; background:var(--bg); color:var(--text); transition:background .2s ease, color .2s ease;}
a{color:var(--chalk); text-decoration:none;}

.site-header{display:flex; justify-content:space-between; align-items:center; padding:16px 32px; border-bottom:1px solid var(--border); background:var(--bg); position:sticky; top:0; z-index:50; flex-wrap:wrap; gap:10px;}
.brand{font-size:20px; font-weight:700; color:var(--text);}
.header-right{display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:4px;}
.site-header nav{display:flex; align-items:center; flex-wrap:wrap; order:1;}
.site-header nav a{margin-left:16px; font-size:14px; color:var(--text);}
.user-name{margin-left:16px; font-size:14px; color:var(--text-muted);}
.logout-btn{background:none; border:none; cursor:pointer; font:inherit; margin-left:12px; color:var(--text); padding:0;}
.btn-ghost{border:1px solid var(--text); padding:6px 12px; border-radius:3px; color:var(--text);}
.container{max-width:1000px; margin:0 auto; padding:32px;}

.alert{padding:10px 14px; border-radius:3px; margin-bottom:16px; font-size:14px;}
.alert-success{background:#e4efe4; border:1px solid #4a7a4a; color:#1c3d1c;}
.alert-error{background:#f6e2df; border:1px solid var(--thread); color:#5c1f16;}

form{max-width:420px;}
label{display:block; font-size:13px; color:var(--text-muted); margin:14px 0 4px;}
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], textarea, select{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:3px; font-size:14px;
  font-family:inherit; background:var(--surface); color:var(--text);
}
input[type=file]{max-width:100%;}
button, .btn{
  background:var(--accent-bg); color:var(--accent-text); border:1px solid var(--accent-bg);
  padding:10px 18px; border-radius:3px; cursor:pointer; font-size:14px; margin-top:16px; display:inline-block;
}
button.secondary{background:transparent; color:var(--text); border-color:var(--text);}

/* display:block on <table> turns the table itself into a scrollable
   container (cells inside keep their normal table layout, since thead/
   tbody/tr/td aren't touched) — so a wide table scrolls within its own
   box on narrow screens instead of blowing out the whole page layout. */
table{
  display:block; overflow-x:auto; -webkit-overflow-scrolling:touch;
  width:100%; border-collapse:collapse; margin-top:20px; max-width:100%;
}
th, td{text-align:left; padding:10px 12px; border-bottom:1px solid var(--border);}
th{font-size:12px; text-transform:uppercase; color:var(--text-muted); letter-spacing:.04em;}

.status-pill{font-size:11px; padding:4px 10px; border-radius:20px; border:1px solid var(--text); text-transform:uppercase; color:var(--text);}
.status-pill.in_progress, .status-pill.deal_finalized{background:var(--chalk); color:#fff; border-color:var(--chalk);}
.status-pill.delivered, .status-pill.closed{background:var(--accent-bg); color:var(--accent-text); border-color:var(--accent-bg);}

.card{background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:20px; margin-bottom:16px;}
.pipeline{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:14px; margin:20px 0;}
.pipeline .col h4{font-size:12px; text-transform:uppercase; color:var(--text-muted); border-bottom:1px solid var(--border); padding-bottom:6px;}
.pipeline .order-card{background:var(--surface); border:1px solid var(--border); border-radius:3px; padding:10px; margin-bottom:8px; font-size:13px;}
.pipeline .order-card a{font-weight:600; color:var(--text);}

/* Theme + mobile nav toggle buttons (shared by app header and landing nav) */
.theme-toggle{
  background:none; border:1px solid var(--border); color:var(--text); border-radius:4px;
  width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0; margin:0 8px; order:2;
}
.theme-toggle .icon-moon{display:none;}
[data-theme="dark"] .theme-toggle .icon-sun{display:none;}
[data-theme="dark"] .theme-toggle .icon-moon{display:inline-flex;}
.nav-toggle{
  display:none; background:none; border:1px solid var(--border); color:var(--text); border-radius:4px;
  width:38px; height:38px; align-items:center; justify-content:center; cursor:pointer; padding:0; order:3;
}

/* ============================================================
   Landing page + rich footer
   ============================================================ */

.landing-nav{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 32px; border-bottom:1px solid var(--border); background:var(--bg);
  position:sticky; top:0; z-index:50; flex-wrap:wrap; gap:10px;
}
.landing-nav .brand{font-size:22px; font-weight:700; color:var(--text);}
.landing-nav .brand span{color:var(--thread);}

.nav-collapsible{display:flex; align-items:center; gap:24px; flex:1; justify-content:flex-end; margin-right:16px; order:1;}
.landing-nav .nav-links{display:flex; align-items:center;}
.landing-nav .nav-links a{margin-left:18px; font-size:14px; color:var(--text);}
.nav-auth{display:flex; align-items:center; gap:10px;}
.nav-controls{display:flex; align-items:center; gap:4px; order:2;}

.nav-auth .btn-primary{
  background:var(--accent-bg); color:var(--accent-text); padding:8px 16px; border-radius:3px;
}
.nav-auth .btn-outline{
  border:1px solid var(--text); color:var(--text); padding:7px 15px; border-radius:3px;
}

/* Mobile hamburger collapse — applies to both the landing nav and the
   app header nav once the viewport gets narrow. The toggle controls
   (theme + hamburger) are re-ordered to come FIRST so they stay on the
   header's first line even when the collapsible nav below them opens up
   to full width — otherwise flexbox would push them down onto a second
   line along with the open menu. Auto-close-on-link-click and
   click-outside-to-close are handled in assets/js/site.js. */
@media (max-width:860px){
  .nav-toggle{display:inline-flex;}

  .nav-controls{order:1;}
  .nav-collapsible{
    display:none; flex-basis:100%; flex-direction:column; align-items:flex-start; gap:14px;
    order:2; padding-top:14px; border-top:1px solid var(--border); margin-top:4px; margin-right:0;
  }
  .landing-nav.nav-open .nav-collapsible{display:flex;}
  .landing-nav .nav-links{flex-direction:column; align-items:flex-start; width:100%;}
  .landing-nav .nav-links a{margin-left:0; padding:8px 4px;}
  .nav-auth{width:100%;}
  .nav-auth a{flex:1; text-align:center;}

  .theme-toggle{order:1;}
  .nav-toggle{order:2;}
  .site-header nav{
    display:none; flex-basis:100%; flex-direction:column; align-items:flex-start; gap:2px;
    order:3; padding-top:12px; border-top:1px solid var(--border); margin-top:8px;
  }
  .site-header.nav-open nav{display:flex;}
  .site-header nav a, .user-name, .logout-btn{margin-left:0 !important; padding:6px 0;}
}

/* Hero carousel */
.hero{position:relative; height:460px; overflow:hidden; color:var(--white);}
.hero-slide{
  position:absolute; inset:0; opacity:0; transition:opacity 1s ease;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:32px;
}
.hero-slide.active{opacity:1;}
.hero-slide .hero-inner{max-width:720px;}
.hero-slide .eyebrow{
  font-size:12px; letter-spacing:.12em; text-transform:uppercase; opacity:.85; margin-bottom:10px;
}
.hero-slide h1, .hero-slide .hero-heading{font-size:38px; line-height:1.2; margin:0 0 14px;}
.hero-slide p{font-size:16px; opacity:.92; margin:0 0 22px;}
.hero-slide .btn-hero{
  background:var(--white); color:var(--ink); padding:12px 24px; border-radius:3px;
  font-weight:600; display:inline-block; margin-right:10px;
}
.hero-slide .btn-hero.outline{
  background:transparent; color:var(--white); border:1px solid var(--white);
}
.hero-dots{
  position:absolute; bottom:18px; left:0; right:0; display:flex; justify-content:center; gap:8px;
}
.hero-dots button{
  width:9px; height:9px; border-radius:50%; border:1px solid var(--white); background:transparent;
  padding:0; margin:0; cursor:pointer;
}
.hero-dots button.active{background:var(--white);}

/* Generic marketing sections */
.section{padding:56px 32px;}
.section-inner{max-width:1000px; margin:0 auto;}
.section-title{font-size:28px; margin:0 0 8px; color:var(--text);}
.section-sub{color:var(--text-muted); font-size:15px; margin:0 0 36px; max-width:640px;}
.section.alt{background:var(--bg-alt);}

.why-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:20px;}
.why-card{background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:22px;}
.why-card .icon{
  width:42px; height:42px; border-radius:50%; background:var(--accent-bg); color:var(--accent-text);
  display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-size:18px;
}
.why-card h3{font-size:16px; margin:0 0 8px; color:var(--text);}
.why-card p{font-size:13.5px; color:var(--text-muted); margin:0; line-height:1.55;}

.steps-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:20px;}
.step-card{position:relative; padding:22px 18px 18px; background:var(--surface); border:1px solid var(--border); border-radius:6px;}
.step-card .step-num{
  font-size:13px; font-weight:700; color:var(--thread); letter-spacing:.06em; margin-bottom:8px;
}
.step-card h3{font-size:15px; margin:0 0 6px; color:var(--text);}
.step-card p{font-size:13px; color:var(--text-muted); margin:0; line-height:1.5;}

.faq-item{border-bottom:1px solid var(--border); padding:14px 0;}
.faq-item summary{cursor:pointer; font-weight:600; font-size:15px; list-style:none; color:var(--text);}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::before{content:"+ "; color:var(--thread); font-weight:700;}
.faq-item[open] summary::before{content:"– ";}
.faq-item p{color:var(--text-muted); font-size:14px; margin:10px 0 0; line-height:1.6;}

.contact-grid{display:grid; grid-template-columns:1.2fr 1fr; gap:32px;}
@media (max-width:760px){ .contact-grid{grid-template-columns:1fr;} }
.contact-info-list{list-style:none; padding:0; margin:0;}
.contact-info-list li{margin-bottom:14px; font-size:14px; display:flex; align-items:center; gap:8px; color:var(--text);}
.contact-info-list a{color:var(--text); font-weight:600;}

/* Rich 3-column footer */
.site-footer-rich{background:var(--ink); color:var(--muslin); padding:48px 32px 20px;}
.footer-grid{
  max-width:1000px; margin:0 auto; display:grid;
  grid-template-columns:1.3fr 1fr 1fr; gap:36px;
}
@media (max-width:760px){ .footer-grid{grid-template-columns:1fr;} }
.footer-col h4{
  color:var(--white); font-size:13px; text-transform:uppercase; letter-spacing:.08em;
  margin:0 0 16px;
}
.footer-col p, .footer-col a{color:var(--muslin); font-size:13.5px;}
.footer-col a{display:flex; align-items:center; gap:7px; margin-bottom:9px;}
.footer-col a:hover{color:var(--white);}
.footer-profile-name{color:var(--white); font-weight:700; font-size:15px; margin:0 0 2px;}
.footer-profile-title{color:var(--muslin); font-size:12.5px; margin:0 0 14px;}

.social-icons{display:flex; gap:8px; margin-top:14px; flex-wrap:wrap;}
.social-icons a{
  width:32px; height:32px; border-radius:50%; border:1px solid #4a4738;
  display:flex; align-items:center; justify-content:center; margin:0;
  font-size:11px; font-weight:700; color:var(--muslin);
}
.social-icons a:hover{background:var(--thread); border-color:var(--thread); color:var(--white);}

.footer-bottom{
  max-width:1000px; margin:32px auto 0; padding-top:18px; border-top:1px solid #4a4738;
  font-size:12px; color:#9b9686; text-align:center;
}
