/* ──────────────────────────────────────────
   RESET & BASE
────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #f4f0e8;
  --bg-card:       #ffffff;
  --bg-hover:      #fdf9f1;
  --gold:          #9a7530;
  --gold-light:    #c9a84c;
  --gold-dim:      #c9b47a;
  --gold-glow:     rgba(154, 117, 48, 0.08);
  --text:          #1c1a14;
  --text-dim:      #8a8070;
  --border:        rgba(154, 117, 48, 0.2);
  --border-active: rgba(154, 117, 48, 0.7);
  --shadow:        0 2px 12px rgba(100, 80, 20, 0.08);
  --shadow-hover:  0 6px 24px rgba(100, 80, 20, 0.13);
  --disabled:      #eae6dd;
  --disabled-text: #b8b2a6;
  --radius:        6px;
  --transition:    0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ──────────────────────────────────────────
   NOISE TEXTURE OVERLAY
────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ──────────────────────────────────────────
   AMBIENT GLOW (subtle on light bg)
────────────────────────────────────────── */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
.glow-orb-1 {
  width: 700px; height: 700px;
  top: -250px; left: -250px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
}
.glow-orb-2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -150px;
  background: radial-gradient(circle, rgba(201,168,76,0.09) 0%, transparent 70%);
}

/* ──────────────────────────────────────────
   LAYOUT WRAPPER
────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 80px;
}

/* ──────────────────────────────────────────
   HEADER
────────────────────────────────────────── */
header {
  width: 100%;
  max-width: 860px;
  padding: 48px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 900;
  line-height: 1.02;
  color: var(--text);
  letter-spacing: -0.02em;
}

.header-title span {
  color: var(--gold);
}

.header-rule {
  margin-top: 18px;
  height: 1px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold-dim) 40%, transparent 100%);
}

/* ──────────────────────────────────────────
   BREADCRUMB
────────────────────────────────────────── */
.breadcrumb {
  width: 100%;
  max-width: 860px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 22px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.breadcrumb-item {
  cursor: pointer;
  transition: color var(--transition);
  padding: 4px 0;
}
.breadcrumb-item:hover { color: var(--gold); }

.breadcrumb-sep {
  color: var(--gold-dim);
  font-size: 10px;
}

.breadcrumb-current {
  color: var(--gold);
  font-weight: 500;
}

/* ──────────────────────────────────────────
   SECTION LABEL
────────────────────────────────────────── */
.section-label {
  width: 100%;
  max-width: 860px;
  margin-top: 44px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label-text {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ──────────────────────────────────────────
   BUTTON GRIDS
────────────────────────────────────────── */
.btn-grid {
  width: 100%;
  max-width: 860px;
  display: grid;
  gap: 14px;
}

.btn-grid--klassen   { grid-template-columns: repeat(3, 1fr); }
.btn-grid--bereiche  { grid-template-columns: repeat(2, 1fr); }
.btn-grid--sachtexte { grid-template-columns: repeat(3, 1fr); }
.btn-grid--grammatik { grid-template-columns: repeat(3, 1fr); }

/* ──────────────────────────────────────────
   CARD BUTTON
────────────────────────────────────────── */
.btn-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;    /* comfortable tap target */
}

.btn-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-glow);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-card:not(.btn-card--disabled):hover {
  border-color: var(--border-active);
  background: var(--bg-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.btn-card:not(.btn-card--disabled):hover::before { opacity: 1; }

.btn-card:not(.btn-card--disabled):active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

/* Active / highlighted */
.btn-card--active {
  border-color: rgba(154, 117, 48, 0.4);
}

/* Disabled */
.btn-card--disabled {
  background: var(--disabled);
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
}

/* ── Card inner elements ── */
.btn-card__tag {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.btn-card--disabled .btn-card__tag { color: var(--disabled-text); }

.btn-card__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.btn-card--disabled .btn-card__title { color: var(--disabled-text); }

.btn-card__sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.btn-card--disabled .btn-card__sub { color: var(--disabled-text); }

.btn-card__lock {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 13px;
  opacity: 0.3;
}

.btn-card__arrow {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 26px; height: 26px;
  border: 1px solid var(--border-active);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
}
.btn-card:not(.btn-card--disabled):hover .btn-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ──────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────── */
.fade-enter {
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.00s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ──────────────────────────────────────────
   DECO CORNER
────────────────────────────────────────── */
.deco-corner {
  position: fixed;
  bottom: 28px; right: 28px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  opacity: 0.35;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
}

/* ──────────────────────────────────────────
   TOOLTIP for disabled (desktop only)
────────────────────────────────────────── */
.btn-card--disabled::after {
  content: 'Noch nicht verfügbar';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
.btn-card--disabled:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ──────────────────────────────────────────
   RESPONSIVE — TABLET  (≤ 700px)
────────────────────────────────────────── */
@media (max-width: 700px) {
  #app { padding: 0 16px 60px; }

  header { padding-top: 36px; }

  .btn-grid--klassen   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .btn-grid--bereiche  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .btn-grid--sachtexte { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .btn-grid--grammatik { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .btn-card { padding: 20px 16px 16px; min-height: 90px; }

  .section-label { margin-top: 32px; margin-bottom: 16px; }

  .deco-corner { display: none; }
}

/* ──────────────────────────────────────────
   RESPONSIVE — MOBILE  (≤ 420px)
────────────────────────────────────────── */
@media (max-width: 420px) {
  #app { padding: 0 12px 48px; }

  header { padding-top: 28px; }

  .btn-grid--klassen   { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .btn-grid--bereiche  { grid-template-columns: 1fr; gap: 8px; }
  .btn-grid--sachtexte { grid-template-columns: 1fr; gap: 8px; }
  .btn-grid--grammatik { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* On single-column layout, Rechtschreibung should not span */
  .btn-grid--sachtexte .btn-card[style*="span"] {
    grid-column: span 1 !important;
  }

  .btn-card { padding: 18px 14px 14px; min-height: 80px; }

  /* Hide arrow on mobile — tap target is the whole card */
  .btn-card__arrow { display: none; }

  /* Tooltip off on mobile (no hover) */
  .btn-card--disabled::after { display: none; }

  .breadcrumb { font-size: 11px; }
}
