/* rubyno.com — foglio di stile unico per tutte le pagine */
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #0e0e12;
  --card: #16161c;
  --ink: #f3f2ee;
  --muted: #a4a2ab;
  --line: #2a2a33;
  --ruby: #e0315a;
  --radius: 22px;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 520px at 85% -8%, rgba(224,49,90,.20), transparent 60%),
    radial-gradient(800px 600px at 5% 10%, rgba(110,140,255,.13), transparent 60%);
  background-repeat: no-repeat;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ruby); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* Header */
.top { padding: 22px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 20px; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: auto; color: var(--ink); }
.lang { display: flex; gap: 4px; font-size: 14px; font-weight: 600; }
.lang a { text-decoration: none; padding: 6px 10px; border-radius: 999px; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.lang a:hover:not([aria-current="true"]) { color: var(--ink); }

/* Hero */
.hero { position: relative; padding: 56px 0 40px; }
.hero .wrap { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ruby); }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 640; margin: 0; max-width: 15ch; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 22px 0 0; }
.hero-mark { position: absolute; right: 24px; top: -8px; width: clamp(140px, 22vw, 260px); opacity: 0.09; pointer-events: none; }

/* Prodotti */
.products { padding: 24px 0 72px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.door {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; min-height: 340px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.door:hover { transform: translateY(-3px); border-color: #45434f; box-shadow: 0 24px 60px -30px rgba(224,49,90,.45); }
.door .for { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.door h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0; font-weight: 650; }
.door p.desc { margin: 0; color: var(--muted); max-width: 38ch; }
.door .actions { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.go {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px;
  padding: 13px 20px; border-radius: 999px;
}
.go::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.go svg { width: 16px; height: 16px; transition: transform .2s ease; }
.door:hover .go svg { transform: translateX(3px); }
.sub { position: relative; z-index: 1; font-size: 15px; color: var(--muted); }
.sub a { font-weight: 600; color: var(--ink); text-underline-offset: 3px; }

/* Contatti e FAQ */
.band { border-top: 1px solid var(--line); padding: 64px 0; }
.band h2.title { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; font-weight: 640; }
.band .intro { color: var(--muted); margin: 0 0 32px; max-width: 52ch; }
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: transparent; }
.contact h3 { font-size: 17px; margin: 0 0 4px; letter-spacing: -0.01em; }
.contact p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.contact a { font-weight: 600; text-underline-offset: 3px; word-break: break-word; }

.faq { display: grid; gap: 0; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 70ch; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.foot h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legalline { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.legalline p { margin: 0 0 4px; }

/* Pagine legali e 404 */
.doc { padding: 112px 0 72px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: none; }
.doc .meta { color: var(--muted); margin: 12px 0 28px; }
.doc h2 { font-size: 20px; letter-spacing: -0.01em; margin: 36px 0 8px; }
.doc p, .doc li { color: #d2d0d8; }
.doc ul { padding-left: 20px; }
.summary-en { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 0 0 12px; font-size: 15px; }
.summary-en p { margin: 6px 0 0; }
.back { display: inline-flex; gap: 8px; font-weight: 600; text-decoration: none; margin-top: 28px; }
.notfound { padding: 72px 0 96px; }
.epic .code { font-size: 14px; font-weight: 600; letter-spacing: 0.3em; color: var(--muted); margin: 0 0 12px; animation: rise 1.6s .1s both; }

@media (max-width: 860px) {
  .grid, .contacts, .foot { grid-template-columns: 1fr; }
  .door { min-height: 0; padding: 26px; }
  .hero { padding: 32px 0 28px; }
  .hero-mark { display: none; }
  .band { padding: 48px 0; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.doc p a, .doc li a, .legalline a { color: var(--ink); }
.contact { background: rgba(255,255,255,.02); }

/* ===== Apertura a tutto schermo (stile Apple) ===== */
body { background-image: none; }
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.lang a[aria-current="true"] { background: rgba(255,255,255,.12); color: var(--ink); }
.epic { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 120px 0 110px; isolation: isolate; }
.epic::before {
  content: ""; position: absolute; inset: -25%; z-index: -2;
  background:
    radial-gradient(38% 32% at 32% 42%, rgba(224,49,90,.38), transparent 70%),
    radial-gradient(34% 30% at 68% 52%, rgba(80,112,255,.32), transparent 70%),
    radial-gradient(28% 24% at 50% 78%, rgba(150,80,255,.22), transparent 70%);
  filter: blur(50px);
  animation: aurora 16s ease-in-out infinite alternate;
}
.epic::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 46%, #000 15%, transparent 72%);
          mask-image: radial-gradient(ellipse 55% 50% at 50% 46%, #000 15%, transparent 72%);
}
.epic .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(transparent, var(--paper)); z-index: -1; }
.halo { position: relative; width: clamp(96px, 12vw, 150px); margin: 0 auto 48px; animation: rise 1.6s cubic-bezier(.16,1,.3,1) both; }
.halo::before {
  content: ""; position: absolute; inset: -90%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255,255,255,.30), rgba(224,49,90,.28) 32%, rgba(80,112,255,.12) 50%, transparent 66%);
  filter: blur(28px);
  animation: breathe 6s ease-in-out infinite;
}
.halo img { width: 100%; height: auto; filter: drop-shadow(0 0 28px rgba(255,255,255,.35)); }
.epic h1 {
  font-size: clamp(2.9rem, 8.4vw, 7.2rem); line-height: .98; letter-spacing: -.05em; font-weight: 700; max-width: none; margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 35%, #8e8c98 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 1.6s .15s cubic-bezier(.16,1,.3,1) both;
}
.epic .lead { margin: 30px auto 0; font-size: clamp(1.1rem, 2vw, 1.45rem); max-width: 36ch; color: #b9b7c1; animation: rise 1.6s .3s cubic-bezier(.16,1,.3,1) both; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 42px; animation: rise 1.6s .45s cubic-bezier(.16,1,.3,1) both; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.pill:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); transform: translateY(-2px); }
.pill svg { width: 16px; height: 16px; }
.scroll-cue { position: absolute; bottom: 26px; left: 0; right: 0; margin: 0 auto; width: max-content; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; text-decoration: none; letter-spacing: .08em; animation: rise 1.6s .9s both; }
.scroll-cue i { display: block; width: 1px; height: 38px; background: linear-gradient(var(--muted), transparent); transform-origin: top; animation: drip 2.4s ease-in-out infinite; }

/* Schede prodotto */
.products .section-title { text-align: center; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.04em; line-height: 1.02; margin: 0 0 14px; font-weight: 700; }
.products .section-sub { text-align: center; color: var(--muted); margin: 0 auto 48px; max-width: 44ch; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.door { overflow: hidden; isolation: isolate; min-height: 420px; padding: 40px; }
.door::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9; transition: opacity .4s ease; }
.door.ai::before { background: radial-gradient(70% 60% at 0% 0%, rgba(224,49,90,.22), transparent 70%); }
.door.studio::before { background: radial-gradient(70% 60% at 100% 0%, rgba(80,112,255,.24), transparent 70%); }
.door:hover::before { opacity: 1.4; }
.plogo { height: 44px; display: flex; align-items: center; margin: 0; }
.plogo img { height: 100%; width: auto; }
.wordmark { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.wordmark b { font-weight: 700; color: var(--muted); }

/* Comparsa allo scorrimento (solo browser che la supportano, senza JavaScript) */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
}

@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.98); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes breathe { 0%, 100% { opacity: .65; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes aurora { 0% { transform: translate(-4%, -3%) rotate(0deg) scale(1); } 100% { transform: translate(4%, 3%) rotate(10deg) scale(1.08); } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 860px) {
  .epic { padding: 100px 0 100px; }
  .door { min-height: 0; padding: 30px; }
  .halo { margin-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

h1, h2, .lead, .section-sub { text-wrap: balance; }

/* ===== Tocchi di colore dei due brand (solo dentro le rispettive schede e pulsanti) ===== */
:root {
  --ai-gold: #d9b46a; --ai-gold-2: #f3dca0; --ai-gold-3: #a8823c;
  --st-pink: #e8306e; --st-orange: #ff6b35;
}
.door.ai::before { background: radial-gradient(75% 65% at 0% 0%, rgba(217,180,106,.20), transparent 70%); }
.door.studio::before { background: radial-gradient(75% 65% at 100% 0%, rgba(232,48,110,.24), rgba(255,107,53,.10) 45%, transparent 72%); }
.door.ai:hover { border-color: rgba(217,180,106,.55); box-shadow: 0 24px 60px -30px rgba(217,180,106,.45); }
.door.studio:hover { border-color: rgba(232,48,110,.55); box-shadow: 0 24px 60px -30px rgba(232,48,110,.5); }
.door.ai .for { color: var(--ai-gold); }
.door.studio .for { color: #ff7a9e; }
.door.ai .wordmark b { background: linear-gradient(180deg, var(--ai-gold-2), var(--ai-gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.door.studio .wordmark b { background: linear-gradient(90deg, var(--st-pink), var(--st-orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.door.ai .go { background-color: var(--ai-gold); background-image: linear-gradient(180deg, var(--ai-gold-2), var(--ai-gold) 55%, var(--ai-gold-3)); color: #15110a; }
.door.studio .go { background-color: var(--st-pink); background-image: linear-gradient(90deg, var(--st-pink), var(--st-orange)); color: #fff; }
.door.ai .sub a { text-decoration-color: var(--ai-gold); }
.door.studio .sub a { text-decoration-color: var(--st-pink); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill.ai .dot { background: linear-gradient(180deg, var(--ai-gold-2), var(--ai-gold-3)); box-shadow: 0 0 10px rgba(217,180,106,.7); }
.pill.studio .dot { background: linear-gradient(90deg, var(--st-pink), var(--st-orange)); box-shadow: 0 0 10px rgba(232,48,110,.7); }
.pill.ai:hover { border-color: rgba(217,180,106,.6); }
.pill.studio:hover { border-color: rgba(232,48,110,.6); }
.contact.ai h3 { color: var(--ai-gold); }
.contact.studio h3 { color: #ff7a9e; }
