/*
Theme Name: LogicKit
Theme URI: https://german.logickit.me
Author: LogicKit
Description: A custom dark, editorial theme for LogicKit — German courses A1 to B2 for English speakers, built on LearnDash. Signature "path" motif traces the CEFR level ladder from hero to course grid.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: logickit
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root{
  /* Color */
  --ink:        #0B0E14;   /* page background */
  --surface:    #131722;   /* card / panel background */
  --surface-2:  #1B2130;   /* raised panel, hover state */
  --line:       #262C3B;   /* hairline borders */
  --gold:       #E7A33E;   /* signature accent — the path */
  --gold-dim:   #7A5A28;
  --sky:        #6C8CFF;   /* secondary accent, cool contrast */
  --paper:      #F4F1EA;   /* primary text, warm off-white */
  --muted:      #98A0B3;   /* secondary text */
  --muted-2:    #62697C;   /* tertiary / captions */
  --good:       #59C08C;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* Scale */
  --gap: clamp(1.25rem, 2vw, 2rem);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body{
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4{ font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; color: var(--paper); letter-spacing: -0.01em; }
p{ margin: 0 0 1em; color: var(--muted); }
:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap{ max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.eyebrow{
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-bottom: 1em;
}
.eyebrow::before{ content:''; width: 18px; height: 1px; background: var(--gold); display:inline-block; }

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-primary{ background: var(--gold); color: #1A1305; }
.btn-primary:hover{ transform: translateY(-2px); background: #F1B15C; }
.btn-ghost{ background: transparent; color: var(--paper); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--gold); color: var(--gold); }

/* ==========================================================================
   GLASS — iOS-26-style "liquid glass" surfaces, used by the header and
   every popover/modal (login, sign up).
   ========================================================================== */
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), rgba(19,23,34,.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 20px 50px -20px rgba(0,0,0,.65);
}

/* ==========================================================================
   SITE HEADER — floating glass pill
   ========================================================================== */
.site-header{ position: sticky; top: 0; z-index: 100; padding: 1rem clamp(1rem,3vw,1.5rem) 0; }
.header-pill{
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; padding: 0 .5rem 0 1.1rem;
  border-radius: 999px;
}
.site-branding{ display: flex; align-items: center; gap: .55em; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--paper); }
.site-branding img.mark, .site-branding svg.mark{ width: 30px; height: 30px; border-radius: 8px; }
.site-branding .mark path{ stroke: var(--gold); }

.primary-nav ul{ display: flex; align-items: center; gap: .3rem; }
.primary-nav a{
  font-size: .88rem; font-weight: 500; color: var(--muted);
  padding: .55em 1em; border-radius: 999px; display:inline-block;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.primary-nav a:hover{ color: var(--paper); background: rgba(255,255,255,.06); }
.primary-nav .current-menu-item a{ color: var(--ink); background: var(--gold); }
.header-actions{ display: flex; align-items: center; gap: .5rem; }
.header-actions .btn{ padding: .62em 1.3em; font-size: .88rem; }
.menu-toggle{ display:none; background:none; border:1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); color: var(--paper); padding:.5em .7em; }

@media (max-width: 880px){
  .primary-nav{ display:none; }
  .primary-nav.is-open{
    display:block; position: absolute; top: 78px; left: clamp(1rem,3vw,1.5rem); right: clamp(1rem,3vw,1.5rem);
    padding: 1rem; border-radius: 22px;
  }
  .primary-nav.is-open ul{ flex-direction: column; align-items: stretch; gap: .25rem; }
  .primary-nav.is-open a{ display:block; }
  .menu-toggle{ display:inline-flex; }
}

/* ==========================================================================
   MODALS — login / sign up, same glass language as the header
   ========================================================================== */
.modal-backdrop{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,6,10,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.modal-backdrop.is-open{ opacity: 1; pointer-events: auto; }
.modal-panel{
  width: 100%; max-width: 400px;
  border-radius: 24px;
  padding: 2rem 2rem 1.8rem;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.modal-backdrop.is-open .modal-panel{ transform: translateY(0) scale(1); opacity: 1; }
.modal-panel h2{ font-size: 1.5rem; text-align:center; margin-bottom: .25em; }
.modal-panel .sub{ text-align:center; color: var(--muted); font-size: .88rem; margin-bottom: 1.6rem; }
.modal-close{
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 30px; height: 30px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: var(--muted); cursor: pointer;
}
.modal-close:hover{ color: var(--paper); }
.field{ margin-bottom: 1rem; }
.field label{ display:block; font-size: .78rem; color: var(--muted-2); margin-bottom: .4em; font-family: var(--font-mono); letter-spacing: .04em; }
.field input{
  width: 100%; padding: .8em 1em; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: var(--paper); font-family: var(--font-body); font-size: .95rem;
}
.field input:focus{ outline: none; border-color: var(--gold); background: rgba(255,255,255,.08); }
.modal-panel .btn{ width: 100%; margin-top: .4rem; }
.social-row{ display:flex; gap: .7rem; margin: 1.3rem 0; }
.social-btn{
  flex: 1; display:flex; align-items:center; justify-content:center; gap:.5em;
  padding: .7em; border-radius: 12px; font-size: .85rem; font-weight: 500;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--paper);
}
.social-btn:hover{ background: rgba(255,255,255,.09); }
.modal-divider{ display:flex; align-items:center; gap: .8em; color: var(--muted-2); font-size: .75rem; margin: 1.2rem 0; }
.modal-divider::before, .modal-divider::after{ content:''; flex:1; height:1px; background: rgba(255,255,255,.12); }
.modal-switch{ text-align:center; font-size: .85rem; color: var(--muted); margin-top: 1.2rem; }
.modal-switch button{ background:none; border:none; color: var(--gold); cursor:pointer; font-weight: 600; font-size: inherit; padding: 0; }

/* ==========================================================================
   HERO — cursor-reactive floating vocabulary (signature interaction)
   ========================================================================== */
.floating-words{ position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.floating-word{
  position:absolute; font-family: var(--font-display); font-style: italic; font-weight: 500;
  color: rgba(244,241,234,.5); white-space: nowrap;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
.floating-word .translation{ display:block; font-family: var(--font-mono); font-style: normal; font-size: .55em; color: var(--gold); letter-spacing: .04em; opacity: .8; }
.hero .wrap, .hero-copy, .path-graphic{ position: relative; z-index: 1; }

/* ==========================================================================
   HERO — signature "Path" section
   ========================================================================== */
.hero{ position: relative; padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.hero::before{
  content:'';
  position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(231,163,62,.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap{ display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1{ font-size: clamp(2.6rem, 5.2vw, 4.4rem); }
.hero h1 em{ font-style: italic; color: var(--gold); }
.hero .lede{ font-size: 1.15rem; max-width: 46ch; color: var(--muted); }
.hero .cta-row{ display:flex; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero .fine{ margin-top: 1rem; font-size: .82rem; color: var(--muted-2); }

/* The Path graphic */
.path-graphic{ position: relative; padding: 1rem; }
.path-graphic svg{ width: 100%; height: auto; }
.path-node{ display:flex; align-items:center; gap:.85rem; }
.path-line{ stroke: var(--line); stroke-width: 2; fill: none; }
.path-line-progress{ stroke: var(--gold); stroke-width: 2; fill:none; stroke-dasharray: 4 6; }
.path-dot{ fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.path-dot.is-active{ fill: var(--gold); stroke: var(--gold); }
.path-label{ font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.path-label.is-active{ fill: var(--paper); font-weight: 700; }

/* Stats bar */
.stats-bar{ border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-bar .wrap{ display: grid; grid-template-columns: repeat(4, 1fr); }
.stat{ padding: 1.6rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child{ border-left: none; }
.stat .num{ font-family: var(--font-display); font-size: 1.9rem; color: var(--paper); display:block; }
.stat .label{ font-size: .78rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; margin-top: .3rem; }
@media (max-width: 720px){ .stats-bar .wrap{ grid-template-columns: repeat(2,1fr); } .stat:nth-child(3){ border-left: none; } }

/* ==========================================================================
   SECTION SCAFFOLDING
   ========================================================================== */
.section{ padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-head{ max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2{ font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-alt{ background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Level / course grid */
.level-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 980px){ .level-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .level-grid{ grid-template-columns: 1fr; } }

.level-card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  display: flex; flex-direction: column; gap: .6rem;
}
.level-card:hover{ transform: translateY(-4px); border-color: var(--gold-dim); background: var(--surface-2); }
.level-card .code{ font-family: var(--font-mono); font-size: .78rem; color: var(--gold); letter-spacing: .06em; }
.level-card h3{ font-size: 1.2rem; margin: 0; }
.level-card p{ font-size: .88rem; margin: 0; }
.level-card .meta{ margin-top: auto; display:flex; align-items:center; justify-content: space-between; font-size: .78rem; color: var(--muted-2); padding-top: .9rem; border-top: 1px solid var(--line); }
.level-card .free-tag{ font-family: var(--font-mono); font-size: .68rem; color: var(--good); border: 1px solid rgba(89,192,140,.35); padding: .15em .55em; border-radius: 999px; }

/* Feature triptych */
.feature-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 860px){ .feature-grid{ grid-template-columns: 1fr; } }
.feature{ padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .icon{ width: 40px; height: 40px; margin-bottom: 1rem; color: var(--gold); }
.feature h3{ font-size: 1.05rem; }
.feature p{ font-size: .92rem; margin: 0; }

/* Quote / testimonial */
.quote-block{ text-align: center; max-width: 760px; margin: 0 auto; }
.quote-block blockquote{ font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; color: var(--paper); margin: 0 0 1.2rem; line-height: 1.35; }
.quote-block cite{ font-style: normal; font-size: .85rem; color: var(--muted-2); font-family: var(--font-mono); }

/* CTA banner */
.cta-banner{ border-radius: 20px; padding: clamp(2.5rem, 6vw, 4rem); background: linear-gradient(120deg, #7A5A28 0%, var(--ink) 45%, #2A3A6E 100%); border: 1px solid var(--line); text-align:center; }
.cta-banner h2{ font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 24ch; margin: 0 auto .6em; }
.cta-banner .cta-row{ display:flex; justify-content:center; gap:1rem; margin-top:1.6rem; flex-wrap: wrap; }

/* ==========================================================================
   PAGE / SINGLE / ARCHIVE (non-LD content)
   ========================================================================== */
.page-hero{ padding: clamp(3rem,6vw,5rem) 0 2rem; border-bottom: 1px solid var(--line); }
.page-hero h1{ font-size: clamp(2.1rem, 4vw, 3.2rem); }
.content-wrap{ padding: clamp(2.5rem, 5vw, 4rem) 0; }
.entry-content{ max-width: 760px; }
.entry-content h2{ font-size: 1.6rem; margin-top: 1.6em; }
.entry-content h3{ font-size: 1.25rem; }
.entry-content p, .entry-content li{ color: var(--muted); font-size: 1.02rem; }
.entry-content a{ color: var(--gold); border-bottom: 1px solid rgba(231,163,62,.35); }
.entry-content img{ border-radius: var(--radius); margin: 1.5em 0; }

/* ==========================================================================
   LEARNDASH — visual skin (targets LD's ld30 theme classes)
   ========================================================================== */
.learndash-wrapper{ font-family: var(--font-body); color: var(--paper); }
.learndash-wrapper a{ color: var(--gold); }

/* course grid shortcode */
.learndash-wrapper .ld-course-list, .learndash-wrapper .ld-course-list-items{ display:grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
@media (max-width: 960px){ .learndash-wrapper .ld-course-list, .learndash-wrapper .ld-course-list-items{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .learndash-wrapper .ld-course-list, .learndash-wrapper .ld-course-list-items{ grid-template-columns: 1fr; } }
.learndash-wrapper .ld-course-list-item{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden; transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.learndash-wrapper .ld-course-list-item:hover{ transform: translateY(-4px); border-color: var(--gold-dim); }
.learndash-wrapper .ld-course-list-item .ld-course-list-item-preview{ border-radius: 0; }
.learndash-wrapper .ld-course-list-item-info{ padding: 1.25rem 1.3rem 1.4rem; }
.learndash-wrapper .ld-course-list-item-title, .learndash-wrapper .ld-course-list-item-preview + .ld-course-list-item-info a{
  font-family: var(--font-display); font-size: 1.15rem; color: var(--paper);
}

/* progress bars */
.learndash-wrapper .ld-progress-bar{ background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; }
.learndash-wrapper .ld-progress-bar-percentage{ background: linear-gradient(90deg, var(--gold), var(--sky)); height: 100%; }
.learndash-wrapper .ld-progress-stats{ font-family: var(--font-mono); font-size: .75rem; color: var(--muted-2); }

/* lesson / topic / quiz item lists */
.learndash-wrapper .ld-item-list{ border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.learndash-wrapper .ld-item-list-item{ border-bottom: 1px solid var(--line); background: var(--surface); transition: background .2s var(--ease); }
.learndash-wrapper .ld-item-list-item:last-child{ border-bottom: none; }
.learndash-wrapper .ld-item-list-item:hover{ background: var(--surface-2); }
.learndash-wrapper .ld-item-name{ color: var(--paper); font-weight: 500; }
.learndash-wrapper .ld-status-icon svg{ fill: var(--gold); }
.learndash-wrapper .ld-item-list-item[data-ld-status="complete"] .ld-status-icon svg{ fill: var(--good); }

/* tabs (course info / reviews / etc.) */
.learndash-wrapper .ld-tabs-navigation{ border-bottom: 1px solid var(--line); display:flex; gap: .5rem; }
.learndash-wrapper .ld-tabs-navigation .ld-tab{ padding: .8em 1.1em; color: var(--muted); font-weight: 600; font-size: .9rem; cursor:pointer; }
.learndash-wrapper .ld-tabs-navigation .ld-tab-active, .learndash-wrapper .ld-tabs-navigation .ld-tab:hover{ color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.learndash-wrapper .ld-tab-content{ padding-top: 1.4rem; color: var(--muted); }

/* alerts / infobar */
.learndash-wrapper .ld-alert{ border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.learndash-wrapper .ld-alert-success{ border-color: rgba(89,192,140,.4); }

/* focus mode sidebar (lesson player) */
.learndash-wrapper .ld-focus-sidebar{ background: var(--surface); border-color: var(--line); }
.learndash-wrapper .ld-focus-content{ background: var(--ink); }
.learndash-wrapper .ld-focus-header{ background: rgba(11,14,20,.9); border-color: var(--line); }

/* buttons LD renders (mark complete, take quiz, etc.) */
.learndash-wrapper .learndash_mark_complete_button,
.learndash-wrapper .learndash_next_link,
.learndash-wrapper .ld-button,
.learndash-wrapper input[type="submit"]{
  background: var(--gold) !important; color: #1A1305 !important; border: none !important;
  border-radius: 999px !important; font-weight: 600 !important; padding: .8em 1.6em !important;
  font-family: var(--font-body) !important; transition: transform .25s var(--ease) !important;
}
.learndash-wrapper .learndash_mark_complete_button:hover{ transform: translateY(-2px); }

/* quiz (wpProQuiz) */
.wpProQuiz_content{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; color: var(--paper); }
.wpProQuiz_content .wpProQuiz_questionList{ background: transparent; }
.wpProQuiz_content .wpProQuiz_button{ background: var(--gold); color: #1A1305; border: none; border-radius: 999px; padding: .7em 1.4em; font-weight: 600; }

/* certificates link */
.learndash-wrapper .ld-course-certificate-link a{ color: var(--sky); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{ border-top: 1px solid var(--line); padding: clamp(2.5rem,5vw,4rem) 0 2rem; background: var(--surface); }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
@media (max-width: 780px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
.footer-brand p{ max-width: 32ch; font-size: .88rem; }
.footer-col h4{ font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1em; }
.footer-col ul{ display:flex; flex-direction:column; gap: .65em; }
.footer-col a{ font-size: .9rem; color: var(--muted); }
.footer-col a:hover{ color: var(--gold); }
.footer-bottom{ border-top: 1px solid var(--line); padding-top: 1.6rem; display:flex; justify-content:space-between; align-items:center; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--muted-2); }

/* ==========================================================================
   404 / misc
   ========================================================================== */
.error-404{ text-align:center; padding: clamp(4rem,10vw,7rem) 0; }
.error-404 .code{ font-family: var(--font-mono); color: var(--gold); font-size: 1rem; }
.error-404 h1{ font-size: clamp(2.4rem,6vw,4rem); }
