/* ─────────────────────────────────────────
   finndigital — Design System
   ───────────────────────────────────────── */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

/* Selection */
::selection    { background: var(--amber); color: #1C1917; }
::-moz-selection { background: var(--amber); color: #1C1917; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Tokens ── */
:root {
  --amber:       #F59E0B;
  --amber-600:   #D97706;
  --amber-100:   #FEF3C7;
  --amber-50:    #FFFBEB;
  --teal:        #0D9488;
  --teal-700:    #0F766E;
  --teal-100:    #CCFBF1;
  --teal-50:     #F0FDFA;

  --bg:          #FAFAF8;
  --white:       #FFFFFF;
  --dark:        #1C1917;
  --dark-2:      #292524;
  --text:        #1C1917;
  --text-2:      #44403C;
  --muted:       #78716C;
  --subtle:      #A8A29E;
  --border:      #E7E5E4;
  --border-mid:  #D6D3D1;

  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh:    0 4px 20px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --sh-lg: 0 12px 40px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  --sh-xl: 0 24px 64px rgba(0,0,0,.10), 0 8px 20px rgba(0,0,0,.06);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --nav-h: 68px;
  --max-w: 1140px;
}

/* ── Base typography ── */
body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 700;
  color: var(--text);
}

p { color: var(--muted); }

.display {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.08;
  font-optical-sizing: auto;
}
.section-white { background: var(--white); }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }

.mono {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: .85em;
  letter-spacing: -.01em;
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.section   { padding: 96px 0; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,248,.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(231,229,228,.8);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: var(--sh-sm); }

.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 100%;
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.42rem; font-weight: 900; letter-spacing: -.04em;
}
.nav-logo .word-finn    { color: var(--text); }
.nav-logo .word-digital { color: var(--amber); }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--muted);
  padding: 7px 13px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text); background: rgba(28,25,23,.05);
}
.nav-links .nav-cta {
  background: var(--dark) !important; color: var(--white) !important;
  padding: 8px 18px; margin-left: 8px; border-radius: 10px;
  font-weight: 600 !important;
  transition: transform .2s, background .2s, box-shadow .2s !important;
}
.nav-links .nav-cta:hover {
  background: var(--dark-2) !important;
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.nav-burger {
  display: none; cursor: pointer;
  padding: 8px; border: none; background: none; border-radius: 8px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); margin: 5px 0;
  transition: .25s ease; border-radius: 2px;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: none; transition: transform .2s ease, box-shadow .2s ease, background .15s;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }

.btn-lg { padding: 14px 30px; font-size: 1rem; border-radius: 14px; }

