:root {
  --bg: #f8f6f2;
  --surface: #ffffff;
  --text: #1f1b17;
  --muted: #5d5851;
  --line: #e3ddd3;
  --accent: #bb711c;
  --accent-soft: #dcb753;
  --shadow: 0 12px 28px rgba(17, 12, 7, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --container: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Comfortaa', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
  background: rgba(248, 246, 242, 0.92); border-bottom: 1px solid rgba(227, 221, 211, 0.85);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 0;
}
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; min-width: 0; }
.brand img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: white; padding: 0.3rem; border: 1px solid var(--line); }
.brand span { display: block; }
.brand-name { font-family: 'Philosopher', serif; font-size: 1.15rem; font-weight: 700; }
.brand-tag { color: var(--muted); font-size: 0.82rem; }
.main-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  text-decoration: none; color: var(--muted); font-size: 0.92rem; padding: 0.65rem 0.85rem; border-radius: 999px;
}
.main-nav a:hover, .main-nav a.is-active { background: white; color: var(--text); box-shadow: var(--shadow); }
.main-nav .nav-logout { color: var(--accent); }
.section { padding: 4.5rem 0; }
.section-tight { padding: 2rem 0 4rem; }
.hero { padding: 3rem 0 4.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
.hero-copy { background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86)); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 2rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
h1, h2, h3, h4 { font-family: 'Philosopher', serif; line-height: 1.15; margin: 0 0 0.9rem; color: var(--text); }
h1 { font-size: clamp(2.4rem, 4vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; color: var(--muted); }
.lead { font-size: 1.05rem; }
.hero-art img, .feature-image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); object-fit: cover; }
.hero-actions, .button-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  text-decoration: none; border-radius: 999px; padding: 0.95rem 1.3rem; font-weight: 700;
  border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: white; border-color: var(--line); color: var(--text); }
.btn-tertiary { background: transparent; border-color: var(--line); color: var(--accent); }
.notice, .flash, .info-box, .small-note {
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: white; padding: 1rem 1.15rem;
}
.flash.success { border-color: #c4dcbf; background: #f5fbf3; }
.flash.error { border-color: #e8c3c3; background: #fff6f6; }
.ai-disclosure { background: #fffaf3; border-color: rgba(187,113,28,0.28); }
.catalogue-card.is-pending { opacity: 0.82; }
.catalogue-card-note { font-weight: 700; color: var(--accent); margin-top: 0.7rem; }
.catalogue-card-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.7rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.card, .tile, .content-card, .guide-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-body, .tile-body, .content-pad { padding: 1.3rem; }
.tile img, .style-card img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.tile-body p, .style-card p { font-size: 0.92rem; }
.icon-list, .bullet-list { padding-left: 1rem; color: var(--muted); }
.icon-list li, .bullet-list li { margin-bottom: 0.55rem; }
.section-header { max-width: 760px; margin-bottom: 1.6rem; }
.step-card { padding: 1.4rem; }
.step-number {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center;
  background: rgba(187,113,28,0.12); color: var(--accent); font-weight: 700; margin-bottom: 0.9rem;
}
.form-shell {
  background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.88rem; color: var(--text); margin-bottom: 0.35rem; font-weight: 700; }
input, select, textarea {
  width: 100%; padding: 0.9rem 1rem; border-radius: 14px; border: 1px solid var(--line);
  font: inherit; color: var(--text); background: #fff;
}
textarea { min-height: 150px; resize: vertical; }
small, .helper { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.8rem; }
.page-intro { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem; align-items: start; }
.sticky-note { position: sticky; top: 6rem; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.stat { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; text-align: center; }
.stat strong { display: block; font-family: 'Philosopher', serif; font-size: 1.3rem; color: var(--accent); }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.definition { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1rem; }
.filter-tabs span { padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 0.88rem; }
.placeholder-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.placeholder-card { aspect-ratio: 1 / 1; border-radius: 22px; border: 1px dashed #c8b9a6; background: linear-gradient(135deg, #fff, #f4ede4); display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--muted); }
.kicker { color: var(--accent); font-size: 0.84rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.site-footer { margin-top: 3rem; padding: 2.5rem 0; border-top: 1px solid var(--line); background: #f2eee8; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 1.2rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.2rem; margin-top: 1.2rem; border-top: 1px solid rgba(93,88,81,0.14); }
.footer-bottom p, .site-footer p { font-size: 0.85rem; }

.definition-grid.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.definition.visual-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
}

.definition-image {
  width: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  display: block;
}

.definition-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.definition-copy h3 {
  margin: 0 0 0.45rem 0;
}

.definition-copy p {
  margin: 0;
}

.inspiration-card {
  border: 1px solid var(--line);
  background: white;
}

.inspiration-trigger {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  display: block;
}

.inspiration-grid .placeholder-card {
  aspect-ratio: auto;
}

.style-card-link {
  display: block;
  text-decoration: none;
  height: 100%;
}

.style-card-link.is-disabled {
  cursor: default;
}

.style-card-link .card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.style-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--accent);
}

.style-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.material-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.material-shortcut-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.material-shortcut-link {
  display: block;
  text-decoration: none;
  padding: 1.2rem 1.25rem;
  height: 100%;
}

.material-shortcut-link.is-disabled {
  cursor: default;
}

.material-shortcut-link h3 {
  margin-bottom: 0.45rem;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin: 0 0 1rem 0;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
}


.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.catalogue-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.catalogue-image-trigger {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  display: block;
}

.catalogue-image-trigger img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.catalogue-card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.catalogue-card-body h3 {
  margin-bottom: 0.45rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 12, 7, 0.78);
  backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: min(40vw, 560px);
  max-width: 560px;
  max-height: 90vh;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-dialog-caption {
  align-items: stretch;
}

.lightbox-figure {
  width: 100%;
  background: white;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  padding: 0.85rem;
}

.lightbox-dialog img {
  width: 100%;
  max-width: 100%;
  max-height: 68vh;
  height: auto;
  border-radius: 14px;
  background: #fff;
}

.lightbox-caption {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.lightbox-close {
  position: absolute;
  top: -0.4rem;
  right: -0.15rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .hero-grid, .page-intro, .footer-grid, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3, .stat-strip, .placeholder-grid, .catalogue-grid, .style-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header {
    backdrop-filter: blur(8px);
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.45rem 0 0.35rem;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    padding: 0.22rem;
  }

  .brand-name {
    font-size: 0.98rem;
    line-height: 1.1;
  }

  .brand-tag {
    display: none;
  }

  .main-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0 0.25rem;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.5rem 0.66rem;
  }

  .main-nav a:hover,
  .main-nav a.is-active {
    box-shadow: none;
  }

  .hero-grid, .page-intro, .grid-2, .grid-3, .grid-4, .stat-strip, .form-grid, .definition-grid, .placeholder-grid, .footer-grid, .definition-grid.visual-grid, .catalogue-grid, .style-group-grid, .material-shortcuts-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy { padding: 1.4rem; }
  .section { padding: 3.25rem 0; }
  h1 { font-size: 2.4rem; }

  .lightbox-dialog {
    width: min(90vw, 420px);
    max-width: 420px;
    padding: 0.65rem;
  }

  .lightbox-dialog img {
    max-height: 60vh;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--container), calc(100% - 1.25rem));
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .main-nav a {
    font-size: 0.74rem;
    padding: 0.45rem 0.56rem;
  }

  .definition.visual-card {
    grid-template-columns: 1fr;
  }

  .definition-image {
    width: 100%;
    max-width: 160px;
  }

  .lightbox-close {
    top: -0.2rem;
    right: -0.05rem;
  }
}
