:root{
  --bg:#fbf7ee;
  --card:rgba(255,253,248,.96);
  --ink:#26221b;
  --muted:#70675a;
  --brand:#8a1f1f;
  --brand2:#c79b45;
  --line:#eadfcd;
  --shadow:0 14px 34px rgba(47,34,20,.08);
  --radius:16px;
}

*{
  box-sizing:border-box;
}

html{
  overflow-x:hidden;
}

body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background-color:#f8f5ef;
  background-image:
    linear-gradient(rgba(248,245,239,.45), rgba(248,245,239,.45)),
    url("../images/official-site-background.png");
  background-repeat:repeat;
  background-size:760px auto;
  background-attachment:fixed;
  color:var(--ink);
  line-height:1.6;
  overflow-x:hidden;
}

img,
iframe,
canvas{
  max-width:100%;
}

.wrap{
  width:min(1120px,92vw);
  margin:auto;
}

.wrap > *,
.grid > *,
.lesson-list > *,
.lesson-layout > *,
.audio-grid > *,
.vocab-grid > *,
.matching-board > *,
.lesson-main,
.card,
.sound-card,
.vocab-card{
  min-width:0;
}

/* TOP BAR */

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(251,247,238,.9);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:10px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:18px;
  text-decoration:none;
  color:var(--ink);
  font-weight:800;
  font-size:1.35rem;
  min-width:0;
}

.brand span{
  overflow-wrap:anywhere;
}

.seal{
  width:38px;
  height:38px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),#4f1010);
  color:white;
  display:grid;
  place-items:center;
  font-size:20px;
}

.site-logo{
  width:90px;
  height:90px;
  object-fit:contain;
  display:block;
}

.links{
  display:flex;
  gap:14px;
  align-items:center;
}

.links a{
  color:var(--brand);
  text-decoration:none;
  font-weight:650;
  font-size:14px;
  padding:8px 2px;
  transition:color .2s ease;
}

.links a:hover{
  color:color-mix(in srgb, var(--brand) 82%, #000);
}

/* HERO */

.hero{
  padding:64px 0 38px;
}

.hero-layout{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(220px,.7fr);
  gap:34px;
  align-items:center;
}

.hero-copy{
  min-width:0;
}

.hero-logo-card{
  justify-self:end;
  width:min(320px,100%);
  aspect-ratio:1;
  display:grid;
  place-items:center;
  padding:28px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,253,248,.82);
  box-shadow:var(--shadow);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.hero-logo-card img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.lesson-hero{
  padding:38px 0 18px;
}

.lesson-hero h1{
  font-size:clamp(34px,6vw,58px);
  line-height:1.05;
  margin:8px 0;
}

.hero h1{
  font-size:clamp(38px,7vw,74px);
  line-height:1.02;
  margin:18px 0 14px;
}

.hero p{
  font-size:clamp(17px,2.6vw,22px);
  color:var(--muted);
  max-width:760px;
}

.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  background:rgba(255,255,255,.9);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 12px;
  color:var(--muted);
  font-weight:650;
  font-size:14px;
}

/* BUTTONS */

.actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px;
}

