/* ============================================================
   ACADEMY OF LANGUAGES — SHARED STYLESHEET
   Used by: index.html, level.html, lesson.html
   Keep this file in the same folder as the HTML pages.
   ============================================================ */

:root{
  --ink:#1D2233;
  --ink-soft:#5B6178;
  --paper:#F7F4EC;
  --surface:#FFFFFF;
  --navy:#22314F;
  --navy-deep:#16213A;
  --navy-tint:rgba(34,49,79,.06);
  --gold:#B8874A;
  --gold-deep:#8F6633;
  --gold-tint:rgba(184,135,74,.10);
  --line:#E3DCC8;
  --green:#3E7C6B;
  --font-serif:'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper); color:var(--ink); font-family:var(--font-sans);
  -webkit-font-smoothing:antialiased; font-size:15.5px; line-height:1.55;
}
h1,h2,h3{margin:0;}
img,video{max-width:100%; display:block;}
a{color:var(--navy); text-decoration:none;}
button{font-family:var(--font-sans); cursor:pointer;}

/* ---------- TOP BAR (shared) ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 28px; background:var(--surface); border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:20;
}
.logo{display:flex; align-items:center; gap:10px;}
.logo .mark{
  width:34px; height:34px; border-radius:8px; background:var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center; font-family:var(--font-serif);
  font-weight:600; font-size:16px; flex-shrink:0;
}
.logo .word{font-family:var(--font-serif); font-weight:600; font-size:18px; letter-spacing:.2px; color:var(--ink);}
.topbar-right{display:flex; align-items:center; gap:14px;}
.back-link{font-size:13.5px; color:var(--ink-soft); font-weight:500; display:flex; align-items:center; gap:5px;}
.back-link:hover{color:var(--navy);}
.lesson-tag{font-size:12.5px; color:var(--gold-deep); background:var(--gold-tint); padding:5px 11px; border-radius:100px; font-weight:600;}

/* ---------- GENERIC BUTTONS ---------- */
.btn{display:inline-flex; align-items:center; gap:7px; background:var(--navy); color:#fff; border:none; padding:10px 18px; border-radius:8px; font-size:14px; font-weight:600;}
.btn:hover{background:var(--navy-deep); color:#fff;}
.btn.ghost{background:none; color:var(--navy); border:1px solid var(--line);}
.btn.ghost:hover{background:var(--navy-tint);}
.btn.gold{background:var(--gold); color:#3a2a08;}
.btn.gold:hover{background:var(--gold-deep); color:#fff;}
.btn:disabled{opacity:.4; cursor:not-allowed;}

/* ============================================================
   HOME PAGE
   ============================================================ */
.hero{max-width:900px; margin:0 auto; padding:72px 28px 28px; text-align:center;}
.hero .eyebrow{font-size:13px; font-weight:600; color:var(--gold-deep); letter-spacing:.3px; margin-bottom:14px;}
.hero h1{font-family:var(--font-serif); font-size:46px; font-weight:600; line-height:1.15; margin-bottom:18px;}
.hero p{font-size:17px; color:var(--ink-soft); max-width:52ch; margin:0 auto;}
.hero-cta{display:flex; gap:14px; justify-content:center; margin-top:30px; flex-wrap:wrap;}
.hero-cta .btn{padding:13px 24px; font-size:15px;}

.features{
  max-width:1040px; margin:16px auto 70px; padding:0 28px;
  display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;
}
.feature{text-align:center; padding:8px 12px;}
.feature .ico{font-size:26px; margin-bottom:12px;}
.feature h3{font-size:15.5px; font-weight:600; margin-bottom:8px;}
.feature p{font-size:13.5px; color:var(--ink-soft); line-height:1.55;}

.levels-head{max-width:640px; margin:0 auto; padding:0 28px; text-align:center;}
.levels-head h2{font-family:var(--font-serif); font-size:28px; font-weight:600; margin-bottom:10px;}
.levels-head p{font-size:14.5px; color:var(--ink-soft);}

.level-grid{
  max-width:1040px; margin:32px auto 90px; padding:0 28px;
  display:grid; grid-template-columns:repeat(3, 1fr); gap:22px;
}
@media (max-width:760px){
  .level-grid{grid-template-columns:1fr;}
  .features{grid-template-columns:1fr; gap:32px;}
  .hero h1{font-size:32px;}
}

.level-card{
  display:block; background:var(--surface); border:1px solid var(--line); border-radius:14px;
  padding:26px 24px; position:relative; overflow:hidden; transition:transform .15s, box-shadow .15s;
}
.level-card:hover{transform:translateY(-3px); box-shadow:0 10px 28px rgba(22,33,58,.10);}
.level-card .stripe{position:absolute; left:0; top:0; bottom:0; width:5px;}
.level-card .code{font-family:var(--font-serif); font-size:34px; font-weight:600; color:var(--navy); margin-bottom:6px;}
.level-card .name{font-size:15px; font-weight:600; color:var(--ink); margin-bottom:8px;}
.level-card .desc{font-size:13.5px; color:var(--ink-soft); line-height:1.5; margin-bottom:18px; min-height:38px;}
.level-card .meta{display:flex; align-items:center; justify-content:space-between; font-size:12.5px; color:var(--ink-soft); border-top:1px solid var(--line); padding-top:14px;}
.level-card .meta .go{color:var(--navy); font-weight:700;}

/* progression tint per level, lightest -> deepest */
.level-card[data-tier="1"] .stripe{background:#CBD3E0;}
.level-card[data-tier="2"] .stripe{background:#9FADC6;}
.level-card[data-tier="3"] .stripe{background:#6E80A8;}
.level-card[data-tier="4"] .stripe{background:var(--gold);}
.level-card[data-tier="5"] .stripe{background:var(--gold-deep);}
.level-card[data-tier="6"] .stripe{background:var(--navy);}


/* ============================================================
   LEVEL PAGE
   ============================================================ */
.level-head{max-width:760px; margin:0 auto; padding:44px 28px 8px;}
.level-head .code{font-family:var(--font-serif); font-size:40px; font-weight:600; color:var(--navy);}
.level-head .name{font-size:16px; color:var(--ink-soft); margin-top:2px;}
.level-head .desc{margin-top:14px; font-size:14.5px; color:var(--ink-soft); max-width:56ch; line-height:1.6;}

.lesson-groups{max-width:760px; margin:28px auto 90px; padding:0 28px;}
.lesson-group{border:1px solid var(--line); border-radius:12px; background:var(--surface); margin-bottom:14px; overflow:hidden;}
.lesson-group-head{
  display:flex; align-items:center; justify-content:space-between; padding:16px 20px; cursor:pointer;
  font-weight:600; font-size:14.5px;
}
.lesson-group-head .chevron{transition:transform .15s; color:var(--ink-soft);}
.lesson-group.open .chevron{transform:rotate(90deg);}
.lesson-group-body{display:none; border-top:1px solid var(--line);}
.lesson-group.open .lesson-group-body{display:block;}
.lesson-row{
  display:flex; align-items:center; justify-content:space-between; padding:13px 20px;
  border-bottom:1px solid var(--line); font-size:14px;
}
.lesson-row:last-child{border-bottom:none;}
.lesson-row:hover{background:var(--navy-tint);}
.lesson-row .num{font-weight:600; color:var(--navy); width:28px; flex-shrink:0;}
.lesson-row .title{flex:1; color:var(--ink);}
.lesson-row .arrow{color:var(--ink-soft);}

/* ============================================================
   LESSON PAGE
   ============================================================ */
.layout{display:flex; align-items:flex-start; max-width:1200px; margin:0 auto;}
.main{flex:1; min-width:0; padding:36px 40px 100px; max-width:780px;}
.side{width:300px; flex-shrink:0; padding:36px 28px 40px 0; position:sticky; top:69px;}
@media (max-width: 980px){ .side{display:none;} .main{max-width:100%; padding:24px 20px 80px;} }

.section-header{display:flex; align-items:center; gap:12px; padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:24px;}
.section-header .ico{width:34px; height:34px; border-radius:9px; background:var(--navy); color:#fff; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0;}
.section-header h2{font-size:23px; font-weight:600; font-family:var(--font-serif);}
.lesson-block{display:none;}
.lesson-block.active{display:block;}

.placeholder-box{
  border:1.5px dashed var(--line); border-radius:10px; padding:34px 24px; text-align:center;
  color:var(--ink-soft); font-size:14px; background:var(--navy-tint);
}
.placeholder-box .ico{font-size:26px; margin-bottom:10px;}

.section-nav-btns{display:flex; justify-content:space-between; margin-top:36px; padding-top:20px; border-top:1px solid var(--line);}

.call-card{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:22px 20px; text-align:center; margin-bottom:26px;}
.call-card .ico{width:42px; height:42px; border-radius:50%; background:var(--gold-tint); color:var(--gold-deep); display:flex; align-items:center; justify-content:center; font-size:19px; margin:0 auto 12px;}
.call-card p{font-size:14px; font-weight:600; margin:0 0 6px; color:var(--ink);}
.call-card .hint{font-size:12px; color:var(--ink-soft); margin:0 0 14px;}
.call-card .btn{width:100%; justify-content:center;}

.side-title{font-size:12.5px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--ink-soft); margin:0 0 12px;}
.section-nav{list-style:none; padding:0; margin:0 0 22px; border-left:2px solid var(--line);}
.section-nav li{margin-bottom:1px;}
.section-nav button{width:100%; text-align:left; background:none; border:none; padding:9px 14px; margin-left:-2px; border-left:2px solid transparent; font-size:14px; color:var(--ink-soft); font-weight:500; display:flex; align-items:center; gap:9px;}
.section-nav button .dot-ico{font-size:14px; width:18px; text-align:center;}
.section-nav button.active{border-left-color:var(--navy); color:var(--ink); font-weight:600;}
.side-actions{display:flex; flex-direction:column; gap:10px;}
.side-actions .btn{width:100%; justify-content:center;}

.toast{position:fixed; bottom:22px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--paper); padding:10px 18px; border-radius:8px; font-size:13.5px; opacity:0; pointer-events:none; transition:opacity .25s; z-index:100;}
.toast.show{opacity:1;}
