:root {
  --bg: #f7f0e6;
  --bg-deep: #efe2d0;
  --surface: rgba(255, 250, 244, 0.82);
  --surface-strong: #fff7ed;
  --ink: #1f140f;
  --muted: #5e4a40;
  --line: rgba(76, 53, 42, 0.16);
  --accent: #5b3729;
  --accent-strong: #3d241a;
  --accent-soft: #d7b38e;
  --shadow: 0 24px 70px rgba(55, 31, 19, 0.13);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
  --body-font: "Avenir Next", "Segoe UI", sans-serif;
  --heading-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;

  /* Fluid Spacing & Gaps */
  --space-section: clamp(3rem, 8vh, 6rem);
  --space-container: clamp(1rem, 3vw, 2rem);
  --grid-gap: clamp(1rem, 2.5vw, 1.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 36%),
    radial-gradient(circle at right 20%, rgba(215, 179, 142, 0.28), transparent 25%),
    linear-gradient(180deg, #fbf6ef 0%, #f2e5d6 100%);
  min-width: 320px;
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  inset: auto auto 0 -14rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: rgba(91, 55, 41, 0.08);
  filter: blur(10px);
  z-index: -1;
}

.page-shell::after {
  inset: 8rem -12rem auto auto;
  background: rgba(215, 179, 142, 0.18);
}

.container {
  width: min(calc(100% - var(--space-container) * 2), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  background: rgba(247, 240, 230, 0.84);
  border-bottom: 1px solid rgba(76, 53, 42, 0.08);
}

.site-header__inner,
.hero,
.highlights,
.story-grid,
.taste-grid,
.details-grid,
.footer-cta {
  display: grid;
  gap: var(--grid-gap);
}

.site-header__inner {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0.75rem 0;
}

/* Mobile Menu Toggle Styles */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  cursor: pointer;
  z-index: 50;
  transition: background-color 0.2s;
}

.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, background-color 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  transition: transform 0.2s, top 0.2s;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.menu-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  text-decoration: none;
}

.brand > span {
  min-width: 0;
}

.brand img {
  height: 42px;
  width: auto;
  flex-shrink: 0;
}

.brand__eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand__name {
  display: block;
  font-family: var(--heading-font);
  font-size: 1.35rem;
  white-space: nowrap;
}

.site-nav {
  justify-self: center;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-nav a,
.header-actions a {
  text-decoration: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  min-height: 44px;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.button--icon svg {
  flex-shrink: 0;
}

.cart-link {
  position: relative;
}

.cart-count-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-count-badge[hidden] {
  display: none;
}

.button-label {
  display: inline-flex;
}

.site-nav .mobile-actions {
  display: none;
}

.button,
.button--ghost,
.button--text {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button {
  padding: 0.95rem 1.35rem;
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid transparent;
  box-shadow: 0 14px 32px rgba(61, 36, 26, 0.22);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.button--ghost {
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(76, 53, 42, 0.14);
  color: var(--ink);
}

.button--text {
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
}

.hero-wrap {
  padding: 3.5rem 0 2.25rem;
}

.hero {
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
}

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(76, 53, 42, 0.12);
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1,
.section-title,
.cta-panel h2,
.not-found h1 {
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  max-width: 10ch;
  margin-top: 0.55rem;
}

.hero-copy p,
.section-lead,
.detail-list,
.cta-panel p,
.not-found p {
  font-size: 1.08rem;
  line-height: clamp(1.6, 3vw, 1.75);
  color: var(--muted);
}

.hero-meta,
.facts,
.chip-row,
.payments,
.book-points,
.audience-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--ink);
}

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

.hero-note {
  margin-top: 1rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.hero-note[data-stock-state="out-of-stock"] {
  color: var(--accent-strong);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-card {
  position: relative;
  width: min(100%, 510px);
  padding: 1.15rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.88), rgba(241, 227, 208, 0.86));
  border: 1px solid rgba(76, 53, 42, 0.08);
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.hero-card__main {
  width: 100%;
  aspect-ratio: 1409 / 2000;
  object-fit: cover;
  border-radius: 22px;
}

.floating-card {
  position: absolute;
  max-width: 270px;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 249, 243, 0.94);
  border: 1px solid rgba(76, 53, 42, 0.12);
  box-shadow: var(--shadow);
}

.floating-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.floating-card--left {
  left: -2rem;
  bottom: 2rem;
}

.floating-card--right {
  right: -2rem;
  top: 2rem;
}

.section {
  padding: var(--space-section) 0;
}

.section__header {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 760px;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 4rem);
}

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

.card,
.detail-card,
.taste-card,
.quote-card,
.cta-panel {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card h3,
.detail-card h3,
.taste-card h3,
.quote-card h3 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}

.card p,
.detail-card p,
.taste-card p,
.quote-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.story-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.detail-card--book .section__header {
  max-width: none;
}

.book-points,
.audience-list {
  flex-direction: column;
  gap: 1rem;
}

.list-row {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.82);
  border: 1px solid rgba(76, 53, 42, 0.1);
}

