/*
Theme Name: Jarvis Premium
Author: Jarvis (OpenClaw)
Version: 0.1.0
*/

:root{
  --jp-bg:#0b0b0b;
  --jp-ink:#111;
  --jp-text:#1a1a1a;
  --jp-muted:#5a5a5a;
  --jp-accent:#d6b35c;
  --jp-max:1100px;
  --jp-max-narrow:900px;
  --jp-radius:14px;
}

body{margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; color:var(--jp-text); background:#fff;}
a{color:inherit;}

.jp-container{max-width:var(--jp-max); margin:0 auto; padding:0 18px;}
.jp-container-narrow{max-width:var(--jp-max-narrow); margin:0 auto; padding:0 18px;}

/* Header */
.jp-header{position:sticky; top:0; z-index:50; background:#fff; border-bottom:1px solid #eee;}
.jp-header__inner{display:grid; grid-template-columns: auto 1fr auto; align-items:center; min-height:92px;}
.jp-brand{justify-self:start; margin-left:75px;}
.jp-brand a{display:flex; align-items:center; text-decoration:none;}
.jp-brand img{height:144px; width:auto; display:block;}

.jp-nav{grid-column:2; justify-self:center;}
.jp-nav ul{display:flex; gap:22px; list-style:none; padding:0; margin:0; align-items:center; justify-content:center;}
.jp-nav a{text-decoration:none; color:#222; font-weight:600; letter-spacing:0.2px;}
.jp-nav a:hover{color:#000;}

.jp-spacer{grid-column:3;}

/* Mobile */
.jp-mobile-toggle{display:none; justify-self:end; grid-column:3; margin-right:10px;}
.jp-drawer{display:none; position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:60;}
.jp-drawer__panel{position:absolute; right:0; top:0; height:100%; width:min(360px, 88vw); background:#fff; padding:18px;}
.jp-drawer__panel ul{display:flex; flex-direction:column; gap:14px; list-style:none; padding:0; margin:22px 0 0 0;}

@media (max-width: 900px){
  .jp-header__inner{grid-template-columns: auto 1fr auto;}
  .jp-brand{margin-left:0;}
  .jp-brand img{height:110px;}
  .jp-nav{display:none;}
  .jp-mobile-toggle{display:block;}
}

/* Buttons */
.jp-btn{display:inline-block; padding:12px 18px; background:var(--jp-accent); color:#111; text-decoration:none; border-radius:8px; font-weight:700;}

/* Content */
main{padding:34px 0 64px;}

/* Hero helper */
.jp-hero{background:var(--jp-bg); color:#fff; padding:56px 0;}
.jp-hero__grid{display:grid; grid-template-columns: 1.1fr 0.9fr; gap:28px; align-items:center;}
.jp-hero h1{margin:0 0 14px; font-size:46px; line-height:1.05;}
.jp-hero p{margin:0 0 16px; opacity:0.92;}
.jp-hero img{width:100%; height:auto; border-radius:var(--jp-radius); display:block;}
@media (max-width: 900px){
  .jp-hero__grid{grid-template-columns:1fr;}
  .jp-hero h1{font-size:36px;}
}

/* Footer */
.jp-footer{border-top:1px solid #eee; padding:22px 0; color:var(--jp-muted); font-size:14px;}

/* Premium editorial typography */
body{font-size:18px; line-height:1.7;}
h1,h2,h3{letter-spacing:-0.02em;}
h2{font-size:34px; margin-top:42px;}
.jp-container-narrow p{font-size:18px; color:#222;}
.jp-container-narrow p + p{margin-top:14px;}

/* Card-like section styling */
.jp-section{padding:44px 0;}
.jp-card{background:#fff; border:1px solid #eee; border-radius:16px; padding:22px; box-shadow:0 18px 40px rgba(0,0,0,0.06);} 

/* Button polish */
.jp-btn{box-shadow:0 16px 30px rgba(0,0,0,0.18);} 
.jp-btn:hover{filter:brightness(0.98);} 

/* Schedule table */
.jp-schedule table{width:100%; border-collapse:collapse; font-size:16px;}
.jp-schedule th, .jp-schedule td{border-bottom:1px solid #eee; padding:12px 10px; text-align:left;}
.jp-schedule th{font-size:12px; letter-spacing:0.08em; text-transform:uppercase; color:#555;}
.jp-schedule tr:hover td{background:#fafafa;}

/* Contact form */
.jp-form{max-width:760px; margin:0 auto;}
.jp-form label{display:block; font-weight:700; margin-bottom:6px;}
.jp-form input, .jp-form textarea{width:100%; padding:12px 12px; border:1px solid #e6e6e6; border-radius:12px; font-size:16px;}
.jp-form textarea{min-height:140px; resize:vertical;}
.jp-form .jp-form-row{margin-bottom:14px;}
.jp-alert{border:1px solid #eee; border-radius:14px; padding:14px 16px; margin: 0 auto 18px; max-width:760px;}
.jp-alert--success{background:#f5fff8; border-color:#c9f2d5;}
.jp-alert--error{background:#fff6f6; border-color:#f3c2c2;}

/* Premium contact form overrides */
.jp-form{max-width:860px;}
.jp-form .jp-form-row{margin-bottom:18px;}
.jp-form input, .jp-form textarea{
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  border-radius:14px;
  padding:14px 14px;
  font-size:16px;
  box-shadow:0 10px 30px rgba(0,0,0,0.04);
}
.jp-form input:focus, .jp-form textarea:focus{
  outline:none;
  border-color: rgba(214,179,92,0.9);
  box-shadow:0 0 0 4px rgba(214,179,92,0.25);
}
.jp-form button.jp-btn{
  padding:14px 22px;
  border:0;
  border-radius:12px;
  font-size:16px;
}
.jp-form label{font-size:13px; text-transform:uppercase; letter-spacing:0.08em; color:#555;}
.jp-container-narrow h1{font-size:44px; letter-spacing:-0.03em;}

/* Premium layout helpers */
.jp-surface{background:#fff;}
.jp-surface--alt{background:#f7f7f7;}
.jp-grid-2{display:grid; grid-template-columns: 1fr 1fr; gap:22px; align-items:start;}
@media (max-width:900px){.jp-grid-2{grid-template-columns:1fr;}}

.jp-kicker{font-size:12px; text-transform:uppercase; letter-spacing:0.12em; color:#666; margin:0 0 10px;}
.jp-lead{font-size:18px; color:#222; max-width:65ch;}

.jp-feature-list{margin:16px 0 0; padding-left:18px;}
.jp-feature-list li{margin:8px 0;}

/* Hero polish */
.jp-hero{background:radial-gradient(1200px 600px at 20% 10%, rgba(214,179,92,0.22), transparent 55%), #0b0b0b;}
.jp-hero p{max-width:60ch;}

/* Cards */
.jp-card{border:1px solid rgba(0,0,0,0.08);} 

/* Footer */
.jp-footer{background:#0b0b0b; color:rgba(255,255,255,0.74); border-top:0;}
.jp-footer a{color:rgba(255,255,255,0.85);}

/* Contact form final (override) */
.jp-card .jp-form{max-width:100% !important;}
.jp-card .jp-form input, .jp-card .jp-form textarea{
  width:100% !important;
  border:1px solid rgba(0,0,0,0.10) !important;
  background:#fff !important;
  border-radius:14px !important;
  padding:14px 14px !important;
  font-size:16px !important;
}
.jp-card .jp-form label{font-size:12px !important; text-transform:uppercase; letter-spacing:0.12em; color:#666;}
.jp-card .jp-form button.jp-btn{width:100%; display:block; text-align:center;}

/* Home hero readability */
.jp-hero{background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.72) 48%, rgba(255,255,255,0.00) 74%), #f6f6f6 !important; color:#111 !important;}
.jp-hero h1{color:#111 !important;}
.jp-hero p{color:#222 !important; opacity:1 !important;}
.jp-hero .jp-kicker{color:#444 !important;}

/* Force contact form styling in all contexts */
form.jp-form input, form.jp-form textarea{box-sizing:border-box;}
form.jp-form input, form.jp-form textarea{appearance:none; -webkit-appearance:none;}
form.jp-form input, form.jp-form textarea{border:1px solid rgba(0,0,0,0.10) !important; border-radius:14px !important; padding:14px 14px !important;}
form.jp-form label{display:block !important;}

/* Logo palette (approx) */
:root{
  --jp-blue-light:#d9e8f7;
  --jp-blue-dark:#1c3f66;
}

/* Home hero re-skin */
.jp-hero{
  background: var(--jp-blue-light) !important;
  color: var(--jp-blue-dark) !important;
}
.jp-hero h1{color:var(--jp-blue-dark) !important;}
.jp-hero p{color:rgba(28,63,102,0.88) !important;}
.jp-hero .jp-kicker{color:rgba(28,63,102,0.70) !important;}

/* Make title fit one line on desktop */
@media (min-width: 901px){
  .jp-hero h1{font-size:40px !important; letter-spacing:-0.03em; white-space:nowrap;}
}
@media (max-width: 900px){
  .jp-hero h1{font-size:34px !important;}
}

/* Buttons in hero */
.jp-hero .jp-btn{background: var(--jp-blue-dark) !important; color:#fff !important;}
.jp-hero .jp-btn[style*="background:#fff"]{background:transparent !important; color:var(--jp-blue-dark) !important; border:2px solid rgba(28,63,102,0.28) !important; box-shadow:none !important;}

/* Global button style (match reference) */
.jp-btn{
  background: linear-gradient(180deg, #2c5a82 0%, #1c3f66 100%) !important;
  color:#fff !important;
  border:1px solid rgba(0,0,0,0.18) !important;
  border-radius:10px !important;
  padding:14px 22px !important;
  font-weight:800 !important;
  letter-spacing:0.2px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.18), 0 22px 40px rgba(0,0,0,0.12) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.jp-btn:hover{filter:brightness(1.03); transform: translateY(-1px);} 
.jp-btn:active{transform: translateY(1px); box-shadow: 0 6px 0 rgba(0,0,0,0.18), 0 14px 26px rgba(0,0,0,0.12) !important;}

.jp-lang ul{list-style:none; margin:0; padding:0; display:flex; gap:10px; align-items:center;}
.jp-lang li{margin:0; padding:0;}
.jp-lang a{text-decoration:none; color:#1c3f66; opacity:0.85;}
.jp-lang .current-lang a{opacity:1; text-decoration:underline; text-underline-offset:4px;}
@media (max-width:900px){
  .jp-lang{display:none;}
}

/* Header layout fix */
.jp-nav{display:block;}
.jp-nav ul{justify-content:center;}
.jp-lang{justify-self:end;}

/* Header v2: logo left, menu centered, lang right */
.jp-header__inner{display:grid !important; grid-template-columns: auto 1fr auto !important; align-items:center !important; column-gap:18px !important;}
.jp-brand{margin-left:0 !important; justify-self:start !important;}
.jp-nav{display:block !important; justify-self:center !important;}
.jp-nav ul{justify-content:center !important;}
.jp-lang{display:block !important; justify-self:end !important;}
.jp-spacer{display:none !important;}

@media (max-width:900px){
  .jp-nav{display:none !important;}
  .jp-lang{display:none !important;}
}

/* Remove any default figure captions that show alt text */
.jp-card figure{margin:0;}
.jp-card figcaption{display:none !important;}

/* Program cards: bottom-align CTA buttons */
.jp-card{display:flex; flex-direction:column;}
.jp-card > div{display:flex; flex-direction:column; flex:1;}
.jp-card .jp-btn{margin-top:auto; align-self:flex-start;}

/* Programs: bottom-align CTA buttons within the 3-up cards */
.jp-card[style*="overflow:hidden"]{display:flex; flex-direction:column;}
.jp-card[style*="overflow:hidden"] > div{display:flex; flex-direction:column; flex:1;}
.jp-card[style*="overflow:hidden"] a.jp-btn{margin-top:auto;}

/* Programs: reliable bottom alignment */
.jp-card-body{display:flex; flex-direction:column; height:100%;}
.jp-card-body .jp-btn{margin-top:auto;}

/* Programs 3-up grid: equal heights + bottom aligned CTA */
@media (min-width:901px){
  .jp-card[style*="overflow:hidden"]{height:100%;}
  .jp-card[style*="overflow:hidden"] .jp-card-body{min-height: 420px;}
  .jp-card[style*="overflow:hidden"] .jp-card-body{display:flex; flex-direction:column;}
  .jp-card[style*="overflow:hidden"] .jp-card-body .jp-btn{margin-top:auto;}
}

/* Programs grid: equal-height cards + bottom-aligned CTAs */
.jp-program-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; align-items:stretch;}
@media (max-width:900px){.jp-program-grid{grid-template-columns:1fr;}}
.jp-program-card{padding:0; overflow:hidden; display:flex; flex-direction:column;}
.jp-program-img{width:100%; height:auto; display:block;}
.jp-program-body{padding:18px; display:flex; flex-direction:column; flex:1;}
.jp-program-body h2{margin:0 0 10px 0; font-size:24px;}
.jp-program-cta{margin-top:auto; padding-top:16px;}
.jp-program-cta .jp-btn{display:inline-block;}

/* Mobile polish (v1) */
@media (max-width:900px){
  .jp-container, .jp-container-narrow{padding-left:16px; padding-right:16px;}
  .jp-header__inner{min-height:78px;}
  .jp-brand img{height:56px;}
  .jp-mobile-toggle{padding:10px 12px; border-radius:12px;}

  /* Hero: tighten spacing */
  .jp-hero{padding:34px 0;}
  .jp-hero__grid{gap:16px;}
  .jp-hero h1{font-size:30px; line-height:1.08;}
  .jp-hero .jp-lead{font-size:16px;}
  .jp-hero p{font-size:15px;}

  /* Buttons full width on mobile when stacked */
  .jp-hero a.jp-btn{width:100%; text-align:center;}
  .jp-program-cta .jp-btn{width:100%; text-align:center;}

  /* Cards: reduce padding */
  .jp-card{padding:16px; border-radius:16px;}
  .jp-program-card{border-radius:18px;}
  .jp-program-body{padding:16px;}

  /* Forms */
  .jp-form input, .jp-form textarea{font-size:16px;}
  .jp-form button.jp-btn{width:100%;}
}

/* Header button base styling (avoid inline styles) */
.jp-mobile-toggle{background:transparent;border:1px solid #ddd;border-radius:12px;padding:10px 12px;font-weight:800;}
.jp-drawer-close{background:transparent;border:1px solid #ddd;border-radius:12px;padding:8px 10px;font-weight:800;}

/* Drawer menu styling */
.jp-drawer-nav ul{list-style:none; margin:18px 0 0 0; padding:0; display:flex; flex-direction:column; gap:12px;}
.jp-drawer-nav a{text-decoration:none; font-weight:800; color:#1c3f66;}

/* Text overflow safety */
h1,h2,h3,p,a,li{overflow-wrap:anywhere;}

@media (max-width:900px){
  /* Stack hero buttons vertically */
  .jp-hero .jp-hero__grid > div:first-child > div{flex-direction:column !important;}
  .jp-hero .jp-hero__grid > div:first-child > div .jp-btn{width:100% !important;}
}

/* Home: stack the 3 image cards vertically on mobile */
@media (max-width:900px){
  .jp-section .jp-container > div[style*="grid-template-columns:repeat(3"]{grid-template-columns:1fr !important;}
  .jp-section .jp-container > div[style*="grid-template-columns:repeat(3"] .jp-card{max-width: 520px; margin-left:auto; margin-right:auto;}
}

/* Mobile: prevent buttons from overflowing viewport */
@media (max-width:900px){
  .jp-btn{max-width:100% !important; box-sizing:border-box !important;}
  .jp-hero a.jp-btn{max-width:100% !important;}
  .jp-hero .jp-btn{box-shadow: 0 8px 0 rgba(0,0,0,0.18), 0 16px 28px rgba(0,0,0,0.12) !important;}
}

.jp-drawer-lang ul{list-style:none; margin:0; padding:0; display:flex; gap:10px;}
.jp-drawer-lang a{text-decoration:none; font-weight:800; color:#1c3f66; opacity:0.85;}
.jp-drawer-lang .current-lang a{opacity:1; text-decoration:underline; text-underline-offset:4px;}
