/* Tuli Trumm — design tokens & layout */
:root {
  --bg: #F6EFDF;
  --bg2: #FBF6EC;
  --surface: #FFFFFF;
  --ink: #16302D;
  --muted: #647873;
  --border: #E7DCC6;
  --primary: #E0654A;
  --sea: #1C9E8C;
  --flame: #F2B23B;
  --drum: #C9433A;
  --shadow: rgba(20, 48, 45, 0.16);
  --footer-bg: #0E2226;
  --footer-ink: #D9E4E0;
  --footer-muted: #9DB0AC;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --nav-height: 72px;
  --wrap: min(1200px, calc(100% - 56px));
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--flame);
  color: var(--ink);
}

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

a { color: inherit; }

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 48px;
  padding: 0 1.35rem;
  border: none;
  border-radius: 13px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px -12px var(--primary);
}

.btn--primary:hover { filter: brightness(1.06); box-shadow: 0 18px 32px -12px var(--primary); }

.btn--flame {
  background: var(--flame);
  color: var(--ink);
}

.btn--flame:hover { box-shadow: 0 18px 34px -12px rgba(0, 0, 0, 0.35); filter: brightness(1.05); }

.btn--ghost-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn--sm { height: 40px; padding: 0 1.1rem; font-size: 0.875rem; border-radius: 11px; }

.btn--ink {
  background: var(--ink);
  color: var(--bg2);
}

.btn--ink:hover { filter: brightness(1.12); }

.btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
}

/* ── Site header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.layout--hero .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}

.layout--hero .site-header.is-scrolled,
.layout--hero .site-header.is-open {
  background: rgba(14, 34, 38, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  width: var(--wrap);
  margin-inline: auto;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.layout--hero .site-brand { color: #fff; }

.site-brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 2px var(--border);
}

.layout--hero .site-brand__logo { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }

.site-brand__logo img { width: 100%; height: 100%; object-fit: cover; }

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}

.layout--hero .site-nav-toggle {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex: 1;
  margin-left: 0.75rem;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.18s ease;
}

.site-nav__links a:hover,
.site-nav__links a.is-active { color: var(--primary); }

.layout--hero .site-nav__links a { color: rgba(255, 255, 255, 0.92); }
.layout--hero .site-nav__links a:hover,
.layout--hero .site-nav__links a.is-active { color: var(--flame); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-nav__user {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}

.layout--hero .site-nav__user { color: rgba(255, 255, 255, 0.75); }
.layout--hero .site-nav__user:hover { color: #fff; }

/* ── User avatar menu ── */
.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.55rem 0.3rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.user-menu__trigger:hover,
.user-menu.is-open .user-menu__trigger {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: 0 8px 22px -14px var(--shadow);
}

.layout--hero .user-menu__trigger {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.layout--hero .user-menu__trigger:hover,
.layout--hero .user-menu.is-open .user-menu__trigger {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.user-menu__avatar.user-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
}

.user-avatar--icon {
  background: var(--bg2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.user-avatar--icon i {
  font-size: 1rem;
}

.layout--hero .user-avatar--icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.85);
}

.user-menu__name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__chevron {
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.layout--hero .user-menu__chevron { color: rgba(255, 255, 255, 0.65); }

.user-menu.is-open .user-menu__chevron {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  min-width: 220px;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 44px -16px var(--shadow);
}

.user-menu__dropdown[hidden] {
  display: none;
}

.user-menu__header {
  padding: 0.55rem 0.75rem 0.65rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
}

.user-menu__header-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.25;
}

.user-menu__header-email {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease;
}

.user-menu__item i {
  width: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.user-menu__item:hover {
  background: var(--bg2);
  color: var(--primary);
}

.user-menu__item:hover i { color: var(--primary); }

.user-menu__item--muted { color: var(--muted); }

.user-menu__item--muted:hover {
  color: var(--drum);
  background: color-mix(in srgb, var(--drum) 8%, var(--surface));
}

.user-menu__item--muted:hover i { color: var(--drum); }

.user-menu__divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

@media (max-width: 900px) {
  .user-menu {
    width: 100%;
  }

  .user-menu__trigger {
    width: 100%;
    justify-content: flex-start;
  }

  .user-menu__dropdown {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
  }

  .user-menu__name {
    max-width: none;
    flex: 1;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .site-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site-nav {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .layout--hero .site-nav {
    background: rgba(14, 34, 38, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .site-header.is-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__links a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }

  .layout--hero .site-nav__links a { border-bottom-color: rgba(255, 255, 255, 0.1); }

  .site-nav__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1rem;
  }

  .site-nav__actions .btn { width: 100%; }
}

/* ── Hero B (full-bleed) ── */
.hero-immersive {
  position: relative;
  min-height: 100svh;
  background: var(--ink);
  overflow: hidden;
}

.hero-immersive__media {
  position: absolute;
  inset: 0;
}

.hero-immersive__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-immersive__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 34, 38, 0.55) 0%,
    rgba(14, 34, 38, 0.2) 35%,
    rgba(14, 34, 38, 0.88) 100%
  );
}

.hero-immersive__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: calc(var(--nav-height) + 2rem) max(1.75rem, calc((100% - 1200px) / 2)) 2.5rem;
}

.hero-immersive__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-immersive__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 1rem 0 0;
  color: #fff;
  max-width: 14ch;
}

.hero-immersive__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.hero-immersive__meta {
  color: #D9E4E0;
  font-size: 0.9rem;
}

.hero-immersive__meta strong { color: #fff; }

@media (max-width: 640px) {
  .hero-immersive__content { padding-bottom: 2rem; }
  .hero-immersive__actions { flex-direction: column; align-items: stretch; }
  .hero-immersive__actions .btn { width: 100%; }
}

/* ── Main content area (non-hero pages) ── */
.site-main { min-height: 40vh; }

.site-main--padded { padding: 3rem 0 4rem; }

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  border-top: 1px solid var(--footer-bg);
}

.site-footer__motif {
  height: 8px;
  background-image:
    linear-gradient(135deg, var(--flame) 25%, transparent 25%),
    linear-gradient(225deg, var(--flame) 25%, transparent 25%);
  background-size: 16px 16px;
}

.site-footer__grid {
  width: var(--wrap);
  margin-inline: auto;
  padding: 2.1rem 0 2.4rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 1.75rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.site-footer__brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.site-footer__brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--footer-muted);
  max-width: 34ch;
}

.site-footer__heading {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.site-footer__links a {
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-footer__links a:hover { color: #fff; }

.site-footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.site-footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #173238;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.site-footer__social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.site-footer__copy {
  font-size: 0.75rem;
  color: #647873;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
