/* =========================================================
   HospiEdge Premium Site CSS (drop-in replacement)
   File: /assets/css/site.css
   Notes:
   - Keeps your existing class names working
   - Adds a premium SaaS look + better spacing/typography
   - Works with your existing _partials and pages
========================================================= */

:root{
  --bg:#0b0f17;
  --text:#0b1220;
  --text-dark:#e5e7eb;
  --brand:#3b82f6;
  --brand2:#06b6d4;
  --muted:#64748b;
  --border:rgba(15,23,42,.12);
  --surface:#ffffff;
  --surface-alt:#f8fafc;
  --radius:16px;
  --shadow:0 14px 48px rgba(2,8,23,.10);
  --shadow-sm:0 10px 28px rgba(2,8,23,.08);
  --container:1180px;

  --ring:rgba(59,130,246,.28);
  --ring-strong:rgba(6,182,212,.30);
  --glass:rgba(255,255,255,.82);

  --h1:clamp(2.1rem,4.8vw,3.6rem);
  --h2:clamp(1.8rem,3.2vw,2.5rem);
  --h3:1.2rem;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--text);
  background:#fff;
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

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

.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
}
.skip-link:focus{
  left:10px;
  background:#fff;
  padding:.55rem .85rem;
  border-radius:10px;
  border:1px solid var(--border);
  z-index:1000;
  box-shadow:var(--shadow-sm);
}

section{ padding:5.4rem 0; }
.surface{
  background:var(--surface-alt);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

/* =========================================================
   Header / Nav
========================================================= */
.site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:var(--glass);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:82px;
  gap:1rem;
}

.logo{
  display:inline-flex;
  align-items:center;
  gap:.65rem;
  font-weight:800;
  letter-spacing:-.02em;
}
.logo-mark{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:12px;
  background:linear-gradient(140deg, var(--brand), var(--brand2));
  color:#fff;
  box-shadow:0 10px 28px rgba(59,130,246,.30);
}
.site-nav{
  display:flex;
  align-items:center;
  gap:1.25rem;
}
.site-nav ul{
  display:flex;
  list-style:none;
  gap:.9rem;
  padding:0;
  margin:0;
}
.site-nav a{
  padding:.55rem .65rem;
  border-radius:12px;
  color:var(--muted);
  font-weight:600;
  transition: all .18s ease;
}
.site-nav a:hover{
  color:var(--text);
  background:rgba(15,23,42,.045);
}
.site-nav a.active{
  color:var(--text);
  background:rgba(59,130,246,.08);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.16);
}

.nav-cta{ margin-left:.5rem; }

.menu-toggle{
  display:none;
  border:1px solid var(--border);
  background:#fff;
  width:48px;
  height:48px;
  border-radius:14px;
  padding:.35rem;
  box-shadow:0 6px 18px rgba(2,8,23,.06);
}
.menu-toggle span{
  display:block;
  width:22px;
  height:2px;
  margin:5px auto;
  background:#0f172a;
  border-radius:2px;
}

/* =========================================================
   Typography
========================================================= */
h1,h2,h3{
  margin:0 0 .85rem;
  letter-spacing:-.03em;
  line-height:1.15;
}
.hero h1{ font-size:var(--h1); }
.section-head h2{ font-size:var(--h2); }
.card h3{ font-size:var(--h3); }

.page-title{
  font-size:var(--h2);
  margin:0 0 .85rem;
}

.lead, .section-head p{
  color:var(--muted);
  font-size:1.08rem;
  max-width:760px;
}

/* =========================================================
   Hero (premium)
========================================================= */
.hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(1100px 520px at 10% 12%, rgba(59,130,246,.35), transparent 50%),
    radial-gradient(900px 520px at 90% 18%, rgba(6,182,212,.28), transparent 52%),
    linear-gradient(180deg, #070b12 0%, #0b0f17 60%, #0b0f17 100%);
  color:var(--text-dark);
  padding:6.6rem 0 5.6rem;
}
.hero::after{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(700px 280px at 40% 100%, rgba(255,255,255,.10), transparent 60%);
  pointer-events:none;
}
.hero p{
  font-size:clamp(1rem,2vw,1.15rem);
  max-width:760px;
  color:#d1d5db;
  position:relative;
  z-index:1;
}
.hero .container{ position:relative; z-index:1; }

.badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.38rem .8rem;
  background:rgba(59,130,246,.12);
  color:#bfe0ff;
  font-weight:700;
  font-size:.85rem;
  border:1px solid rgba(59,130,246,.22);
}

/* =========================================================
   Layout / Cards / Grids
========================================================= */
.grid-3, .grid-2{
  display:grid;
  gap:1.1rem;
}
.grid-3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
.grid-2{ grid-template-columns:repeat(2, minmax(0,1fr)); }

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.5rem;
  box-shadow:var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow:0 18px 60px rgba(2,8,23,.14);
  border-color:rgba(59,130,246,.18);
}
.card p{
  color:var(--muted);
  margin:0;
}