.btn-amber { background: var(--amber); color: #1C1917; }
.btn-amber:hover {
  background: var(--amber-600);
  box-shadow: 0 8px 28px rgba(245,158,11,.35);
}

.btn-teal  { background: var(--teal); color: white; }
.btn-teal:hover {
  background: var(--teal-700);
  box-shadow: 0 8px 28px rgba(13,148,136,.30);
}

.btn-ghost {
  background: transparent; border: 1.5px solid var(--border-mid); color: var(--text);
}
.btn-ghost:hover { border-color: var(--text); box-shadow: var(--sh-sm); }

/* ── Overline ── */
.overline {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.overline::before {
  content: ''; display: inline-block;
  width: 20px; height: 2px; border-radius: 2px;
  background: var(--amber); flex-shrink: 0;
}

/* ── Hero ── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative; overflow: hidden;
}
/* Subtle ambient gradient blobs */
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.hero::before {
  width: 900px; height: 700px;
  top: -300px; left: -150px;
  background: radial-gradient(ellipse, rgba(245,158,11,.09) 0%, transparent 65%);
}
.hero::after {
  width: 750px; height: 600px;
  top: -250px; right: -150px;
  background: radial-gradient(ellipse, rgba(13,148,136,.07) 0%, transparent 65%);
}
.hero > .container { position: relative; z-index: 1; }

.hero .overline    { justify-content: center; margin-bottom: 22px; }
.hero h1.display   { margin: 0 auto 22px; max-width: 760px; }
.hero h1.display em {
  font-style: normal;
  background: linear-gradient(125deg, var(--amber) 0%, var(--amber-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: 1.1rem; color: var(--muted);
  max-width: 490px; margin: 0 auto 68px; line-height: 1.7;
}

/* ── Two Doors ── */
.doors {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; text-align: left;
}

.door {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: 44px 40px;
  border: 1.5px solid transparent;
  transition: transform .35s cubic-bezier(.34,1.26,.64,1), box-shadow .3s, border-color .3s;
  text-decoration: none; color: inherit; display: block; cursor: pointer;
}
.door:hover { transform: translateY(-7px); }

/* Decorative circle blob */
.door::before {
  content: ''; position: absolute;
  width: 220px; height: 220px;
  bottom: -70px; right: -70px; border-radius: 50%;
  transition: opacity .35s, transform .35s;
  opacity: .07; pointer-events: none;
}

.door-amber {
  background: linear-gradient(145deg, #FEFDF8 0%, #FFF8E4 55%, #FFEDB8 100%);
  border-color: var(--amber-100);
}
.door-amber::before { background: var(--amber); }
.door-amber:hover {
  border-color: var(--amber);
  box-shadow: 0 24px 64px rgba(245,158,11,.18), 0 8px 20px rgba(0,0,0,.07);
}
.door-amber:hover::before { opacity: .16; transform: scale(1.1); }

.door-teal {
  background: linear-gradient(145deg, #F8FFFD 0%, #EDFAF7 55%, #D2F5EE 100%);
  border-color: var(--teal-100);
}
.door-teal::before { background: var(--teal); }
.door-teal:hover {
  border-color: var(--teal);
  box-shadow: 0 24px 64px rgba(13,148,136,.15), 0 8px 20px rgba(0,0,0,.07);
}
.door-teal:hover::before { opacity: .16; transform: scale(1.1); }

.door-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 20px;
  margin-bottom: 22px; font-family: 'JetBrains Mono', monospace;
}
.door-amber .door-tag { background: var(--amber);  color: #1C1917; }
.door-teal  .door-tag { background: var(--teal);   color: white; }

.door h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  margin-bottom: 14px; color: var(--text);
}
.door .door-desc {
  color: var(--muted); margin-bottom: 28px;
  line-height: 1.65; font-size: .97rem;
}

.door-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .93rem;
  transition: gap .25s ease;
}
.door-amber .door-link { color: var(--amber-600); }
.door-teal  .door-link { color: var(--teal-700); }
.door:hover .door-link { gap: 14px; }

.door-list {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,.07);
}
.door-list-label {
  font-size: .7rem; font-weight: 600; color: var(--subtle);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px;
}
.door-list ul { list-style: none; }
.door-list li {
  font-size: .88rem; padding: 4px 0; color: var(--muted);
  display: flex; gap: 10px; align-items: flex-start;
}
.door-list li::before {
  content: ''; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%; margin-top: 7px; flex-shrink: 0;
}
.door-amber .door-list li::before { background: var(--amber); }
.door-teal  .door-list li::before { background: var(--teal); }

/* ── Section header ── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .overline  { justify-content: center; margin-bottom: 16px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p  { font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ── Project cards (numbered) ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.project-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px; box-shadow: var(--sh-xs);
  transition: transform .25s ease, box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.project-card:hover {
  transform: translateY(-4px); box-shadow: var(--sh-lg);
  border-color: var(--border-mid);
}
.project-num {
  font-family: 'Fraunces', serif; font-weight: 900;
  font-size: 3.2rem; line-height: 1; letter-spacing: -.04em;
  color: var(--border); display: block; margin-bottom: 2px;
}
.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--teal); margin-bottom: 6px; display: block;
}
.project-tag.amber-tag { color: var(--amber-600); }
.project-card h4 { font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
.project-card p  { font-size: .87rem; line-height: 1.65; }

/* ── Dark CTA section ── */
.section-dark {
  background: var(--dark); color: white;
  padding: 96px 0;
  position: relative; overflow: hidden;
}
.section-dark::before, .section-dark::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.section-dark::before {
  width: 700px; height: 700px; top: -250px; left: -100px;
  background: radial-gradient(ellipse, rgba(245,158,11,.12) 0%, transparent 60%);
}
.section-dark::after {
  width: 600px; height: 600px; bottom: -200px; right: -80px;
  background: radial-gradient(ellipse, rgba(13,148,136,.10) 0%, transparent 60%);
}
.section-dark > .container {
  position: relative; z-index: 1;
  text-align: center; max-width: 560px; margin: 0 auto;
}
.section-dark h2   { color: white; margin-bottom: 16px; }
.section-dark p    { color: rgba(255,255,255,.6); font-size: 1.05rem; margin-bottom: 36px; }
.section-dark .overline {
  justify-content: center; margin-bottom: 22px;
  color: rgba(255,255,255,.45);
}
.section-dark .overline::before { background: var(--amber); }

/* ── Track headers (kurse.html) ── */
.track-section { margin-bottom: 72px; }
.track-header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 28px; padding-bottom: 18px;
  border-bottom: 2px solid var(--border);
}
.track-badge {
  padding: 5px 14px; border-radius: 20px;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.track-badge.amber { background: var(--amber); color: #1C1917; }
.track-badge.teal  { background: var(--teal);  color: white; }
.track-header h2   { font-size: 1.35rem; margin: 0; }

/* ── Course cards ── */
.courses-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px;
}
.course-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
  box-shadow: var(--sh-xs);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--border-mid); }
.course-card.amber { border-top: 3px solid var(--amber); }
.course-card.teal  { border-top: 3px solid var(--teal); }

.course-status {
  position: absolute; top: 20px; right: 18px;
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 6px;
  background: #F1F5F9; color: #64748B;
  font-family: 'JetBrains Mono', monospace;
}
.course-card h3 {
  font-size: 1.1rem; margin-bottom: 10px; padding-right: 90px;
  color: var(--text); line-height: 1.3;
}
.course-card p  { font-size: .88rem; line-height: 1.65; }
.course-topics  { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.topic-tag {
  font-size: .7rem; padding: 4px 10px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  font-family: 'JetBrains Mono', monospace; transition: border-color .2s;
}
.course-card:hover .topic-tag { border-color: var(--border-mid); }

/* ── About ── */
.about-grid {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 72px; align-items: start;
}
.about-photo {
  border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(145deg, var(--amber-50), var(--teal-50));
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  color: var(--subtle); font-size: .88rem;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-lead { font-size: 1.2rem; line-height: 1.8; margin-bottom: 22px; color: var(--text-2); }
.about-body { margin-bottom: 20px; }

/* ── Legal ── */
.legal h2 { font-size: 1.15rem; margin: 36px 0 10px; }
.legal p, .legal li { line-height: 1.8; margin-bottom: 8px; }
.legal ul { padding-left: 20px; }
.legal a  { color: var(--teal); text-decoration: underline; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 44px 0; font-size: .88rem;
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.footer-logo {
  font-family: 'Fraunces', serif; font-weight: 900;
  font-size: 1.1rem; letter-spacing: -.03em;
}
.footer-logo .word-digital { color: var(--amber); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--subtle); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { aspect-ratio: 16/9; max-height: 300px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    padding: 16px 20px 20px; gap: 4px;
    background: rgba(250,250,248,.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-lg);
  }
  .nav-links.open  { display: flex; }
  .nav-links a     { padding: 10px 14px; }
  .nav-links .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }
  .nav-burger { display: block; }
  .doors   { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-dark { padding: 72px 0; }
  .hero    { padding: 64px 0 52px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .door { padding: 32px 24px; }
  .hero h1.display { font-size: 2.25rem; }
}