.list-row strong {
  display: block;
  margin-bottom: 0.3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.gallery-card {
  position: relative;
  grid-column: span 3;
  padding: 0;
  overflow: hidden;
  min-height: 100%;
}

.gallery-card:nth-child(1),
.gallery-card:nth-child(6) {
  grid-column: span 6;
}

.gallery-card button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.gallery-card__label {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: rgba(22, 14, 10, 0.72);
  color: #fffaf4;
  font-size: 0.9rem;
}

.taste-grid,
.details-grid,
.footer-cta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.taste-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 440px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1rem;
}

.quote-card img {
  border-radius: 18px;
  margin-bottom: 1rem;
}

.detail-card ul,
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-card li,
.detail-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(76, 53, 42, 0.1);
}

.detail-card li:last-child,
.detail-list li:last-child {
  border-bottom: 0;
}

.payments span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(76, 53, 42, 0.12);
  font-size: 0.9rem;
}

.cta-panel {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.92), rgba(223, 193, 166, 0.76));
}

.cta-panel h2 {
  font-size: clamp(2.1rem, 4vw, 4rem);
  max-width: 9ch;
}

.site-footer {
  padding: 1.2rem 0 2.4rem;
}

.footer-stack {
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-meta a {
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-meta a:hover,
.footer-meta a:focus-visible {
  text-decoration: underline;
}

.footer-meta {
  display: grid;
  gap: 0.35rem;
}

.footer-meta p {
  margin: 0;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 8, 6, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal__dialog {
  position: relative;
  width: min(1100px, 100%);
  background: rgba(255, 249, 242, 0.98);
  border-radius: 28px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.gallery-modal__dialog img {
  width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: 18px;
  background: #f4ece1;
}

.gallery-modal__caption {
  padding: 0.9rem 0.3rem 0.2rem;
  color: var(--muted);
}

.gallery-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(23, 14, 10, 0.78);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.not-found-wrap {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.not-found {
  width: min(calc(100% - 2rem), 720px);
  padding: 2.2rem;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.not-found h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  margin-bottom: 1rem;
}

.not-found__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

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

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

.article-card__media {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  padding: 1.35rem;
}

.article-card__meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-card__body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--heading-font);
  font-size: 1.7rem;
  line-height: 1.05;
}

.article-card__body h3 a {
  text-decoration: none;
}

.article-card__body p {
  color: var(--muted);
  line-height: 1.7;
}

.blog-page,
.article-page {
  padding-top: 3rem;
}

.post-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.post-hero__copy {
  display: grid;
  gap: 0.9rem;
}

.post-hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.article-shell--single {
  grid-template-columns: minmax(0, 860px);
}

.post-hero--simple {
  grid-template-columns: minmax(0, 1fr);
}

.article-content,
.article-sidebar {
  display: grid;
  gap: 1rem;
}

.article-content {
  padding: 1.8rem;
  border-radius: 28px;
  background: rgba(255, 251, 246, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-content h2,
.article-content h3 {
  font-family: var(--heading-font);
  line-height: 1.08;
  margin: 1.6rem 0 0.6rem;
}

.article-content h2:first-child,
.article-content h3:first-child,
.article-content p:first-child {
  margin-top: 0;
}

.article-content p,
.article-content li {
  color: var(--muted);
  line-height: 1.85;
  font-size: 1.05rem;
}

.article-content a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.article-list {
  margin: 0;
  padding-left: 1.2rem;
}

.article-figure {
  margin: 1.3rem 0;
}

.article-figure img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.article-caption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 1240px) {
  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .site-nav {
    gap: 0.85rem;
    flex-wrap: nowrap;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions .button-label {
    display: none;
  }

  .header-actions .button,
  .header-actions .button--ghost {
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .header-actions .cart-count-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 720px) {
  .brand > span {
    display: none;
  }
}

@media (max-width: 1080px) {
  .hero,
  .story-grid,
  .taste-grid,
  .details-grid,
  .footer-cta,
  .post-hero,
  .article-shell,
  .highlights {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .brand {
    overflow: hidden;
  }

  .blog-preview-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .floating-card {
    position: static;
    max-width: none;
    margin-top: 1rem;
  }

  .gallery-card,
  .gallery-card:nth-child(1),
  .gallery-card:nth-child(6) {
    grid-column: span 6;
  }

  .menu-toggle {
    display: flex;
    height: 44px;
    width: 44px;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-width: min(22rem, calc(100vw - 2rem));
    background: rgba(247, 240, 230, 0.98);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(61, 36, 26, 0.18);
    padding: 1rem;
    z-index: 40;
    gap: 0.35rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transform-origin: top right;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-nav[data-visible="true"] .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
  }

  .mobile-actions .button,
  .mobile-actions .button--ghost {
    width: 100%;
  }

  .site-nav[data-visible="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    font-size: 1rem;
    font-family: var(--body-font);
    color: var(--ink);
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(76, 53, 42, 0.08);
  }

  .header-actions {
    justify-self: end;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 400px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
}

a, button {
  min-height: 44px;
  min-width: 44px;
}
