:root {
  --bg: #14110f;
  --bg-elev: #1e1916;
  --ink: #f3ebe3;
  --muted: #b5a89c;
  --accent: #c45c26;
  --accent-2: #e8c39e;
  --line: rgba(243, 235, 227, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 4px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, #3a2218 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a2a33 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  --header-h: 2.35rem;
  --ctrl-h: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}
.brand {
  flex-shrink: 0;
  display: inline-block;
  width: 320px;
  height: var(--header-h);
  background-position: left center;
  background-size: contain;
  background-repeat: no-repeat;
  text-decoration: none;
  line-height: 0;
  filter: grayscale(1);
  transition: filter 0.2s ease, opacity 0.15s ease;
}
.brand:hover { text-decoration: none; opacity: 0.92; filter: grayscale(0.35); }
.header-search {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  max-width: 360px;
  margin-left: auto;
  min-width: 0;
}
.header-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: var(--ctrl-h);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 2.1rem 0 0.75rem;
  border-radius: var(--radius);
  font: inherit;
}
.header-search input::-webkit-search-decoration,
.header-search input::-webkit-search-cancel-button,
.header-search input::-webkit-search-results-button,
.header-search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}
.header-search-icon {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.header-search-icon:hover {
  color: var(--ink);
  background: transparent;
}
.header-search-icon:active {
  color: var(--accent);
  background: transparent;
}
.header-search-icon svg {
  display: block;
  opacity: 0.85;
}
.btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  height: var(--ctrl-h);
  padding: 0 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: #d96a2f;
}
.btn:active {
  background: #b3521f;
}
.btn-ghost {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  background: #2c2622;
  border-color: rgba(243, 235, 227, 0.28);
  color: #fff;
}
.btn-ghost:active {
  background: #35302c;
}
a.btn, a.btn-ghost {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}
.nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}
.nav > a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  height: var(--ctrl-h);
  padding: 0 0.8rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav > a:hover {
  color: #fff;
  text-decoration: none;
  background: var(--bg-elev);
  border-color: var(--line);
}

.account-menu {
  position: relative;
  flex-shrink: 0;
}
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: var(--ctrl-h);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 0.75rem 0 0.55rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.account-trigger:hover,
.account-menu.is-open .account-trigger {
  border-color: rgba(243, 235, 227, 0.28);
  background: #2c2622;
}
.account-icon { flex-shrink: 0; opacity: 0.9; }
.account-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 220px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  z-index: 30;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.account-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.account-field label {
  font-size: 0.8rem;
  color: var(--muted);
}
.account-lang-select {
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.55rem;
  font: inherit;
}
.account-action {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.account-action:hover { background: #d96a2f; }

.breadcrumbs-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem 0;
}
.breadcrumbs {
  min-height: 1.25rem;
}
.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}
.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.breadcrumbs-item:not(:last-child)::after {
  content: "/";
  margin: 0 0.45rem;
  color: rgba(243, 235, 227, 0.28);
}
.breadcrumbs-item a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs-item a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.breadcrumbs-item.is-current span {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28ch;
}

.site-main { max-width: var(--max); margin: 0 auto; padding: 1rem 1.25rem 3rem; }

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0.75rem;
  min-height: min(68vh, 560px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-elev);
  margin-bottom: 2.75rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-elev);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 33.333%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(20, 17, 15, 0.94) 0%, rgba(20, 17, 15, 0.72) 42%, rgba(20, 17, 15, 0.28) 100%),
    linear-gradient(0deg, rgba(20, 17, 15, 0.88) 0%, transparent 55%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.75rem;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 0.85rem;
  font-weight: 700;
  max-width: 16ch;
}
.lede {
  color: var(--muted);
  max-width: 38ch;
  font-size: 1.08rem;
  margin: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}
.hero-actions .btn-ghost {
  background: rgba(30, 25, 22, 0.72);
  border-color: rgba(243, 235, 227, 0.22);
}
.hero-actions .btn-ghost:hover {
  background: rgba(44, 38, 34, 0.92);
}

.section { margin: 2.4rem 0; }
.section-head { margin-bottom: 1.15rem; }
.section-link {
  color: inherit;
  text-decoration: none;
}
.section-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.section h2, .section h1 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.section-lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 48ch;
}
.muted { color: var(--muted); }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.1rem;
}
.poster-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.15s ease;
}
.poster-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
  border-color: rgba(243, 235, 227, 0.28);
}
.poster-media {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #2a2420;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 33.333%;
}
.poster-card .cap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem 0.7rem;
  min-height: 3.55rem;
  box-sizing: border-box;
}
.poster-card .cap-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}
.poster-card .cap small,
.poster-card .cap .credit-line {
  display: block;
  color: var(--muted);
  margin: 0;
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prose { color: var(--muted); max-width: 70ch; }
.credits { display: grid; gap: 0.35rem; }
.credits a { color: var(--accent-2); }

.auth-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--bg-elev);
  padding: 1.5rem;
  border: 1px solid var(--line);
}
.auth-card label { display: block; margin: 0.75rem 0; }
.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input[type=text] {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
}
.check { display: flex !important; align-items: center; gap: 0.45rem; }
.form-error { color: #e07070; }

.review-form { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; max-width: 560px; }
.review-form input, .review-form textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.55rem;
  font: inherit;
}
#reviews-list article {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: grid; place-items: center;
  z-index: 40;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg-elev);
  padding: 1.5rem;
  max-width: 420px;
  border: 1px solid var(--line);
}
.modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }
  .nav { margin-left: auto; }
  .account-name { display: none; }
  .account-trigger { padding: 0.4rem; }
  .hero { min-height: 52vh; }
  .hero-copy { padding: 2.5rem 1.25rem 2rem; }
  .hero-copy h1 { max-width: none; }
}
