/* ============================================================
   accadradinuovo.com — site stylesheet
   Coerente con la palette dei Lab (dark editoriale).
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --bg-2:      #0f0f17;
  --panel:    #14141e;
  --panel-2:  #1b1b27;
  --line:     #2a2a38;
  --text:     #e6e6f0;
  --text-dim: #9a9ab0;
  --muted:    #6b6b80;
  --accent:    #c9a55e;     /* oro/ottone — pietra antica al sole */
  --accent-2: #e6c887;
  --accent-dim:#7a6739;
  --danger:   #d96b6b;
  --ok:       #6bd99c;
  --maxw: 1140px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 14px 40px -18px rgba(0,0,0,.7);
  --shadow-hover: 0 22px 60px -22px rgba(201,165,94,.35), 0 14px 40px -18px rgba(0,0,0,.7);
  --t: 240ms cubic-bezier(.2,.7,.3,1);
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset --------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-2); }
::selection { background: var(--accent); color: #000; }

/* Tipografia --------------------------------------------- */
h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; letter-spacing: .03em; }
p  { margin: 0 0 1em; color: var(--text); }
.lead { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.55; color: var(--text-dim); }
small, .small { font-size: .85rem; color: var(--text-dim); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}
blockquote {
  margin: 1.5rem 0;
  padding: .8rem 1.2rem;
  border-left: 2px solid var(--accent-dim);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-dim);
}

/* Layout ------------------------------------------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 3rem 0; }
section.tight { padding: 2rem 0; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 2rem 0; border: 0; }

/* Header / Nav ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,15,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: var(--maxw); margin: 0 auto;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display); font-size: 1.05rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
}
.brand:hover { color: var(--accent-2); }
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex; align-items: center; gap: 1.6rem;
  list-style: none; margin: 0 0 0 auto; padding: 0;
}
.nav-social { display: flex; align-items: center; gap: .5rem; }
.nav-social a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: .38rem;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.nav-social a:hover { color: var(--accent-2); border-color: var(--accent); background: var(--panel-2); transform: translateY(-1px); }
.nav-social svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.nav-links a {
  color: var(--text-dim);
  font-size: .92rem; letter-spacing: .08em; text-transform: uppercase;
  position: relative; padding: .25rem 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
}
.lang-switch {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .15rem;
  background: var(--panel);
}
.lang-switch a {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .12em;
  color: var(--text-dim);
  border-radius: 999px;
}
.lang-switch a.active {
  background: var(--accent);
  color: #0a0a0f;
}
.lang-switch a:hover:not(.active) { color: var(--text); }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  color: var(--text); padding: .4rem .7rem; border-radius: var(--radius);
  font: inherit; cursor: pointer;
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; align-items: center; margin-left: auto; }
  .nav-social { order: 3; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav-links a { padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .site-header.menu-open .nav-links {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
}

@media (max-width: 480px) {
  .nav { padding: .7rem .85rem; gap: .4rem; }
  .brand { font-size: .74rem; letter-spacing: .04em; }
  .nav-social { gap: .3rem; }
  .nav-social a { padding: .3rem; }
  .nav-social svg { width: 15px; height: 15px; }
  .menu-toggle { padding: .35rem .5rem; }
}

/* Hero --------------------------------------------------- */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 0%, rgba(201,165,94,.07), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(120,80,40,.05), transparent 50%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* Hero decorative background: wireframe pyramids + resonance waves --- */
.hero-deco {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 65% 78% at 50% 58%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 65% 78% at 50% 58%, black 25%, transparent 78%);
}
.hero-deco svg { width: 100%; height: 100%; display: block; }
.hero-deco .pyr {
  fill: none; stroke: var(--accent); stroke-width: 1;
  opacity: .22;
  vector-effect: non-scaling-stroke;
}
.hero-deco .pyr--big { opacity: .28; stroke-width: 1.2; }
.hero-deco .ridge {
  stroke: var(--accent); stroke-width: .8; opacity: .16;
  vector-effect: non-scaling-stroke;
}
.hero-deco .wave {
  fill: none; stroke: var(--accent); stroke-width: 1; opacity: .32;
  vector-effect: non-scaling-stroke;
}
.hero-deco .wave--soft { opacity: .22; stroke-width: .8; }