.btn{
  border:0;
  border-radius:12px;
  padding:13px 18px;
  font-weight:800;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  white-space:normal;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.primary{
  background:var(--brand);
  color:#fff;
  box-shadow:0 8px 18px rgba(138,31,31,.18);
}

.secondary{
  background:#fff;
  color:var(--ink);
  border:1px solid var(--line);
}

/* LAYOUT */

.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.dashboard-group{
  margin-top:28px;
}

.dashboard-heading{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.dashboard-heading h3{
  margin:0;
  font-size:clamp(22px,3vw,30px);
}

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.dashboard-card a{
  display:block;
  height:100%;
  color:inherit;
  text-decoration:none;
}

.dashboard-card .pill{
  margin-bottom:12px;
}

.dashboard-card.coming-soon{
  opacity:.86;
}

.dashboard-card.coming-soon a{
  cursor:default;
}

.section{
  padding:34px 0;
}

.section h2{
  font-size:clamp(28px,4vw,42px);
  margin:0 0 16px;
}

.lesson-layout{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:20px;
  align-items:start;
}

/* CARDS */

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.card h3{
  margin:0 0 8px;
  font-size:24px;
}

.card p{
  margin:0;
  color:var(--muted);
}

/* LESSON LIST */

.lesson-list{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

.lesson-item{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  text-decoration:none;
  color:var(--ink);
  transition:.2s;
  box-shadow:0 6px 18px rgba(47,34,20,.04);
}

.lesson-item:hover{
  transform:translateY(-2px);
  border-color:var(--brand2);
}

.lesson-item span{
  color:var(--muted);
  font-size:14px;
}

/* VIDEO */

.video-box{
  aspect-ratio:16/9;
  width:100%;
  background:#17120e;
  border-radius:var(--radius);
  overflow:hidden;
  display:grid;
  place-items:center;
  color:#fff;
  border:1px solid #2e241b;
}

.video-box iframe{
  width:100%;
  height:100%;
  border:0;
}

.copticforall-lesson .lesson-layout{
  gap:18px;
}

.copticforall-lesson .lesson-main{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.copticforall-lesson .lesson-main > h2,
.copticforall-lesson .audio-grid,
.copticforall-lesson .lesson-main > .card{
  width:100%;
  max-width:720px;
  margin-inline:auto;
}

.copticforall-lesson .audio-grid{
  grid-template-columns:1fr;
}

/* EXTRA PRACTICE */

.extra-practice-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  width:100%;
  max-width:900px;
  margin-inline:auto;
  margin-bottom:16px;
}

.extra-practice-card h2{
  margin:0 0 8px;
  font-size:clamp(24px,3vw,34px);
}

.extra-practice-card p{
  max-width:680px;
}

.extra-practice-card .practice-instruction{
  margin-top:10px;
  color:var(--ink);
  font-weight:800;
}

.practice-embed{
  width:100%;
  max-width:900px;
  margin-inline:auto;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  background:rgba(255,253,248,.96);
}

.practice-embed iframe{
  display:block;
  width:100%;
  height:880px;
  border:0;
  background:#fff;
}

/* AUDIO */

.audio-grid,
.vocab-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

.sound-card,
.vocab-card{
  background:rgba(255,255,255,.93);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
}

.coptic{
  font-size:38px;
  line-height:1.1;
  font-family:'Noto Sans Coptic','Segoe UI Symbol',serif;
}

.small-coptic{
  font-size:26px;
  font-family:'Noto Sans Coptic','Segoe UI Symbol',serif;
}

.sound-btn{
  width:100%;
  border:1px solid var(--line);
  background:#fff8ec;
  border-radius:14px;
  padding:12px;
  text-align:left;
  cursor:pointer;
  font-weight:800;
  white-space:normal;
  transition:.2s;
}

.sound-btn:hover{
  border-color:var(--brand2);
  transform:translateY(-1px);
}

/* NOTES */

.pill{
  display:inline-flex;
  border-radius:999px;
  background:#fff3dd;
  color:#7c4c00;
  padding:5px 10px;
  font-weight:800;
  font-size:12px;
}

.note{
  background:#fff;
  border-left:5px solid var(--brand2);
  padding:16px;
  border-radius:14px;
  color:var(--muted);
}

/* FOOTER */

.footer{
  padding:36px 0;
  margin-top:40px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:14px;
  background:rgba(251,247,238,.8);
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:28px;
}

.footer-branding{
  max-width:560px;
}

.footer-branding strong{
  display:block;
  color:var(--ink);
  font-size:1.05rem;
  margin-bottom:8px;
}

.footer-branding p{
  margin:4px 0;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px 16px;
}

.footer-links a{
  color:var(--brand);
  text-decoration:none;
  font-weight:700;
  transition:color .2s ease;
}

.footer-links a:hover{
  color:color-mix(in srgb, var(--brand) 82%, #000);
}

.checklist li{
  margin:8px 0;
}

/* MATCHING ACTIVITIES */

.matching-board{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin:24px 0;
}

.matching-board[data-required-matches="2"]{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.match-column{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.match-btn{
  border:1px solid var(--line);
  background:#fffaf2;
  border-radius:14px;
  padding:16px;
  font-size:1.3rem;
  line-height:1.25;
  cursor:pointer;
  font-weight:700;
  overflow-wrap:anywhere;
  text-align:center;
  white-space:normal;
  transition:.2s;
}

.match-btn:hover{
  transform:translateY(-2px);
  border-color:var(--brand2);
}

.match-btn.selected{
  outline:3px solid var(--brand2);
}

.match-btn.correct-match{
  background:#e8f8ee;
  border-color:#1fa55b;
}

.match-btn.completed-match{
  background:#dff5e6;
  border-color:#1fa55b;
}

.match-btn.wrong-match{
  background:#ffe7e7;
  border-color:#d63c3c;
}

/* MAZE */

.canvas-toolbar{
  margin-bottom:16px;
}

.maze-wrapper{
  position:relative;
  width:100%;
  max-width:900px;
  margin:auto;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
}

.maze-wrapper img{
  display:block;
  width:100%;
  height:auto;
}

.maze-wrapper canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  touch-action:none;
}

/* QUIZ */

.quiz-result{
  margin-top:12px;
  font-weight:800;
  font-size:15px;
}

/* MOBILE */

.mobile-menu{
  display:none;
}

@media(max-width:1024px){

  .wrap{
    width:min(1040px,94vw);
  }

  .site-logo{
    width:76px;
    height:76px;
  }

  .brand{
    gap:14px;
    font-size:1.2rem;
  }

  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .lesson-layout{
    grid-template-columns:1.15fr .85fr;
  }

  .practice-embed iframe{
    height:780px;
  }
}

@media(max-width:800px){

  .links{
    gap:10px;
    justify-content:flex-end;
    flex-wrap:wrap;
  }

  .grid,
  .lesson-list,
  .lesson-layout,
  .audio-grid,
  .vocab-grid,
  .dashboard-grid,
  .matching-board{
    grid-template-columns:1fr;
  }

  .wrap{
    width:min(100% - 28px,1120px);
  }

  .extra-practice-card{
    display:block;
  }

  .extra-practice-card .btn{
    margin-top:16px;
  }

  .practice-embed iframe{
    height:700px;
  }

  .hero{
    padding:38px 0 26px;
  }

  .hero-layout{
    grid-template-columns:1fr;
    gap:24px;
  }

  .hero-logo-card{
    justify-self:center;
    width:min(240px,82vw);
    padding:22px;
  }

  .lesson-hero{
    padding:28px 0 16px;
  }

  .section{
    padding:26px 0;
  }

  .footer-grid{
    flex-direction:column;
    gap:18px;
  }

  .footer-links{
    justify-content:flex-start;
  }

  .actions{
    width:100%;
  }

  .actions .btn,
  .canvas-toolbar .btn{
    width:100%;
    justify-content:center;
  }

  .card{
    padding:18px;
  }

  .lesson-item{
    align-items:flex-start;
    flex-direction:column;
  }

  .coptic{
    font-size:34px;
  }

  .topbar{
    position:static;
  }

  .nav{
    padding:10px 0;
  }

  .brand{
    gap:12px;
    font-size:1.05rem;
  }

  .match-btn{
    font-size:1.1rem;
    padding:14px;
  }

  .site-logo{
    width:62px;
    height:62px;
  }
}

@media(max-width:480px){

  .wrap{
    width:min(100% - 22px,1120px);
  }

  .site-logo{
    width:52px;
    height:52px;
  }

  .brand{
    gap:10px;
    font-size:.95rem;
  }

  .card,
  .sound-card,
  .vocab-card{
    padding:14px;
  }

  .lesson-hero h1{
    font-size:clamp(30px,10vw,44px);
  }

  .hero h1{
    font-size:clamp(34px,11vw,52px);
  }

  .badge{
    font-size:13px;
  }

  .match-btn{
    font-size:1rem;
    padding:13px;
  }

  .practice-embed iframe{
    height:640px;
  }

  .maze-wrapper{
    border-radius:12px;
  }
}
