@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400..700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --paper: #faf6ef;
  --surface: #fffbf5;
  --ink: #2d2628;
  --muted: #625657;
  --wine: #641d32;
  --wine-dark: #471324;
  --wine-light: #f3e5e6;
  --line: #dfd4cb;
  --sage: #e7ece1;
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.58 var(--body);
}

a {
  color: inherit;
  text-underline-offset: .2em;
}

:where(a, summary):focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 4px;
}

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

figure {
  min-width: 0;
  margin: 0;
}

figcaption {
  margin-top: .7rem;
  color: var(--muted);
  font-size: .83rem;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
}

p {
  margin-block: 0 1rem;
}

.shell {
  width: min(100% - 6rem, 1280px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: .75rem;
  left: .75rem;
  transform: translateY(calc(-100% - 1.5rem));
  padding: .7rem 1rem;
  background: var(--surface);
  color: var(--wine);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  min-height: 77px;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--wine);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2.5vw, 2rem);
}

.category-picker, .language-picker {
  position: relative;
}

.site-nav > a, .category-picker > summary, .language-picker > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.category-picker > summary, .language-picker > summary, .faq-list summary {
  cursor: pointer;
  list-style: none;
}

.category-picker > summary::-webkit-details-marker,
.language-picker > summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker {
  display: none;
}

.category-picker > summary::after, .language-picker > summary::after {
  width: .45rem;
  height: .45rem;
  flex: none;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.13rem) rotate(45deg);
  content: '';
}

.category-picker[open] > summary::after, .language-picker[open] > summary::after {
  transform: translateY(.1rem) rotate(225deg);
}

.site-nav > a:hover, .category-picker > summary:hover, .language-picker > summary:hover {
  color: var(--wine);
  text-decoration: underline;
}

.site-nav > a[aria-current="page"] {
  color: var(--wine);
  text-decoration: underline;
}

.nav-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + .35rem);
  right: 0;
  width: max-content;
  min-width: min(13rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(65vh, 30rem);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: .65rem;
  padding: .35rem;
  background: var(--surface);
  box-shadow: 0 1rem 2.5rem #2d262822;
}

.nav-menu a {
  display: block;
  min-height: 44px;
  border-radius: .3rem;
  padding: .67rem .8rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-menu a:hover, .nav-menu a[aria-current] {
  background: var(--wine-light);
  color: var(--wine-dark);
}

.nav-menu a:focus-visible {
  outline-offset: -3px;
}

.hero {
  padding-block: clamp(3.2rem, 6.9vw, 6.7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5.2vw, 5.2rem);
}

.hero-copy h1, .section h2, .article h1, .article h2 {
  color: var(--wine);
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-copy h1, .article h1 {
  font-size: clamp(3.35rem, 6.8vw, 6.75rem);
  line-height: .88;
}

.hero-description {
  max-width: 43ch;
  margin-block: 1.5rem 1.8rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.button {
  display: inline-flex;
  min-height: 49px;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--wine);
  border-radius: .25rem;
  padding: .72rem 1.04rem;
  background: var(--wine);
  color: var(--surface);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background .16s, border-color .16s, color .16s;
}

.button:hover {
  border-color: var(--wine-dark);
  background: var(--wine-dark);
}

.button-secondary {
  border-color: #b69b9c;
  background: transparent;
  color: var(--wine);
}

.button-secondary:hover {
  background: var(--wine-light);
}

.arrow {
  flex: none;
  font-size: 1.14rem;
  line-height: 1;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1.21;
  border-radius: .35rem;
  background: var(--line);
  object-fit: cover;
  object-position: center;
}

.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(3.25rem, 6.1vw, 6rem);
  scroll-margin-top: 1.25rem;
}

.section h2, .article h2 {
  font-size: clamp(2.65rem, 5vw, 4.65rem);
  line-height: .98;
}

.section-header {
  margin-bottom: clamp(1.35rem, 3vw, 2.15rem);
}

.section-header p {
  max-width: 65ch;
  margin-block: .7rem 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.category-grid, .checklist-grid {
  display: grid;
  gap: .75rem;
}

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

.category-card {
  position: relative;
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .3rem;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--surface);
  text-decoration: none;
  transition: background .16s, border-color .16s;
}

.category-card:hover {
  border-color: #bd909a;
  background: var(--wine-light);
}

.category-card h3, .checklist-card h3 {
  color: var(--wine);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.category-card h3 {
  padding-right: 1.4rem;
}

.category-card p, .checklist-card p {
  margin-block: .55rem 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.category-card .arrow {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  color: var(--wine);
}

.checklist-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 1.65rem 0;
  padding: 0;
  list-style: none;
}

.checklist-card {
  border-top: 2px solid var(--wine);
  padding: 1.15rem 1.4rem .25rem 0;
}

.checklist-card h3 {
  font-size: 1.12rem;
}

.guide-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 5rem);
}