.hero-deco .wave-group.w1 { animation: heroWaveA 14s linear infinite; }
.hero-deco .wave-group.w2 { animation: heroWaveB 22s linear infinite reverse; }
.hero-deco .pyr-group     { animation: heroPyrPulse 7s ease-in-out infinite; }
.hero-deco .pyr-group.p2  { animation-delay: -2.5s; }
.hero-deco .pyr-group.p3  { animation-delay: -5s; }

@keyframes heroWaveA { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes heroWaveB { from { transform: translateX(0); } to { transform: translateX(-160px); } }
@keyframes heroPyrPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
@media (max-width: 700px) {
  .hero-deco .wave-group,
  .hero-deco .pyr-group { animation: none !important; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .6rem;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .hero h1 { white-space: normal; font-size: clamp(1.7rem, 7.5vw, 2.4rem); }
}
.hero .accent-line {
  display: block; width: 60px; height: 1px;
  background: var(--accent);
  margin: 1.4rem auto;
}
.hero .lead { max-width: 640px; margin: 0 auto 2rem; }

/* Buttons ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem;
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent); color: #0a0a0f;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(201,165,94,.4);
}
.btn.btn-primary { background: var(--accent); color: #0a0a0f; }
.btn.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.btn-ghost { border-color: var(--line); color: var(--text-dim); }
.btn.btn-ghost:hover { border-color: var(--accent); background: transparent; color: var(--accent); }
.btn.small { padding: .55rem 1.05rem; font-size: .75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* Books grid --------------------------------------------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
@media (max-width: 880px) { .books-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; } }

.book {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex; flex-direction: column;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  position: relative;
  overflow: hidden;
}
.book:hover { transform: translateY(-6px); border-color: var(--accent-dim); box-shadow: var(--shadow-hover); }
.book .cover {
  aspect-ratio: 2/3;
  background: #000;
  border-radius: 2px;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.book .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.7,.3,1); }
.book:hover .cover img { transform: scale(1.04); }
.book .vol {
  font-family: var(--font-body); font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .3rem;
}
.book h3 {
  font-family: var(--font-display); font-size: 1.35rem; margin-bottom: .35rem; letter-spacing: .03em;
}
.book .subtitle {
  font-family: var(--font-serif); font-style: italic; color: var(--text-dim);
  font-size: .95rem; line-height: 1.4; margin-bottom: 1rem;
}
.book .status {
  display: inline-block;
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  padding: .25rem .55rem;
  border: 1px solid var(--accent-dim); color: var(--accent);
  border-radius: 2px; margin-bottom: .8rem;
}
.book .status.coming { border-color: var(--line); color: var(--text-dim); }
.book .actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* Featured book (libri.html, full detail) ---------------- */
.book-feature {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}
.book-feature:last-child { border-bottom: 0; }
.book-feature .cover-wrap {
  position: sticky; top: 100px;
}
.book-feature .cover-wrap img {
  width: 100%; border-radius: 2px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.book-feature h2 { font-size: 2rem; margin-bottom: .2rem; }
.book-feature .subtitle { font-family: var(--font-serif); font-style: italic; color: var(--text-dim); font-size: 1.15rem; margin-bottom: 1.8rem; }
.book-feature .meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: .85rem;
}
.book-feature .meta dt { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.book-feature .meta dd { margin: 0; color: var(--text); font-weight: 500; }
@media (max-width: 760px) {
  .book-feature { grid-template-columns: 1fr; gap: 1.5rem; }
  .book-feature .cover-wrap { position: static; max-width: 280px; margin: 0 auto; }
}

/* Lab grid ------------------------------------------------ */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.lab-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  position: relative;
}
.lab-card.live:hover { transform: translateY(-4px); border-color: var(--accent-dim); box-shadow: var(--shadow-hover); }
.lab-card.soon { opacity: .55; cursor: default; }
.lab-card .tag {
  display: inline-block; font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.lab-card.soon .tag { color: var(--text-dim); }
.lab-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .4rem; }
.lab-card p { font-size: .9rem; color: var(--text-dim); margin-bottom: 1rem; }
.lab-card .ref {
  margin-top: auto;
  font-size: .75rem; color: var(--muted); letter-spacing: .04em;
}
.lab-card .arrow {
  position: absolute; top: 1.2rem; right: 1.2rem;
  color: var(--accent); font-size: 1.2rem; opacity: 0; transition: opacity var(--t), transform var(--t);
}
.lab-card.live:hover .arrow { opacity: 1; transform: translate(4px,-4px); }

/* Author / bio ------------------------------------------- */
.author-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 760px) { .author-grid { grid-template-columns: 1fr; } }
.author-portrait {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
  box-shadow: var(--shadow);
}
.author-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.92) contrast(1.02);
}
.author-portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(10,10,15,.35) 100%);
}

