/* =====================================================================
   css/main.css
   Site-wide stylesheet for MARKETING pages only (header, footer, homepage
   sections, features/learn/about/contact pages, FAQ, ad slots).
   Loaded only via includes/header.php — dojicraft-trading-simulation.php never loads this file,
   so the trading simulator is completely unaffected.
   Reuses the CSS custom properties defined in css/styles.css (:root).
   ===================================================================== */

/* ---------- STICKY HEADER / NAV ---------- */
.site-header{
  position:sticky; top:0; z-index:120; width:100%;
  background:rgba(255,255,255,.85); backdrop-filter:blur(14px) saturate(160%);
  border-bottom:1px solid var(--line);
}
.site-header-inner{
  max-width:1200px; margin:0 auto; padding:0 24px; height:68px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
}
.site-logo{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.site-logo .bars{ display:flex; align-items:flex-end; gap:3px; height:26px; }
.site-logo .bars i{ width:5px; border-radius:2px; display:block; }
.site-logo .bars i:nth-child(1){ height:10px; background:var(--red); }
.site-logo .bars i:nth-child(2){ height:18px; background:var(--gold); }
.site-logo .bars i:nth-child(3){ height:26px; background:var(--green); }
.site-logo .bars i:nth-child(4){ height:14px; background:var(--green); }
.site-logo-text{ font-family:var(--font-d); font-weight:800; font-size:19px; color:var(--text); letter-spacing:-.01em; }

.site-nav{ display:flex; align-items:center; gap:6px; flex:1; justify-content:center; }
.site-nav a{
  font-size:13.5px; font-weight:600; color:var(--muted); text-decoration:none;
  padding:9px 14px; border-radius:8px; transition:.15s;
}
.site-nav a:hover{ color:var(--text); background:rgba(19,23,34,.05); }
.site-nav a.active{ color:var(--green); background:var(--green-dim); }

.site-header-cta{ display:flex; align-items:center; gap:12px; }
.btn-sm{ padding:9px 16px !important; font-size:13px !important; }

.nav-toggle{
  display:none; width:38px; height:38px; border-radius:9px; background:rgba(19,23,34,.05);
  border:1px solid var(--line); flex-direction:column; align-items:center; justify-content:center; gap:4px;
}
.nav-toggle span{ width:18px; height:2px; background:var(--text); border-radius:2px; transition:.2s; }
.nav-backdrop{ display:none; position:fixed; inset:0; background:rgba(15,20,30,.45); backdrop-filter:blur(2px); z-index:110; }

@media (max-width:900px){
  .site-nav{
    position:fixed; top:68px; right:0; height:calc(100dvh - 68px); width:0;
    background:var(--card); border-left:1px solid var(--line); flex-direction:column; justify-content:flex-start;
    align-items:stretch; padding:18px 0; gap:4px; overflow:hidden; transition:width .25s ease; z-index:115;
    box-shadow:-24px 0 48px rgba(16,24,40,.12); white-space:nowrap;
  }
  .site-nav.open{ width:min(320px,86vw); padding:18px; }
  .site-nav a{ padding:14px 12px; border-radius:10px; font-size:15px; }
  .nav-toggle{ display:flex; }
  .nav-backdrop.open{ display:block; }
  .site-header-cta .btn-sm{ display:none; }
}
@media (max-width:520px){
  .site-header-inner{ padding:0 16px; }
}

/* ---------- SHARED SECTION SHELL ---------- */
.section{ padding:90px 20px; }
.section-alt{ background:var(--bg-raise); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section-inner{ max-width:1120px; margin:0 auto; }

/* ---------- TERMINAL / DASHBOARD FEATURE SECTION ---------- */
.terminal-section{ padding:90px 20px; background:linear-gradient(180deg, var(--bg) 0%, var(--bg-raise) 100%); }
.terminal-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; max-width:1160px; margin:0 auto;
}
.glass-card{
  position:relative; background:rgba(255,255,255,.55); backdrop-filter:blur(16px) saturate(160%);
  border:1px solid rgba(255,255,255,.6); box-shadow:0 8px 30px -12px rgba(16,24,40,.15), inset 0 1px 0 rgba(255,255,255,.6);
  border-radius:18px; padding:24px; overflow:hidden; transition:transform .25s ease, box-shadow .25s ease;
}
.glass-card::before{
  content:''; position:absolute; inset:0; border-radius:18px; padding:1px;
  background:linear-gradient(135deg, rgba(8,153,129,.25), rgba(232,136,10,0), rgba(8,153,129,0));
  -webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; pointer-events:none;
}
.glass-card:hover{ transform:translateY(-6px); box-shadow:0 20px 44px -14px rgba(16,24,40,.22); }
.glass-ico{
  width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:18px; margin-bottom:14px;
}
.glass-card h3{ font-family:var(--font-d); font-size:15.5px; font-weight:700; margin-bottom:6px; color:var(--text); }
.glass-card p{ font-size:12.8px; color:var(--muted); line-height:1.55; }

@media (max-width:980px){ .terminal-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px){ .terminal-grid{ grid-template-columns:1fr; } }

/* ---------- WHY CHOOSE ---------- */
.why-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; max-width:1120px; margin:0 auto;
}
.why-card{
  text-align:center; padding:28px 18px; border-radius:16px; background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow);
}
.why-card .why-ico{ font-size:26px; margin-bottom:10px; }
.why-card h3{ font-family:var(--font-d); font-size:14.5px; font-weight:700; margin-bottom:6px; color:var(--text); }
.why-card p{ font-size:12.5px; color:var(--muted); line-height:1.5; }
@media (max-width:900px){ .why-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ---------- LEARNING JOURNEY ROADMAP ---------- */
.roadmap{ max-width:720px; margin:0 auto; position:relative; }
.roadmap::before{
  content:''; position:absolute; left:23px; top:8px; bottom:8px; width:2px;
  background:repeating-linear-gradient(180deg, var(--green) 0 6px, transparent 6px 12px);
}
.roadmap-step{
  display:flex; gap:20px; align-items:flex-start; padding-bottom:34px; position:relative; opacity:0; transform:translateY(16px);
  animation:dc-rise .6s ease forwards;
}
.roadmap-step:last-child{ padding-bottom:0; }
.roadmap-num{
  flex-shrink:0; width:48px; height:48px; border-radius:50%; background:var(--card); border:2px solid var(--green);
  color:var(--green); font-family:var(--font-d); font-weight:800; font-size:16px; display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 6px var(--green-dim); z-index:1;
}
.roadmap-body h3{ font-family:var(--font-d); font-size:16px; font-weight:700; margin-bottom:4px; color:var(--text); }
.roadmap-body p{ font-size:13px; color:var(--muted); line-height:1.55; }
@keyframes dc-rise{ to{ opacity:1; transform:translateY(0); } }

/* ---------- TRADING FEATURES CARDS ---------- */
.tf-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; max-width:1160px; margin:0 auto; }
.tf-card{
  background:var(--card); border:1px solid var(--line); border-radius:16px; padding:24px; box-shadow:var(--shadow);
  transition:transform .2s ease, box-shadow .2s ease;
}
.tf-card:hover{ transform:translateY(-4px); box-shadow:0 16px 36px -14px rgba(16,24,40,.2); }
.tf-card .tf-ico{ font-size:22px; margin-bottom:12px; }
.tf-card h3{ font-family:var(--font-d); font-size:14.5px; font-weight:700; margin-bottom:6px; color:var(--text); }
.tf-card p{ font-size:12.5px; color:var(--muted); line-height:1.5; }
@media (max-width:980px){ .tf-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px){ .tf-grid{ grid-template-columns:1fr; } }

