@import url("fonts.css");

:root {
  --bg: #f7f5f0;
  --bg-deep: #f3f1eb;
  --surface: #ffffff;
  --ink: #141414;
  --ink-soft: #3a3a3a;
  --ink-muted: #6d6d6d;
  --ink-faint: #9a9893;
  --line: #e7e4dc;
  --line-strong: #d8d4cb;
  --accent: #f3dc32;
  --accent-deep: #e6cc1f;
  --blob: #cfcbe8;
  --blob-soft: #ddd9f2;
  --btn: #111111;
  --btn-hover: #2a2a2a;
  --chip-ok: #eef3ea;
  --chip-ok-ink: #3d5a36;
  --chip-hot: #f4f0d8;
  --chip-hot-ink: #6a5a1a;
  --radius-card: 28px;
  --radius-panel: 22px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 50px rgba(28, 24, 48, 0.08);
  --shadow-soft: 0 10px 30px rgba(28, 24, 48, 0.06);
  --shadow-bar: 0 14px 40px rgba(20, 18, 30, 0.14);
  --header-h: 76px;
  --max: 1160px;
  --pad: 28px;
  --font: "Instrument Sans", "SF Pro Display", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--btn);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.header-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 240, 0.9);
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: saturate(1.2) blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.brand-o {
  width: 0.72em;
  height: 0.72em;
  margin: 0 0.06em 0.06em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: inline-block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.header-nav a {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.header-nav a:hover,
.header-actions a:not(.btn-dark):hover,
.text-link:hover {
  color: var(--ink);
}

.search-field {
  position: relative;
}

.hero-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.search-field .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
}

.hero-search input:focus {
  border-color: #cfc9bb;
  box-shadow: 0 0 0 4px rgba(20, 20, 20, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
}

.icon-btn:hover {
  background: rgba(20, 20, 20, 0.05);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--btn);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.btn-dark:hover,
.btn-dark:focus-visible {
  background: var(--btn-hover);
  color: #fff;
}

.btn-dark .plus {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
}

/* Custom listbox. Native <select> stays in the form for no-JS submit. */
form select:not(.site-select-native) {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 6.2 8 10.5l4.5-4.3' stroke='%239a9893' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

form select:not(.site-select-native):focus {
  border-color: #cfc9bb;
  box-shadow: 0 0 0 4px rgba(20, 20, 20, 0.04);
}

.site-select {
  position: relative;
}

.site-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.site-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  outline: none;
  cursor: pointer;
}

.site-select-btn:focus-visible,
.site-select.is-open .site-select-btn {
  border-color: #cfc9bb;
  box-shadow: 0 0 0 4px rgba(20, 20, 20, 0.04);
}

.site-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-select-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--ink-faint);
  transition: transform 0.16s ease;
}

.site-select.is-open .site-select-chevron {
  transform: rotate(180deg);
}

.site-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  max-height: min(320px, 60vh);
  overflow: auto;
}

.site-select-list[hidden] {
  display: none !important;
}

.site-select-list li {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  line-height: 1.35;
  cursor: pointer;
}

.site-select-list li:hover,
.site-select-list li.is-active {
  background: var(--bg-deep);
}

.site-select-list li[aria-selected="true"] {
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

.search-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 40;
  box-sizing: border-box;
  width: min(640px, calc(100vw - 32px));
  max-height: min(72vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.search-panel[hidden] {
  display: none !important;
}

.search-panel.is-open {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-panel.is-browse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 24px;
  row-gap: 22px;
}

.search-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}

.search-label {
  display: block;
  margin: 0 10px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.search-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.search-item span {
  display: block;
}

.search-item:hover,
.search-item.is-active {
  background: var(--bg-deep);
}

.search-item small {
  display: none;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 12px;
}

.search-panel:not(.is-browse) .search-item small {
  display: block;
}

.search-empty {
  padding: 16px 12px;
  color: var(--ink-muted);
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.text-link svg {
  width: 14px;
  height: 14px;
}

.site-footer {
  padding: 72px 0 40px;
  color: var(--ink-muted);
}

.footer-inner {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-brand .brand-o {
  width: 0.62em;
  height: 0.62em;
}

.footer-lead {
  margin-top: 14px;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-grid h2 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a {
  font-size: 14px;
}

.footer-grid a:hover {
  color: var(--ink);
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  font-size: 13px;
}

.footer-legal a:hover {
  color: var(--ink);
}

.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(920px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 18px;
  background: var(--surface);
  border: 1px solid rgba(20, 20, 20, 0.04);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-bar);
}

.cookie-bar[hidden] {
  display: none !important;
}

.cookie-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
}

.cookie-copy {
  flex: 1 1 auto;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.cookie-copy a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.cookie-reject {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: 8px 10px;
  font-size: 14px;
}

.cookie-reject:hover {
  color: var(--ink);
}

@media (max-width: 980px) {
  .header-left {
    display: contents;
  }

  .header-nav {
    display: none;
  }

  .header-inner.is-open .header-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 45;
    gap: 0;
    padding: 6px max(14px, calc((100% - min(1240px, 100% - 28px)) / 2)) 14px;
    background: color-mix(in srgb, var(--bg) 94%, white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 28px rgba(20, 18, 30, 0.08);
  }

  .header-inner.is-open .header-nav a {
    padding: 10px 0;
  }

  .search-panel {
    left: 0;
    right: 0;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

@media (max-width: 720px) {
  .search-panel.is-browse {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .header-inner {
    width: min(1240px, calc(100% - 28px));
    gap: 12px;
  }

  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
    padding: 16px;
    bottom: 12px;
  }

  .cookie-actions {
    justify-content: flex-end;
  }

  .footer-grid,
  .footer-legal {
    grid-template-columns: 1fr;
    display: grid;
  }
}

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