/* Contact ------------------------------------------------- */
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 2rem auto 0;
}
.contact-card a.email {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .05em;
  color: var(--accent);
  display: inline-block;
  margin: 1rem 0;
}

/* Quote panel -------------------------------------------- */
.quote-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem 2.4rem;
  margin: 3rem auto;
  max-width: 760px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.quote-panel cite { display: block; margin-top: 1rem; font-style: normal; font-size: .85rem; letter-spacing: .1em; color: var(--accent); }

/* Footer ------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 3rem 1.25rem 1.5rem;
  color: var(--text-dim);
  font-size: .88rem;
}
.footer-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: var(--font-display); font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--accent); }

/* Social (Facebook & affini nel footer) ------------------ */
.social-list { display: flex; flex-direction: column; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.site-footer .social-list { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.social-list a.social-link {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text);
  text-decoration: none;
  font-size: .9rem; font-weight: 500;
  padding: .55rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.social-list a.social-link svg {
  width: 18px; height: 18px;
  fill: currentColor;
  transition: fill .15s ease, transform .15s ease;
}
.social-list a.social-link:hover { color: var(--accent-2); background: var(--panel-2); border-color: var(--accent); transform: translateY(-2px); }
.social-list a.social-link:hover svg { transform: translateY(-1px); }
.social-list .social-note {
  font-size: .78rem; color: var(--muted); margin-top: .3rem; line-height: 1.45;
}
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  font-size: .8rem; color: var(--muted);
}

/* Hero with 3D orb as background (home only) -------------- */
.hero--orb {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
  min-height: 520px;
}
#hero-orb-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  will-change: opacity;
}
#hero-orb-canvas canvas { display: block; width: 100% !important; height: 100% !important; }

/* Vignette behind the text so the wireframe doesn't fight the type */
.hero--orb::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 55% at 50% 48%, rgba(10,10,15,0.60) 0%, rgba(10,10,15,0.30) 40%, transparent 75%);
  pointer-events: none;
  z-index: 1;
}
.hero--orb .hero-inner {
  position: relative; z-index: 2;
}
.hero--orb h1 { text-shadow: 0 2px 24px rgba(0,0,0,0.55); }
.hero--orb .lead { text-shadow: 0 1px 12px rgba(0,0,0,0.7); }

