@font-face {
  font-family: "Roustel";
  src: url("./assets/Roustel.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #120d0f;
  --bg-soft: #1b1216;
  --panel: rgba(29, 19, 23, 0.84);
  --panel-strong: rgba(43, 27, 33, 0.92);
  --paper: #f3ebe1;
  --paper-soft: #dccdbb;
  --wine: #6f243a;
  --wine-bright: #a83f5f;
  --gold: #d6b27a;
  --sage: #87967d;
  --border: rgba(214, 178, 122, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 26px;
  --radius-sm: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--paper);
  background:
    radial-gradient(circle at top, rgba(168, 63, 95, 0.25), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(214, 178, 122, 0.14), transparent 28%),
    linear-gradient(180deg, #1c1116 0%, #120d0f 55%, #0f0b0c 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2.5rem;
}

.site-header,
.site-footer,
.hero,
.feature-card,
.path-card,
.timeline,
.cta-banner,
.page-hero,
.step-card,
.article-card,
.tip-card,
.glossary-controls,
.glossary-card,
.tasting-form,
.preview-card {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  position: sticky;
  top: 1rem;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff4e4;
  background: linear-gradient(145deg, var(--wine-bright), var(--wine));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-copy {
  display: grid;
  gap: 0.15rem;
}

.brand-copy strong {
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy span {
  color: var(--paper-soft);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-nav a {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--paper-soft);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.button-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 178, 122, 0.28);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
  cursor: pointer;
}

.button-link {
  color: #fff4e6;
  background: linear-gradient(145deg, var(--wine-bright), var(--wine));
}

.ghost-button {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.button-link:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 178, 122, 0.46);
}

.menu-toggle {
  display: none;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

main {
  display: grid;
  gap: 1.4rem;
  padding-top: 1.4rem;
}

.page-main {
  gap: 1.4rem;
}

.hero,
.page-hero {
  overflow: hidden;
  position: relative;
}

.hero::after,
.page-hero::after,
.cta-banner::after {
  content: "";
  position: absolute;
  inset: auto -6rem -8rem auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 178, 122, 0.32), transparent 68%);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: var(--radius);
}

.page-hero {
  padding: 2.3rem;
  border-radius: var(--radius);
}

.hero-copy,
.hero-panel,
.hero-card,
.section-heading,
.article-card,
.preview-sheet {
  position: relative;
  z-index: 1;
}

.eyebrow,
.card-label {
  margin: 0 0 0.65rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.96;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 8vw, 6.9rem);
  letter-spacing: -0.05em;
}

.page-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

p,
li {
  line-height: 1.7;
  color: var(--paper-soft);
}

.lede {
  max-width: 58ch;
  font-size: 1.08rem;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 0.4rem;
  color: var(--gold);
}

.hero-card,
.accent-card {
  padding: 1.4rem;
  border-radius: calc(var(--radius) - 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    linear-gradient(160deg, rgba(214, 178, 122, 0.08), rgba(168, 63, 95, 0.08));
  border: 1px solid rgba(214, 178, 122, 0.18);
  min-height: 100%;
}

.hero-card h2 {
  font-size: 2.35rem;
  margin-bottom: 0.8rem;
}

.feature-grid,
.path-grid,
.timeline-grid,
.steps-grid,
.tips-grid,
.glossary-grid {
  display: grid;
  gap: 1.2rem;
}

.feature-grid,
.path-grid,
.timeline-grid,
.tips-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.feature-card,
.path-card,
.step-card,
.tip-card,
.glossary-card {
  padding: 1.45rem;
  border-radius: calc(var(--radius) - 8px);
}

.path-card a {
  color: var(--gold);
}

.showcase,
.timeline {
  padding: 1.5rem;
  border-radius: var(--radius);
}

.section-heading {
  margin-bottom: 1.2rem;
}

.timeline-grid article {
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 178, 122, 0.14);
}

.timeline-grid span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.7rem;
  border-radius: 50%;
  color: #fff4e6;
  background: linear-gradient(145deg, var(--wine-bright), var(--wine));
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1.1rem 1.3rem;
  border-radius: 999px;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.article-layout,
.template-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
}

.article-card,
.tasting-form,
.preview-card,
.glossary-controls {
  padding: 1.45rem;
  border-radius: var(--radius);
}

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

.glossary-controls {
  display: grid;
  gap: 1rem;
}

.search-field {
  display: grid;
  gap: 0.45rem;
}

.search-field span,
label span {
  color: var(--paper);
  font-size: 0.92rem;
}

.search-field input,
.tasting-form input,
.tasting-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 178, 122, 0.18);
  border-radius: 18px;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.search-field input:focus,
