/* ============================================================================
   riltt design language — shared foundations and chrome.
   Every page imports this. Page-specific sections stay in that page's <style>.

   The system in one paragraph: a warm cream canvas, alternating with a butter
   band, punctuated by two hard cuts (deep teal, ink). Each language owns one
   saturated colour, and saturation is reserved for language — never decoration.
   Colour arrives as outline and text, not pastel fill. One typeface (Schibsted
   Grotesk) doing three jobs: heavy tight display, uppercase tracked utility,
   and 500-weight body.
   ========================================================================= */

@import url("/public/riltt-tokens.css");


* {
  box-sizing: border-box;
  font-family: inherit;
}

/* The `hidden` attribute must actually hide. Any class rule setting `display: flex` or
   `display: grid` outbids the UA stylesheet's `[hidden] { display: none }`, so elements
   toggled with .hidden = true stay visible. This bites silently every time. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

.page {
  min-height: 100vh;
  background: var(--paper);
  overflow-x: clip;
}

/* ---------- Type roles ----------
   Display: heavy, tight, negative-tracked — the page's voice.
   Utility: uppercase, wide-tracked, small — labels, nav, buttons, tags.
   Body:    500 weight, generous leading.                                    */

.u-display {
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.042em;
}

.eyebrow,
.tag,
.lang-tag,
.footer-column h4,
.btn {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-ligatures: none;
}

.eyebrow {
  display: block;
  margin: 0 0 18px;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.btn:focus-visible {
  border-radius: 999px;
}

.btn.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn .btn-arrow {
  display: inline-flex;
  transition: transform 0.16s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- Tags ----------
   Language marks and labels are drawn, not filled — an outline reads as a
   credential, a pastel bubble reads as a sticker. Set --tag-color to colour one. */

.tag,
.lang-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.64rem;
  background: transparent;
  border: 1px solid var(--tag-color, var(--ink-faint));
  color: var(--tag-color, var(--ink-soft));
  transition: border-color 0.3s ease, color 0.3s ease;
}

.lang-tag {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 4px 8px;
  border-color: var(--tag-color, var(--tomato));
  color: var(--tag-color, var(--tomato));
}

.t-tomato { --tag-color: var(--tomato); }
.t-cobalt { --tag-color: var(--cobalt); }
.t-leaf { --tag-color: var(--leaf); }
.t-pink { --tag-color: var(--pink); }
.t-violet { --tag-color: var(--violet); }
.t-teal { --tag-color: var(--teal); }
.t-marigold { --tag-color: var(--marigold-ink); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 24px;
  background: rgba(250, 245, 236, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(29, 26, 20, 0.06);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--ink);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .logo-icon {
  transform: rotate(90deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.nav-links a {
  padding: 6px 2px;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ---------- Sections and bands ---------- */

.section {
  padding: clamp(64px, 10vh, 112px) 24px;
}

.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(36px, 4.8vw, 60px);
  line-height: 0.94;
  letter-spacing: -0.042em;
  font-weight: 800;
  max-width: 620px;
}

/* Band grounds — cream alternates with butter, punctuated by two hard cuts. */
.band-butter { background: var(--butter); }
.band-teal { background: var(--teal-deep); color: var(--butter); }
.band-ink { background: var(--ink); color: var(--paper); }

.band-ink .section-title,
.band-teal .section-title {
  color: inherit;
}

.band-ink .eyebrow {
  color: rgba(250, 245, 236, 0.5);
}

.band-teal .eyebrow {
  color: rgba(252, 247, 220, 0.6);
}

.band-ink .btn {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.band-ink .btn:hover {
  background: transparent;
  color: var(--paper);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.18s ease;
}

.card:hover {
  border-color: var(--ink);
}

/* ---------- Prose (long-form: legal, about, articles) ---------- */

.prose {
  max-width: 720px;
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 500;
  color: var(--ink-soft);
}

.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.032em;
  font-weight: 800;
  color: var(--ink);
}

.prose h3 {
  margin: 36px 0 12px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.018em;
  font-weight: 700;
  color: var(--ink);
}

.prose p {
  margin: 0 0 18px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose a {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--ink-faint);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--ink-faint);
}

/* ---------- FAQ / accordion ---------- */

.faq-grid {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 24px;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--ink);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.faq-item p {
  margin: 0;
  padding: 0 0 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 500;
  max-width: 640px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 24px 0;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.footer-brand-row svg {
  width: 22px;
  height: 22px;
}

.footer-description {
  margin: 16px 0 20px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 500;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.social-button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--butter);
}

.footer-column h4 {
  margin: 0 0 16px;
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

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

.footer-legal {
  max-width: var(--wrap);
  margin: 40px auto 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  flex-wrap: wrap;
}

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

.footer-legal-links {
  display: flex;
  gap: 18px;
}

/* Ink by default; each letter finds its language colour only on hover. The
   rainbow is a reward, not the resting state. */
.big-word {
  margin: 30px 0 0;
  text-align: center;
  font-size: min(24vw, 300px);
  line-height: 0.82;
  letter-spacing: -0.052em;
  font-weight: 800;
  user-select: none;
  transform: translateY(0.12em);
}

.big-word span {
  display: inline-block;
  color: var(--ink);
  transition: transform 0.25s cubic-bezier(0.34, 1.8, 0.64, 1), color 0.25s ease;
}

.big-word span:nth-child(1):hover { color: var(--tomato); }
.big-word span:nth-child(2):hover { color: var(--marigold); }
.big-word span:nth-child(3):hover { color: var(--leaf); }
.big-word span:nth-child(4):hover { color: var(--cobalt); }
.big-word span:nth-child(5):hover { color: var(--pink); }

.big-word span:hover {
  transform: translateY(-0.06em);
}

/* ---------- Page header (interior pages) ----------
   Interior pages open with an eyebrow + display title rather than a hero. */

.page-head {
  padding: clamp(56px, 8vh, 96px) 24px clamp(32px, 5vh, 56px);
}

.page-head-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.page-title {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.042em;
  font-weight: 800;
  max-width: 900px;
}

.page-lede {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .section-head { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-legal { justify-content: center; text-align: center; }
}