.guide-feature img, .article figure img {
  width: 100%;
  border-radius: .35rem;
  background: var(--line);
}

.guide-feature img {
  aspect-ratio: 1.43;
  object-fit: cover;
}

#guide {
  border-color: #d3dbcc;
  background: var(--sage);
}

.guide-copy p {
  max-width: 54ch;
  margin-block: .9rem 1.3rem;
  color: var(--muted);
}

.faq-list {
  width: min(100%, 54rem);
  margin-top: 1.55rem;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  min-height: 55px;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.35rem;
  padding-block: .9rem;
  font-weight: 700;
  line-height: 1.35;
}

.faq-list summary::after {
  flex: none;
  color: var(--wine);
  font-size: 1.15rem;
  content: '+';
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list details p {
  max-width: 68ch;
  margin-block: 0 1.25rem;
  color: var(--muted);
}

#faq .hero-actions {
  margin-top: 1.5rem;
}

.article {
  padding-block: clamp(2.5rem, 6vw, 6.2rem);
}

.article-inner {
  width: min(100% - 6rem, 52rem);
}

.article h1 {
  margin-block: 1.15rem 1.3rem;
  font-size: clamp(3.4rem, 6.8vw, 6.15rem);
}

.article h2 {
  margin-bottom: .6rem;
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.article p, .article ul {
  max-width: 68ch;
}

.article-intro {
  color: var(--muted);
  font-size: clamp(1.09rem, 2vw, 1.3rem);
}

.article section, .article figure, .article .button {
  margin-top: 2rem;
}

.article a:not(.button) {
  color: var(--wine);
  font-weight: 650;
}

.article li + li {
  margin-top: .45rem;
}

.site-footer {
  padding-block: clamp(2rem, 5vw, 4rem);
  background: var(--wine-dark);
  color: var(--paper);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.1rem 2.5rem;
}

.site-footer .brand {
  color: var(--paper);
}

.site-footer p {
  max-width: 55ch;
  margin-block: .65rem 0;
  color: #f0dce1;
  font-size: .9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.3rem;
  font-size: .9rem;
}

.site-footer :focus-visible {
  outline-color: var(--paper);
}

@media (max-width: 950px) {
  .shell {
    width: min(100% - 3rem, 100%);
  }

  .article-inner {
    width: min(100% - 3rem, 52rem);
  }

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

@media (max-width: 720px) {
  .hero-grid, .guide-feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.85rem;
  }

  .hero-visual img {
    aspect-ratio: 1.42;
  }

  .hero-copy h1, .article h1 {
    font-size: clamp(3.1rem, 10.75vw, 5.15rem);
  }

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

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

  .checklist-card {
    padding-block: .8rem .6rem;
  }
}

@media (max-width: 650px) {
  .header-inner {
    flex-wrap: wrap;
    gap: .35rem .75rem;
    padding-block: .7rem .25rem;
  }

  .site-nav {
    position: relative;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 .7rem;
  }

  .category-picker, .language-picker {
    position: static;
  }

  .category-picker .nav-menu {
    right: auto;
    left: 0;
  }
}

@media (max-width: 550px) {
  .shell, .article-inner {
    width: calc(100% - 2rem);
  }

  .hero {
    padding-block: 2.5rem;
  }

  .category-card {
    padding: .85rem;
  }

  .category-card .arrow {
    top: .82rem;
    right: .78rem;
  }

  .category-card h3 {
    padding-right: 1rem;
    font-size: .98rem;
  }

  .category-card p {
    font-size: .85rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 365px) {
  .site-nav > a, .category-picker > summary, .language-picker > summary {
    font-size: .8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: 0s !important;
  }
}
