/* RADICI WEBSITE V2 — Design tokens + shared site styles
   Aligned with app design system (RADICI_DESIGN_SYSTEM v1.0)
   Modern fintech confident — Wise/Monzo energy, Apple whitespace
*/
:root {
  /* Surfaces */
  --rad-cream: #F5F1E8;
  --rad-cream-2: #FAF7F0;
  --rad-cream-3: #EDE6D4;
  --rad-cream-4: #E2D7BE;
  --rad-white: #FFFFFF;

  /* Brand forest */
  --rad-forest-900: #0F2620;
  --rad-forest-800: #1B3A2F;  /* dominant brand */
  --rad-forest-700: #2A4F3E;
  --rad-forest-600: #3E6851;

  /* Germoglio (CTA / sprout green) */
  --rad-germoglio: #7BA882;
  --rad-germoglio-dark: #6F9B78;
  --rad-germoglio-deep: #5E8E68;
  --rad-germoglio-200: #D4E2D6;
  --rad-germoglio-100: #F0F5F2;

  /* Terra (warm accent) */
  --rad-terra: #8B6F47;
  --rad-terra-light: #C9B291;
  --rad-terra-100: #EBDFCB;
  --rad-terra-bg: #F5EFE3;

  /* Ink */
  --rad-ink: #1B3A2F;          /* primary headlines */
  --rad-ink-2: #2B3832;        /* body */
  --rad-ink-3: #5A6B62;        /* secondary */
  --rad-ink-4: #8C9B93;        /* tertiary */
  --rad-line: #C9D2CD;
  --rad-line-soft: rgba(27, 58, 47, 0.08);

  /* Semantic */
  --rad-warning: #C88A3A;
  --rad-danger: #B0493D;

  /* Type — modern editorial. Fraunces (warm humanist serif),
     Inter UI, JetBrains Mono for figures.
     Honors brand: serif for emotional moments, mono for €. */
  --rad-serif: 'Lora', Georgia, 'DM Sans', serif;
  --rad-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rad-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, monospace;

  /* Density (overridden by Tweaks) */
  --rad-section-py: clamp(96px, 12vw, 160px);
  --rad-section-px: clamp(20px, 4vw, 56px);
  --rad-block-gap: clamp(56px, 7vw, 96px);
  --rad-card-pad: 32px;

  /* Radius */
  --rad-r-s: 10px;
  --rad-r: 16px;
  --rad-r-l: 24px;
  --rad-r-xl: 32px;
  --rad-r-2xl: 44px;

  /* Shadow (forest-tinted, soft) */
  --rad-sh-xs: 0 1px 2px rgba(27,58,47,0.04);
  --rad-sh-s: 0 2px 8px rgba(27,58,47,0.06);
  --rad-sh: 0 8px 24px rgba(27,58,47,0.08);
  --rad-sh-l: 0 16px 40px rgba(27,58,47,0.10);
  --rad-sh-hero: 0 32px 80px rgba(27,58,47,0.18);

  /* Motion (Tweaks-controlled) */
  --rad-motion: 1;
}

[data-density="compact"] {
  --rad-section-py: clamp(64px, 8vw, 112px);
  --rad-block-gap: clamp(40px, 5vw, 72px);
  --rad-card-pad: 24px;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--rad-sans);
  background: var(--rad-cream);
  color: var(--rad-ink-2);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ─── TYPE ───────────────────────────────────────────── */
.r-serif {
  font-family: var(--rad-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 36;
}
.r-mono {
  font-family: var(--rad-mono);
  font-feature-settings: 'tnum' 1;
}

.r-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rad-terra);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.r-eyebrow.on-dark { color: var(--rad-germoglio); }
.r-eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.9;
  animation: rPulse 2.4s ease-in-out infinite;
}
@keyframes rPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* Display sizes — Wise-confident scale */
.r-display-xl {
  font-family: var(--rad-serif);
  font-weight: 400;
  font-size: clamp(56px, 8.5vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--rad-forest-800);
}
.r-display-l {
  font-family: var(--rad-serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--rad-forest-800);
}
.r-display-m {
  font-family: var(--rad-serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--rad-forest-800);
}
.r-display-s {
  font-family: var(--rad-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--rad-forest-800);
}
.r-display-xl em, .r-display-l em, .r-display-m em, .r-display-s em {
  font-style: italic;
  color: var(--rad-germoglio-deep);
}

