/* =========================================================
   Aevenor — splash v2
   Direzione: Swiss medtech / clinical sub-brand di HTX.
   Sans-serif Helvetica · dark mode · petrol teal accent.
   ========================================================= */

:root {
  --ink:       #0E0E0E;
  --surface:   #131313;
  --paper:     #F4F4F2;
  --paper-dim: #9A9A9A;
  --paper-mute:#7A7A7A;
  --teal:      #4DA8B5;
  --teal-deep: #1F6E7A;
  --rule:      rgba(244, 244, 242, 0.10);
  --rule-2:    rgba(244, 244, 242, 0.05);

  --ff-sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --tracking-caps: 0.18em;
  --tracking-wide: 0.32em;
  --tracking-mono: 0.10em;

  --pad-x: clamp(20px, 4vw, 64px);
  --max:   1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--teal); color: var(--ink); }
a { color: inherit; text-decoration: none; }

.hl { color: var(--teal); font-weight: 500; }

/* Ambient gradient pulse */
.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 800px 600px at 50% 0%, rgba(31, 110, 122, 0.12), transparent 70%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(31, 110, 122, 0.06), transparent 70%);
  animation: ambient-shift 16s ease-in-out infinite alternate;
}
@keyframes ambient-shift {
  0%   { opacity: 0.85; transform: translateY(0); }
  100% { opacity: 1;    transform: translateY(8px); }
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px var(--pad-x);
  background: rgba(14, 14, 14, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--paper-dim);
}

.brandmark {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--paper);
}
.brandmark__a { width: 22px; height: 22px; color: var(--teal); }
.brandmark__a line { transition: stroke 0.3s ease; }
.brandmark__word {
  font-size: 13px;
  letter-spacing: 0.32em;
  font-weight: 500;
  margin-right: -0.32em;
  color: var(--paper);
}
.brandmark:hover .brandmark__a { color: var(--paper); }

.topbar__nav { display: flex; gap: 28px; justify-content: flex-end; }
.topbar__link {
  position: relative;
  color: var(--paper-dim);
  font-weight: 500;
  display: inline-flex; align-items: baseline; gap: 6px;
  transition: color 0.25s ease;
}
.topbar__link:hover { color: var(--paper); }
.topbar__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.topbar__link:hover::after { transform: scaleX(1); }
.topbar__num { color: var(--teal); font-size: 9px; }

.topbar__right {
  display: flex; align-items: center; gap: 18px; justify-content: flex-end;
}
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); }
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(77, 168, 181, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(77, 168, 181, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(77, 168, 181, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 168, 181, 0); }
}

@media (max-width: 700px) {
  .topbar__nav { gap: 18px; font-size: 10px; }
}
@media (max-width: 540px) {
  .topbar__nav .topbar__num { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  padding: 84px var(--pad-x) 40px;
  display: flex; flex-direction: column;
  isolation: isolate;
}

.hero__main {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(40px, 8vw, 80px) 0;
  position: relative;
}

/* Geometric A monogram — proporzioni dal logo concept (crossbar protrude a destra) */
.mark {
  width: clamp(160px, 26vw, 300px);
  color: var(--teal);
}
.mark svg { width: 100%; height: auto; display: block; overflow: visible; }
.mark__line {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: mark-draw 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.mark__line--1 { animation-delay: 0.2s; }
.mark__line--2 { animation-delay: 0.45s; }
.mark__line--3 { animation-delay: 0.75s; stroke-dasharray: 280; stroke-dashoffset: 280; }
@keyframes mark-draw {
  to { stroke-dashoffset: 0; }
}

.hero__wordmark {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 110px);
  line-height: 1;
  letter-spacing: var(--tracking-wide);
  margin-right: calc(-1 * var(--tracking-wide));
  color: var(--paper);
  opacity: 0;
  animation: word-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) 1s forwards;
}
@keyframes word-in {
  from { opacity: 0; letter-spacing: 0.5em; filter: blur(4px); }
  to   { opacity: 1; letter-spacing: var(--tracking-wide); filter: blur(0); }
}

.hero__claim {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: var(--tracking-caps);
  color: var(--teal);
  text-transform: uppercase;
  opacity: 0;
  animation: word-in 1s ease 1.6s forwards;
  text-align: center;
}

