/* Torre di Babele — archaeo-futurist site styles */

:root {
  --bg: #0d0b09;
  --bg-raised: #15110d;
  --surface: #1a1510;
  --line: #2c251d;
  --line-soft: #211b14;
  --brick: #c96f4a;
  --brick-deep: #a34f30;
  --gold: #d4a95c;
  --ink: #e8e0d4;
  --muted: #938572;
  --faint: #5e5344;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --serif: "Fraunces", "Georgia", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(201, 111, 74, 0.09), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(212, 169, 92, 0.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* masonry texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(232, 224, 212, 0.014) 79px 80px),
    repeating-linear-gradient(90deg, transparent 0 159px, rgba(232, 224, 212, 0.014) 159px 160px);
  z-index: 0;
}

::selection { background: var(--brick); color: #fff8ef; }

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 11, 9, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }

.brand svg { width: 30px; height: 30px; flex: none; }

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.brand-name em { font-style: normal; color: var(--brick); }

.langs { display: flex; gap: 2px; border: 1px solid var(--line); padding: 3px; }

.langs a {
  font-size: 12px;
  padding: 4px 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.15s;
}

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

.langs a[aria-current="true"] { background: var(--brick); color: #fff8ef; }

.nav-link {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--gold); }

/* ---------- hero ---------- */

.hero { padding: 96px 0 72px; position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.hero-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 13ch;
}

.hero h1 .alt {
  display: block;
  font-style: italic;
  color: var(--brick);
  font-size: 0.42em;
  margin-top: 18px;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin-top: 30px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 15.5px;
}

.hero-sub strong { color: var(--ink); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 14px;
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.btn:hover { border-color: var(--brick); transform: translateY(-1px); }

.btn-primary {
  background: var(--brick);
  border-color: var(--brick);
  color: #fff8ef;
}

.btn-primary:hover { background: var(--brick-deep); border-color: var(--brick-deep); }

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

.btn-ghost:hover { background: var(--surface); }

/* tower illustration on the right of hero */
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 40px;
  align-items: center;
}

.hero-tower { display: flex; justify-content: center; }

.hero-tower svg {
  width: min(300px, 100%);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(201, 111, 74, 0.18));
}

.t-layer { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.t-layer:nth-child(1) { animation-delay: 0.15s; }
.t-layer:nth-child(2) { animation-delay: 0.3s; }
.t-layer:nth-child(3) { animation-delay: 0.45s; }
.t-layer:nth-child(4) { animation-delay: 0.6s; }
.t-layer:nth-child(5) { animation-delay: 0.75s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal { animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.32s; }

/* ---------- sections ---------- */

.section { padding: 88px 0; }

.section + .section { border-top: 1px solid var(--line-soft); }

.section-head { margin-bottom: 44px; }

.kicker {
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 14px;
}

.kicker::before {
  content: "§ ";
  color: var(--faint);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-head p { margin-top: 14px; color: var(--muted); max-width: 58ch; }

/* ---------- features ---------- */

.bricks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.brick {
  background: var(--bg);
  padding: 26px 24px 30px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.25s;
  position: relative;
}

.brick:hover { background: var(--surface); }

.brick:hover .brick-icon { color: var(--brick); }

.brick-icon {
  color: var(--faint);
  font-size: 13px;
  transition: color 0.25s;
  letter-spacing: 0.1em;
}

.brick h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18.5px;
  letter-spacing: 0.005em;
}

.brick p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.brick code {
  color: var(--gold);
  font-size: 12.5px;
  background: none;
  padding: 0;
}

/* ---------- plans ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 14px;
}

.plan {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  transition: border-color 0.25s, transform 0.25s;
}

.plan:hover { border-color: var(--brick); transform: translateY(-2px); }

.plan.featured {
  border-color: rgba(201, 111, 74, 0.55);
  background: linear-gradient(180deg, rgba(201, 111, 74, 0.08), var(--bg-raised) 46%);
}

.plan-flag {
  position: absolute;
  top: -11px;
  right: 18px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff8ef;
  background: var(--brick);
  padding: 3px 10px;
}

.plan-tier {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: 0.005em;
}

.plan-price { font-size: 15px; color: var(--gold); }

.plan-price span { color: var(--faint); font-size: 12px; }

.plan-desc { color: var(--muted); font-size: 13.5px; }

.plan ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.plan li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.55;
}

.plan li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brick);
}

.plans-note { margin-top: 30px; color: var(--faint); font-size: 13px; }

.plans-note a { color: var(--gold); border-bottom: 1px solid var(--line); }

/* ---------- report modes ---------- */

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.mode {
  border: 1px solid var(--line);
  padding: 30px 26px;
  background: var(--bg-raised);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s;
}

.mode:hover { border-color: var(--gold); }

.mode::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brick), var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.mode:hover::after { opacity: 1; }

.mode-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brick);
  border: 1px solid rgba(201, 111, 74, 0.4);
  padding: 3px 9px;
  margin-bottom: 16px;
}

.mode h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin-bottom: 8px; }

.mode p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.mode-tier {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- engine strip ---------- */

.engine-note { margin-top: 26px; color: var(--faint); font-size: 13px; max-width: 60ch; }

.engine-note a { color: var(--gold); border-bottom: 1px solid var(--line); }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line-soft); padding: 44px 0 60px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  color: var(--faint);
  font-size: 12.5px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--muted);
}

.foot-brand svg { width: 20px; height: 20px; }

.foot a { color: var(--muted); transition: color 0.15s; }
.foot a:hover { color: var(--gold); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .bricks { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
  .modes { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-tower { display: none; }
}

@media (max-width: 560px) {
  .bricks { grid-template-columns: 1fr; }
  .nav-link.hide-sm { display: none; }
  .hero { padding: 64px 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