.r-lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--rad-ink-3);
  font-weight: 400;
  max-width: 60ch;
  text-wrap: pretty;
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.r-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s, box-shadow .25s, color .25s;
  white-space: nowrap;
  cursor: pointer;
}
.r-btn-primary {
  background: var(--rad-forest-800);
  color: var(--rad-cream);
}
.r-btn-primary:hover { background: var(--rad-forest-700); transform: translateY(-1px); }
.r-btn-green {
  background: var(--rad-germoglio);
  color: var(--rad-forest-900);
}
.r-btn-green:hover { background: var(--rad-germoglio-dark); transform: translateY(-1px); }
.r-btn-ghost {
  background: transparent;
  color: var(--rad-forest-800);
  padding: 16px 0;
  border-bottom: 1.5px solid currentColor;
  border-radius: 0;
}
.r-btn-ghost:hover { color: var(--rad-germoglio-deep); }
.r-btn-line {
  background: transparent;
  color: var(--rad-forest-800);
  border: 1.5px solid var(--rad-forest-800);
}
.r-btn-line:hover { background: var(--rad-forest-800); color: var(--rad-cream); }
.r-btn-cream {
  background: var(--rad-cream);
  color: var(--rad-forest-800);
}
.r-btn-cream:hover { background: var(--rad-white); transform: translateY(-1px); }

.r-btn .arr {
  display: inline-block;
  transition: transform .25s;
}
.r-btn:hover .arr { transform: translateX(3px); }

/* ─── NAV ────────────────────────────────────────────── */
.r-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 3.5vw, 40px);
  background: rgba(245, 241, 232, 0.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.r-nav.scrolled {
  border-bottom-color: var(--rad-line-soft);
  background: rgba(245, 241, 232, 0.94);
}
.r-nav-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--rad-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--rad-forest-800);
}
.r-nav-logo img { height: 28px; width: auto; }
.r-nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.r-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--rad-ink-2);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.r-nav-links a:hover { background: rgba(27,58,47,0.06); color: var(--rad-forest-800); }
.r-nav-actions { display: flex; align-items: center; gap: 10px; }
.r-lang-btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rad-ink-3);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--rad-line-soft);
  transition: all .2s;
}
.r-lang-btn:hover { color: var(--rad-forest-800); border-color: var(--rad-forest-800); }
.r-nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--rad-forest-800);
  color: var(--rad-cream) !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
.r-nav-cta:hover { background: var(--rad-forest-700) !important; }

.r-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 999px;
  align-items: center; justify-content: center;
  background: rgba(27,58,47,0.06);
}
.r-burger span {
  width: 16px; height: 1.5px; background: var(--rad-forest-800);
  position: relative; border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.r-burger span::before, .r-burger span::after {
  content: ''; position: absolute; left: 0; width: 16px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s;
}
.r-burger span::before { top: -5px; }
.r-burger span::after { top: 5px; }
.r-burger.open span { background: transparent; }
.r-burger.open span::before { transform: translateY(5px) rotate(45deg); }
.r-burger.open span::after { transform: translateY(-5px) rotate(-45deg); }

.r-mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  background: var(--rad-cream);
  display: none; flex-direction: column;
  padding: 96px 28px 32px;
  overflow-y: auto;
}
.r-mobile-menu.open { display: flex; }
.r-mobile-menu a {
  font-family: var(--rad-serif);
  font-size: 36px; font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--rad-forest-800);
  padding: 14px 0;
  border-bottom: 1px solid var(--rad-line-soft);
}
.r-mobile-menu a:last-of-type { border-bottom: none; }
.r-mobile-menu .r-btn { margin-top: 24px; align-self: flex-start; }

@media (max-width: 880px) {
  .r-nav-links { display: none; }
  .r-nav-cta { display: none; }
  .r-lang-btn { display: none; }
  .r-burger { display: flex; }
}

/* ─── SECTIONS / LAYOUT ───────────────────────────────── */
.r-section {
  padding: var(--rad-section-py) var(--rad-section-px);
  position: relative;
}
.r-section.tight { padding-top: calc(var(--rad-section-py) * 0.55); padding-bottom: calc(var(--rad-section-py) * 0.55); }
.r-container { max-width: 1240px; margin: 0 auto; }
.r-narrow { max-width: 920px; margin: 0 auto; }
.r-prose { max-width: 680px; margin: 0 auto; }
.r-bg-cream { background: var(--rad-cream); }
.r-bg-cream-2 { background: var(--rad-cream-2); }
.r-bg-white { background: var(--rad-white); }
.r-bg-tint { background: var(--rad-germoglio-100); }
.r-bg-terra { background: var(--rad-terra-bg); }
.r-bg-forest { background: var(--rad-forest-800); color: var(--rad-cream); }
.r-bg-forest .r-display-xl,
.r-bg-forest .r-display-l,
.r-bg-forest .r-display-m,
.r-bg-forest .r-display-s { color: var(--rad-cream); }
.r-bg-forest .r-display-xl em,
.r-bg-forest .r-display-l em,
.r-bg-forest .r-display-m em,
.r-bg-forest .r-display-s em { color: var(--rad-germoglio); }
.r-bg-forest .r-lede { color: rgba(245, 241, 232, 0.62); }

/* ─── CARDS ───────────────────────────────────────────── */
.r-card {
  background: var(--rad-white);
  border-radius: var(--rad-r-l);
  padding: var(--rad-card-pad);
  box-shadow: var(--rad-sh-xs);
  transition: transform .35s, box-shadow .35s;
}
.r-card-tint {
  background: var(--rad-germoglio-100);
  border-radius: var(--rad-r-l);
  padding: var(--rad-card-pad);
}
.r-card-dark {
  background: var(--rad-forest-800);
  color: var(--rad-cream);
  border-radius: var(--rad-r-l);
  padding: var(--rad-card-pad);
}
.r-card-line {
  background: transparent;
  border: 1px solid var(--rad-line-soft);
  border-radius: var(--rad-r-l);
  padding: var(--rad-card-pad);
}