.vital {
  width: 100%;
  height: 60px;
  color: var(--teal);
  opacity: 0.7;
  margin-bottom: clamp(40px, 5vw, 60px);
  position: relative;
}
.vital::before, .vital::after {
  content: "";
  position: absolute; top: 50%;
  width: 8px; height: 8px;
  background: var(--teal);
  transform: translateY(-50%);
}
.vital::before { left: 0; }
.vital::after  { right: 0; }
.vital svg { width: 100%; height: 100%; display: block; }
.vital__path {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: vital-draw 5s cubic-bezier(0.4, 0, 0.2, 1) 1.4s forwards,
             vital-flicker 4s ease-in-out 6s infinite;
}
@keyframes vital-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes vital-flicker {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* =========================================================
   SECTION SHELL
   ========================================================= */
.section {
  position: relative; z-index: 1;
  padding: clamp(96px, 12vw, 180px) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.section.is-in { opacity: 1; transform: translateY(0); }

.section__head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: clamp(40px, 6vw, 64px);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--paper-dim);
}
.section__num { color: var(--teal); font-weight: 500; }
.section__kicker { color: var(--paper); }
.section__divider {
  flex: 1; max-width: 80px;
  height: 1px; background: var(--teal-deep);
}

.section__title {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 1000px;
  color: var(--paper);
}

/* =========================================================
   MANIFESTO
   ========================================================= */
.manifesto {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .manifesto { grid-template-columns: 1fr; } }
.manifesto__lead {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.manifesto__body {
  display: flex; flex-direction: column; gap: 18px;
  font-size: 15px; line-height: 1.7;
  color: var(--paper-dim);
  max-width: 56ch;
  padding-top: 8px;
}

/* =========================================================
   AMBITO / DOMAINS
   ========================================================= */
.domains {
  list-style: none;
  margin-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--rule);
}
.domain {
  display: grid;
  grid-template-columns: 60px 1fr 1.4fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 2.6vw, 32px) 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.domain.is-in { opacity: 1; transform: translateY(0); }
.domain::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--teal);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s ease;
}
.domain:hover::before { transform: scaleY(1); }
.domain:hover .domain__name { color: var(--teal); }

.domain__num {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-mono);
  color: var(--teal);
}
.domain__name {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  transition: color 0.3s ease;
}
.domain__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--paper-dim);
  max-width: 56ch;
}
@media (max-width: 800px) {
  .domain { grid-template-columns: 40px 1fr; }
  .domain__desc { grid-column: 2; }
}

/* =========================================================
   STATUTO
   ========================================================= */
.statuto {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 56px);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.statuto::before, .statuto::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--teal);
}
.statuto::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.statuto::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.statuto__quote {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--paper);
  display: flex; flex-direction: column; gap: 18px;
  font-weight: 400;
}
.statuto__quote p { text-wrap: pretty; }
.statuto__cap {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--paper-mute);
}

/* =========================================================
   CONTATTI
   ========================================================= */
.contatti {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) { .contatti { grid-template-columns: 1fr; } }
.contatti__line {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--paper);
  max-width: 38ch;
  margin-bottom: 32px;
}
.contatti__email {
  display: inline-flex; align-items: baseline; gap: 14px;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 52px);
  letter-spacing: -0.02em;
  color: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contatti__email:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.contatti__arrow {
  color: var(--teal);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.contatti__email:hover .contatti__arrow { transform: translateX(8px); }

/* contatti right column: HTX group block */
.contatti__group {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--rule);
  background: rgba(244, 244, 242, 0.015);
  position: relative;
}
.contatti__group::before, .contatti__group::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--teal);
}
.contatti__group::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.contatti__group::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.contatti__group-logo {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin: 6px 0;
  color: var(--paper);
  transition: color 0.3s ease;
}
.contatti__group-logo:hover { color: var(--teal); }
.contatti__group-glyph {
  display: inline-flex;
  width: clamp(50px, 5vw, 64px);
  color: currentColor;
}
.contatti__group-glyph svg { width: 100%; height: auto; display: block; }
.contatti__group-words {
  display: inline-flex; flex-direction: column; gap: 2px;
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-align: left;
}
.contatti__group-words span { display: block; }

.contatti__group-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  align-self: stretch;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--paper-mute);
  line-height: 1.6;
}
.contatti__group-note-sep {
  color: var(--teal-deep);
  margin: 0 4px;
}
.contatti__group-note-art {
  font-size: 9px;
  color: var(--paper-mute);
  opacity: 0.8;
  text-transform: none;
  letter-spacing: 0.04em;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 28px var(--pad-x) 36px;
  border-top: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--paper-mute);
}
.footer__top {
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: var(--tracking-caps);
}
.footer__brand svg { width: 18px; height: 18px; color: var(--teal); }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mark__line, .vital__path { stroke-dashoffset: 0 !important; }
  .hero__wordmark, .hero__claim, .section, .domain {
    opacity: 1 !important; transform: none !important;
  }
}