/* Subtle “featured” variant if you want to add class="card featured" */
.card.featured{
  border-color:rgba(6,182,212,.24);
  box-shadow:0 18px 64px rgba(6,182,212,.10);
}

/* =========================================================
   Buttons
========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  min-height:46px;
  border-radius:14px;
  padding:.72rem 1.05rem;
  font-weight:800;
  border:1px solid transparent;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  cursor:pointer;
  user-select:none;
  will-change:transform;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background:linear-gradient(135deg, var(--brand), #2563eb 50%, var(--brand2));
  color:#fff;
  box-shadow:0 14px 34px rgba(59,130,246,.30);
}
.btn-primary:hover{
  box-shadow:0 18px 52px rgba(59,130,246,.38);
}
.btn-secondary{
  background:#fff;
  color:var(--text);
  border-color:rgba(15,23,42,.14);
  box-shadow:0 10px 22px rgba(2,8,23,.06);
}
.btn-secondary:hover{
  color:var(--text);
  border-color:rgba(15,23,42,.24);
  box-shadow:0 14px 30px rgba(2,8,23,.09);
}
.btn-ghost{
  background:transparent;
  border-color:rgba(229,231,235,.22);
  color:#fff;
}
.btn-ghost:hover{
  border-color:rgba(229,231,235,.45);
  background:rgba(255,255,255,.04);
}

.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:.9rem;
  margin-top:1.8rem;
}

/* =========================================================
   Tables
========================================================= */
.table-wrap{
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:#fff;
  box-shadow:var(--shadow-sm);
}
table{
  width:100%;
  border-collapse:collapse;
  min-width:680px;
}
th,td{
  padding:1rem 1.05rem;
  text-align:left;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
th{
  background:#f1f5f9;
  font-size:.9rem;
  letter-spacing:.01em;
}
tbody tr:hover td{
  background:rgba(59,130,246,.035);
}

/* =========================================================
   FAQ / Accordion
========================================================= */
.faq-item{
  border:1px solid var(--border);
  border-radius:14px;
  margin-bottom:.9rem;
  background:#fff;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.faq-question{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  padding:1.05rem 1.05rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:900;
  cursor:pointer;
  color:var(--text);
}
.faq-question span{
  display:inline-grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:10px;
  background:rgba(59,130,246,.08);
  border:1px solid rgba(59,130,246,.16);
  color:var(--brand);
}
.faq-answer{
  padding:0 1.05rem 1.05rem;
  color:var(--muted);
}
.faq-answer[hidden]{ display:none; }

/* =========================================================
   Forms
========================================================= */
.form-grid{ display:grid; gap:.95rem; }
label{ font-weight:700; color:var(--text); }
input, textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:14px;
  padding:.85rem .9rem;
  font:inherit;
  background:#fff;
  box-shadow:0 10px 22px rgba(2,8,23,.04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea{ min-height:170px; resize:vertical; }
input:focus, textarea:focus, button:focus, a:focus{
  outline:none;
  border-color:rgba(59,130,246,.45);
  box-shadow:0 0 0 4px var(--ring);
}
.alert-success{
  margin-bottom:1rem;
  border:1px solid #86efac;
  background:#f0fdf4;
  color:#166534;
  border-radius:14px;
  padding:.85rem 1rem;
  box-shadow:0 10px 20px rgba(22,101,52,.08);
}

/* =========================================================
   Footer (premium)
========================================================= */
.site-footer{
  background:linear-gradient(180deg, #0b1220 0%, #0b1220 70%, #070b12 100%);
  color:#cbd5e1;
  padding:3.2rem 0 1.6rem;
}
.site-footer .logo{ color:#f8fafc; }
.site-footer p{ color:#94a3b8; margin:.6rem 0 0; }
.site-footer h2{
  font-size:1rem;
  color:#f8fafc;
  margin:0 0 .75rem;
  letter-spacing:-.01em;
}
.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:1.4rem;
}
.site-footer ul{
  padding:0;
  margin:0;
  list-style:none;
  display:grid;
  gap:.45rem;
}
.site-footer a{
  color:#cbd5e1;
  transition: color .16s ease;
}
.site-footer a:hover{ color:#fff; }

.footer-bottom{
  margin-top:1.7rem;
  padding-top:1.1rem;
  border-top:1px solid rgba(148,163,184,.18);
  color:#94a3b8;
}
  /* ------------------------------------------------------------------ */
  /* POLISH (visual only) — keeps all existing content & structure intact */
  /* ------------------------------------------------------------------ */

  /* Keep all changes scoped to this page's main content */
  #content {
    padding-bottom: 4rem;
  }

  #content .container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
  }

  /* Typography polish */
  #content h1 {
    font-size: clamp(2.15rem, 3.6vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: .75rem;
  }
  #content h2 {
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    line-height: 1.14;
    letter-spacing: -0.01em;
  }
  #content p {
    line-height: 1.6;
    font-size: 1.02rem;
  }
  #content .section-head {
    max-width: 820px;
    margin-bottom: 1.6rem;
  }
  #content .section-head p {
    font-size: 1.05rem;
    opacity: .92;
  }

  /* Section spacing (hero/surface handle their own padding) */
  #content > section:not(.hero):not(.surface) {
    padding: 3.25rem 0;
  }

  /* HERO: richer background + safer padding for PWA status bars */
  #content .hero {
    position: relative;
    padding: calc(5.25rem + env(safe-area-inset-top)) 0 4.25rem;
    overflow: hidden;
    background:
      radial-gradient(1200px 650px at 15% -10%, rgba(255,255,255,.14), transparent 60%),
      radial-gradient(900px 550px at 95% 0%, rgba(255,255,255,.10), transparent 55%),
      linear-gradient(135deg, #0b1220 0%, #121a2f 45%, #0b1220 100%);
  }

  /* CTA row */
  #content .cta-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
  }

  /* Buttons (scoped — won't affect header buttons) */
  #content .btn {
    border-radius: 14px;
    padding: .86rem 1.05rem;
    font-weight: 650;
    letter-spacing: .01em;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 10px 22px rgba(0,0,0,.08);
  }
  #content .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
  }
  #content .btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(0,0,0,.09);
  }
  #content .btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .35);
    outline-offset: 3px;
  }

  /* Badge: cleaner pill styling */
  #content .badge {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(10px);
    font-weight: 650;
    letter-spacing: .02em;
    font-size: .82rem;
  }

  /* Video polish */
  #content .hero-video {
    max-width: 760px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 44px rgba(0,0,0,.32);
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  /* Cards */
  #content .card {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 34px rgba(0,0,0,.06);
    padding: 1.35rem 1.35rem 1.25rem;
    transition: transform .16s ease, box-shadow .16s ease;
  }
  #content .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(0,0,0,.08);
  }

  /* Card image: sharper corners + subtle border */
  #content .card-img-top {
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
  }

  /* Grids: consistent gaps + responsive */
  #content .grid-3,
  #content .grid-2 {
    display: grid;
    gap: 1.25rem;
  }
  #content .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #content .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (max-width: 980px) {
    #content .grid-3 { grid-template-columns: 1fr; }
    #content .grid-2 { grid-template-columns: 1fr; }
    #content .hero { padding: calc(4.5rem + env(safe-area-inset-top)) 0 3.5rem; }
    #content h1 { font-size: clamp(2.0rem, 6vw, 2.6rem); }
  }

  /* Surface sections: softer background + more breathing room */
  #content .surface {
    padding: 3.5rem 0;
    background:
      linear-gradient(180deg, rgba(248,250,252,1) 0%, rgba(243,246,250,1) 100%);
  }

  /* Book cover row */
  #content .book-cover-grid {
    align-items: center;
  }
  #content .book-cover-mini {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 10px;
  }

  /* FAQ polish */
  #content .faq-item {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0,0,0,.05);
    margin-bottom: .9rem;
  }
  #content .faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    font-weight: 700;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
  }
  #content .faq-question span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: rgba(15, 23, 42, .04);
    flex: 0 0 auto;
  }
  #content .faq-question:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .30);
    outline-offset: 4px;
  }
  #content .faq-answer {
    padding: 0 1.1rem 1.05rem;
  }
  #content .faq-answer p {
    margin-top: .25rem;
    margin-bottom: 0;
  }

/* =========================================================
   Utilities
========================================================= */
.section-head{ margin-bottom:2rem; max-width:820px; }
.section-head h2{ margin:0 0 .75rem; }
.section-head p{ margin:0; }

.hr{
  height:1px;
  background:var(--border);
  border:0;
  margin:2rem 0;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 900px){
  section{ padding:4.2rem 0; }
  .grid-3, .grid-2, .footer-grid{ grid-template-columns:1fr; }
  .site-nav{
    position:absolute;
    inset:82px 0 auto 0;
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:1rem;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:1rem;
    box-shadow:0 18px 40px rgba(2,8,23,.10);
  }
  .site-nav.open{ display:flex; }
  .site-nav ul{ flex-direction:column; gap:.55rem; }
  .menu-toggle{ display:inline-grid; place-items:center; }
  .nav-cta{ margin-left:0; width:100%; }
}

/* =========================================================
   Reduced motion
========================================================= */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