/* HUD tags at the four corners of the hero section */
.orb-hud {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
}
.orb-hud .hud-tag {
  position: absolute;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid rgba(201, 165, 94, 0.28);
  border-radius: 2px;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: hudFadeIn 1.2s ease-out backwards;
}
.orb-hud .hud-tag.tl { top: 1.5rem; left: 1.5rem;  animation-delay: 0.4s; }
.orb-hud .hud-tag.tr { top: 1.5rem; right: 1.5rem; animation-delay: 0.6s; }
.orb-hud .hud-tag.br { bottom: 1.5rem; right: 1.5rem; animation-delay: 0.8s; }
.orb-hud .hud-tag.bl { bottom: 1.5rem; left: 1.5rem;  animation-delay: 1.0s; }
.orb-hud .hud-tag .dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  margin-right: 0.45rem; vertical-align: 1px;
  animation: hudPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(201,165,94,0.6);
}
@keyframes hudPulse {
  0%, 100% { opacity: 0.4; transform: scale(1);    box-shadow: 0 0 0 0    rgba(201,165,94,0.6); }
  50%      { opacity: 1;   transform: scale(1.3);  box-shadow: 0 0 0 6px  rgba(201,165,94,0); }
}
@keyframes hudFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Static fallback: shown only on very small viewports */
.orb-fallback {
  display: none;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 320px; height: 320px;
  border: 1px solid rgba(201,165,94,0.30);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
.orb-fallback::before, .orb-fallback::after {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px solid rgba(201,165,94,0.20);
}
.orb-fallback::before { transform: rotate3d(1,0,0,72deg); }
.orb-fallback::after  { transform: rotate3d(0,1,0,72deg); }

@media (max-width: 700px) {
  #hero-orb-canvas { display: none; }
  .orb-fallback { display: block; }
  .orb-hud .hud-tag { font-size: 0.6rem; padding: 0.22rem 0.5rem; }
  .orb-hud .hud-tag.tl { left: 0.8rem; top: 0.8rem; }
  .orb-hud .hud-tag.tr { right: 0.8rem; top: 0.8rem; }
  .orb-hud .hud-tag.bl { left: 0.8rem; bottom: 0.8rem; }
  .orb-hud .hud-tag.br { right: 0.8rem; bottom: 0.8rem; }
}

/* Hide JS-controlled elements until JS runs to prevent flash */
[data-jshide] { visibility: hidden; }

/* Accessibility ----------------------------------------- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Mobile polish ------------------------------------------ */
.menu-toggle { min-height: 44px; min-width: 44px; }
.contact-card a.email {
  word-break: break-word;
  font-size: clamp(0.95rem, 4vw, 1.4rem);
}
.orb-fallback { border-color: rgba(201, 165, 94, 0.45); }
.orb-fallback::before,
.orb-fallback::after { border-color: rgba(201, 165, 94, 0.30); }
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Consent and privacy ------------------------------------- */
.consent-banner {
  position: fixed;
  z-index: 1000;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.2rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .7);
}
.consent-copy h2 {
  margin: 0 0 .35rem;
  font: 500 1rem/1.2 var(--font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.consent-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.5;
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  flex-shrink: 0;
}
.consent-settings {
  position: fixed;
  z-index: 900;
  left: 1rem;
  bottom: 1rem;
  padding: .45rem .7rem;
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 500 .72rem/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.consent-settings:hover { color: var(--accent); border-color: var(--accent-dim); }
.legal {
  max-width: 820px;
}
.legal h2 { margin: 2.5rem 0 .7rem; }
.legal h3 { margin: 1.5rem 0 .45rem; font-size: 1.1rem; }
.legal li, .legal p { color: var(--text-dim); }
.legal table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: .92rem;
}
.legal th, .legal td {
  padding: .75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal th { color: var(--accent); font-weight: 500; }
@media (max-width: 640px) {
  .consent-banner {
    display: block;
    right: .8rem;
    bottom: .8rem;
    left: .8rem;
    padding: 1rem;
  }
  .consent-actions { margin-top: .9rem; }
  .consent-actions .btn { flex: 1; justify-content: center; }
  .legal table { display: block; overflow-x: auto; }
}