/* ---------- FAQ ---------- */
.faq-list{ max-width:820px; margin:0 auto; display:flex; flex-direction:column; gap:12px; }
.faq-item{ background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.faq-q{
  width:100%; text-align:left; background:none; border:none; padding:18px 22px; display:flex; align-items:center;
  justify-content:space-between; gap:16px; font-family:var(--font-d); font-weight:600; font-size:14.5px; color:var(--text);
}
.faq-q .plus{ flex-shrink:0; width:24px; height:24px; border-radius:50%; background:var(--green-dim); color:var(--green);
  display:flex; align-items:center; justify-content:center; font-size:15px; transition:transform .2s ease; }
.faq-item.open .faq-q .plus{ transform:rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .25s ease; }
.faq-item.open .faq-a{ max-height:400px; }
.faq-a-inner{ padding:0 22px 20px; font-size:13.5px; color:var(--muted); line-height:1.65; }

/* ---------- AD SLOTS (reserved, no ad code) ---------- */
.ad-slot{
  max-width:1120px; margin:40px auto; padding:14px; border:1px dashed var(--line); border-radius:12px;
  min-height:100px; display:flex; align-items:center; justify-content:center; background:var(--bg-raise);
}
.ad-slot span{ font-family:var(--font-m); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.ad-slot-leaderboard{ min-height:90px; }
.ad-slot-rectangle{ min-height:250px; max-width:336px; }

/* ---------- GENERIC PAGE HERO (features/learn/about/contact) ---------- */
.page-hero{
  padding:80px 20px 60px; text-align:center; background:radial-gradient(ellipse 60% 50% at 50% 0%, rgba(8,153,129,.08), transparent), var(--bg);
}
.page-hero .eyebrow{ display:block; margin-bottom:12px; }
.page-hero h1{ font-size:clamp(28px,4vw,42px); font-weight:700; color:var(--text); max-width:720px; margin:0 auto 14px; }
.page-hero p{ color:var(--muted); font-size:16px; max-width:600px; margin:0 auto; }
.breadcrumb-nav{ font-size:12.5px; color:var(--muted); margin-bottom:18px; }
.breadcrumb-nav a{ color:var(--muted); text-decoration:none; }
.breadcrumb-nav a:hover{ color:var(--green); }

/* ---------- CONTACT ---------- */
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:40px; max-width:960px; margin:0 auto; align-items:start; }
.contact-form{ display:flex; flex-direction:column; gap:14px; }
.contact-form input, .contact-form textarea{
  width:100%; padding:13px 14px; border-radius:10px; border:1px solid var(--line); background:var(--card);
  font-family:var(--font-b); font-size:13.5px; color:var(--text);
}
.contact-form textarea{ min-height:130px; resize:vertical; }
.contact-form label{ margin-bottom:2px; }
.contact-info{ display:flex; flex-direction:column; gap:18px; }
.contact-info-card{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px 20px; box-shadow:var(--shadow); }
.contact-info-card h4{ font-family:var(--font-d); font-size:14px; margin-bottom:4px; color:var(--text); }
.contact-info-card p{ font-size:13px; color:var(--muted); }
@media (max-width:800px){ .contact-grid{ grid-template-columns:1fr; } }

/* ---------- LEARN PAGE ARTICLE LIST ---------- */
.learn-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; max-width:1120px; margin:0 auto; }
.learn-card{ background:var(--card); border:1px solid var(--line); border-radius:16px; padding:24px; box-shadow:var(--shadow); }
.learn-card .tag{ font-family:var(--font-m); font-size:10.5px; color:var(--gold); text-transform:uppercase; letter-spacing:.08em; }
.learn-card h3{ font-family:var(--font-d); font-size:16px; font-weight:700; margin:8px 0 8px; color:var(--text); }
.learn-card p{ font-size:13px; color:var(--muted); line-height:1.6; }
@media (max-width:900px){ .learn-grid{ grid-template-columns:1fr; } }