.tasting-form input:focus,
.tasting-form textarea:focus {
  border-color: rgba(214, 178, 122, 0.48);
  background: rgba(255, 255, 255, 0.06);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-button {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  color: var(--paper-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 178, 122, 0.14);
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease;
}

.filter-button:hover,
.filter-button.active {
  color: var(--paper);
  background: rgba(168, 63, 95, 0.22);
  transform: translateY(-1px);
}

.results-copy {
  margin: 0;
  min-height: 1.5rem;
  color: var(--gold);
  font-size: 0.92rem;
}

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

.glossary-card.hidden {
  display: none;
}

.tasting-form {
  display: grid;
  gap: 1rem;
}

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

.tasting-form label {
  display: grid;
  gap: 0.45rem;
}

.preview-card {
  min-height: 100%;
  background: rgba(246, 240, 232, 0.96);
  border-color: rgba(107, 31, 42, 0.12);
}

.preview-sheet {
  padding: 0.35rem 0 0;
}

.journal-entry {
  color: #231a18;
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid #ead7da;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.76), rgba(243, 235, 232, 0.82)),
    url("./assets/background-paper-ring.jpg") center top / cover no-repeat;
  box-shadow: 0 18px 40px rgba(89, 52, 44, 0.18);
}

.journal-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.journal-script {
  margin: 0 0 0.2rem;
  color: #7d4450;
  font-family: "Roustel", "Cormorant Garamond", serif;
  font-size: 1.8rem;
  line-height: 1.05;
}

.journal-entry h2,
.journal-entry h3,
.journal-entry p,
.journal-entry strong,
.journal-entry span {
  color: #231a18;
}

.journal-entry h2 {
  font-size: clamp(2.4rem, 4vw, 3.25rem);
}

.rating-badge {
  min-width: 5.4rem;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(107, 31, 42, 0.1);
  border: 1px solid rgba(107, 31, 42, 0.14);
}

.rating-badge span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7d4450;
}

.rating-badge strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.5rem;
}

.journal-section {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(107, 31, 42, 0.12);
}

.journal-section h3 {
  margin-bottom: 0.4rem;
  font-size: 1.35rem;
}

.journal-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.journal-chip,
.journal-chip-empty {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.journal-chip {
  background: rgba(107, 31, 42, 0.1);
  border: 1px solid rgba(107, 31, 42, 0.12);
}

.journal-chip-empty {
  background: rgba(138, 138, 138, 0.08);
  border: 1px dashed rgba(138, 138, 138, 0.26);
  color: #6d6460;
}

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

.journal-structure-grid p {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.5);
  border: 1px solid rgba(107, 31, 42, 0.08);
}

.journal-structure-grid strong,
.journal-structure-grid span {
  display: block;
}

.journal-structure-grid strong {
  margin-bottom: 0.2rem;
  color: #7d4450;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-structure-grid span {
  font-weight: 700;
}

.preview-sheet section + section {
  margin-top: 1rem;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 1.25rem;
  color: #6d6460;
}

.hidden-for-print {
  display: none;
}

@media (max-width: 1000px) {
  .hero,
  .article-layout,
  .template-layout,
  .feature-grid,
  .path-grid,
  .timeline-grid,
  .tips-grid,
  .glossary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .site-header,
  .site-footer,
  .cta-banner {
    border-radius: 28px;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .feature-grid,
  .path-grid,
  .timeline-grid,
  .steps-grid,
  .tips-grid,
  .reading-grid,
  .glossary-grid,
  .form-grid,
  .article-layout,
  .template-layout {
    grid-template-columns: 1fr;
  }

  .journal-entry-top,
  .journal-structure-grid {
    grid-template-columns: 1fr;
  }

  .journal-entry-top {
    display: grid;
  }

  .cta-banner,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    max-width: 100%;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111111;
  }

  body::before,
  .site-header,
  .site-footer,
  .page-hero,
  .tasting-form,
  .menu-toggle {
    display: none !important;
  }

  .site-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .template-layout {
    display: block;
  }

  .preview-card,
  .preview-sheet {
    border: none;
    box-shadow: none;
    background: #ffffff;
    color: #111111;
  }

  .journal-entry {
    box-shadow: none;
    background:
      linear-gradient(180deg, rgba(255, 250, 242, 0.92), rgba(243, 235, 232, 0.92)),
      url("./assets/background-paper-ring.jpg") center top / cover no-repeat;
  }

  .preview-sheet p,
  .preview-sheet .preview-meta,
  .preview-sheet strong {
    color: #222222;
  }
}