/* Big stat */
.r-stat-big { font-family: var(--rad-serif); font-weight: 400; font-size: clamp(56px, 6vw, 96px); line-height: 1; letter-spacing: -0.04em; color: var(--rad-forest-800); }
.r-stat-big em { font-style: italic; color: var(--rad-germoglio-deep); }
.r-bg-forest .r-stat-big { color: var(--rad-cream); }
.r-bg-forest .r-stat-big em { color: var(--rad-germoglio); }

/* Marquee */
.r-marquee {
  width: 100%; overflow: hidden;
  border-block: 1px solid var(--rad-line-soft);
  padding: 22px 0;
  background: var(--rad-cream-2);
}
.r-marquee-track {
  display: flex; gap: 56px;
  width: max-content;
  animation: marquee 60s linear infinite;
  animation-play-state: var(--marquee-state, running);
}
.r-marquee:hover .r-marquee-track { animation-play-state: paused; }
.r-marquee-item {
  font-family: var(--rad-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--rad-forest-800);
  letter-spacing: -0.015em;
  display: inline-flex; align-items: center; gap: 56px;
  white-space: nowrap;
}
.r-marquee-item::after {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rad-germoglio);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Bento grid */
.r-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.r-bento > * { min-width: 0; }
.r-bento .span-3 { grid-column: span 3; }
.r-bento .span-4 { grid-column: span 4; }
.r-bento .span-2 { grid-column: span 2; }
.r-bento .span-6 { grid-column: span 6; }
@media (max-width: 880px) {
  .r-bento { grid-template-columns: 1fr; }
  .r-bento .span-3, .r-bento .span-4, .r-bento .span-2, .r-bento .span-6 { grid-column: span 1; }
}

/* ─── FOOTER ──────────────────────────────────────────── */
.r-footer {
  background: var(--rad-forest-900);
  color: var(--rad-cream);
  padding: 96px var(--rad-section-px) 36px;
}
.r-footer-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 80px;
}
.r-footer-grid h4 {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245, 241, 232, 0.4);
  margin: 0 0 18px;
}
.r-footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.r-footer-grid a {
  font-size: 14px; color: rgba(245, 241, 232, 0.65);
  transition: color .2s;
}
.r-footer-grid a:hover { color: var(--rad-cream); }
.r-footer-brand {
  display: flex; flex-direction: column; gap: 16px;
}
.r-footer-brand .lockup {
  font-family: var(--rad-serif);
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--rad-cream);
  display: inline-flex; align-items: center; gap: 8px;
}
.r-footer-brand p {
  font-size: 14px; color: rgba(245, 241, 232, 0.5);
  max-width: 32ch; line-height: 1.6;
  margin: 0;
}
.r-footer-bottom {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(245, 241, 232, 0.08);
  font-size: 12px; color: rgba(245, 241, 232, 0.35);
  flex-wrap: wrap;
}
@media (max-width: 880px) {
  .r-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 56px; }
}
@media (max-width: 560px) {
  .r-footer-grid { grid-template-columns: 1fr; }
}

/* ─── HELPERS ─────────────────────────────────────────── */
.r-divider { height: 1px; background: var(--rad-line-soft); border: 0; }
.r-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--rad-germoglio-100);
  color: var(--rad-forest-800);
  font-size: 13px; font-weight: 500;
}
.r-pill-line {
  background: transparent;
  border: 1px solid var(--rad-line-soft);
  color: var(--rad-ink-2);
}
.r-pill-cream {
  background: rgba(245, 241, 232, 0.1);
  color: var(--rad-cream);
  border: 1px solid rgba(245, 241, 232, 0.18);
}

.r-fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity calc(0.7s * var(--rad-motion)) ease,
              transform calc(0.7s * var(--rad-motion)) ease;
}
.r-fade-up.visible { opacity: 1; transform: translateY(0); }

[data-motion="off"] .r-fade-up { opacity: 1; transform: none; transition: none; }
[data-motion="off"] .r-marquee-track { animation: none; }
[data-motion="off"] * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
[data-motion="low"] { --rad-motion: 0.4; }

/* Subtle paper grain on cream surfaces */
.r-grain {
  position: relative;
}
.r-grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMjAwIDIwMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC44NScgbnVtT2N0YXZlcz0nMicgc3RpdGNoVGlsZXM9J3N0aXRjaCcvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCUyM24pJy8+PC9zdmc+");
  mix-blend-mode: multiply;
}

/* Skip helpers from old site */
.fade-up { opacity: 0; transform: translateY(20px); transition: all .6s ease; }
.fade-up.visible { opacity: 1; transform: none; }