/* ---------- FOOTER ---------- */
.site-footer{ background:var(--bg-raise); border-top:1px solid var(--line); padding:64px 20px 0; }
.site-footer-inner{
  max-width:1160px; margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:32px; padding-bottom:40px;
}
.footer-brand p{ font-size:12.8px; color:var(--muted); line-height:1.6; margin-top:14px; max-width:280px; }
.footer-col h4{ font-family:var(--font-d); font-size:12.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--text); margin-bottom:14px; }
.footer-col a{ display:block; font-size:13px; color:var(--muted); text-decoration:none; padding:5px 0; }
.footer-col a:hover{ color:var(--green); }
.footer-bottom{
  max-width:1160px; margin:0 auto; border-top:1px solid var(--line); padding:20px 0; display:flex; justify-content:space-between;
  flex-wrap:wrap; gap:10px; font-size:11.5px; color:var(--muted);
}
@media (max-width:800px){
  .site-footer-inner{ grid-template-columns:1fr 1fr; }
  .footer-brand{ grid-column:1 / -1; }
}
@media (max-width:520px){
  .site-footer-inner{ grid-template-columns:1fr; }
  .footer-bottom{ flex-direction:column; text-align:center; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce){
  .roadmap-step{ animation:none; opacity:1; transform:none; }
  .glass-card, .tf-card{ transition:none; }
}
