:root { 
      --header-h: 90px;
      --footer-h: 120px;   /* altezza fissa footer */
      --bg-dark: #0e0f11;
      --text-primary: #ffffff;
      --text-secondary: rgba(255,255,255,0.65);
      --border-soft: rgba(255,255,255,0.08);
      --accent: #ce5e72; /* puoi cambiare */

}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #2c2c2c;

  overflow-x: hidden;
  overflow-y: auto;

  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.brand-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}

.lines {
  width: 100%; /* will be set via JS to match logo width */
  display: block;
}

.fitline {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 10px;
  line-height: 1.05;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);

  display: block;
  width: 100%;
  white-space: nowrap;

  font-kerning: none;
}

/* The actual measured/stretchable text lives here */
.fittext {
  display: inline-block;     /* critical: measure intrinsic text width */
  white-space: nowrap;       /* no wrap */
  letter-spacing: 0px;       /* will be set via JS */
}

.fitline:last-child {
  color: rgba(255,255,255,0.75);
}

/* Top header (forced on top) */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #000 !important;
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Centered area under header */
#main {
  position: relative;

  padding-top: var(--header-h);
  height: calc(100vh - var(--header-h));


  display: grid;
  place-items: center;

  /* CHANGED: create stacking context for ripple + content */
  overflow: hidden;
  z-index: 3;
}

/* CHANGED: ripple is now scoped to #main only */
#rippleHost {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;

  /* CHANGED: ensure content stays above ripple */
  z-index: 1;
}

#canvasHost { position: relative; z-index: 1; }
svg { display: block; }

#asonae {
  display: none;
  width: 32%;
  height: auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.top-nav {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}

.pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: lowercase;

  padding: 8px 16px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}

.pill:hover {
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: white;
}

#footer {
  height: var(--footer-h);
  background: #000;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.08);

  display: flex;
  align-items: center;
  padding: 0 40px 0 4px;
  box-sizing: border-box;
}

.footer-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}
.footer-brand img {
  height: calc(var(--footer-h) * 0.9);
  width: auto;
  display: block;
 
}

/* Left */
.footer-left {
  justify-self: auto;
}

/* Center */
.footer-center {
  text-align: left;
}

.footer-tagline {
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.footer-center p {
  font-size: 13px;
  opacity: 0.7;
  margin: 0;
  line-height: 1.4;
}

/* Right */
.footer-right {
  text-align: right;
}

.footer-right a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-copy {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 6px;
}


/* ---------------------------
   Mobile footer fixes
   --------------------------- */

/* Use modern viewport units on mobile to avoid 100vh jumps (address bar show/hide) */
#main{
  min-height: calc(100svh - var(--header-h));
  height: auto;
}

/* Responsive footer: stack + reduce padding/logo, hide center text on phones */
@media (max-width: 700px) {
  #footer{
    height: auto;                 /* remove fixed height */
    padding: 14px 16px;           /* less horizontal padding */
    align-items: stretch;
  }

  .footer-inner{
    grid-template-columns: 1fr;   /* stack */
    gap: 10px;
    align-items: start;
  }

  .footer-brand img{
    height: 56px;                 /* smaller logo on phones */
  }

  /* Hide the center block on phones (as requested) */
  .footer-center{
    display: none;
  }

  .footer-right{
    text-align: left;
  }
}

/* Small tablets: keep 3 columns but give the center more room + reduce padding/logo */
@media (min-width: 701px) and (max-width: 980px){
  #footer{
    padding: 0 16px 0 8px;
  }
  .footer-inner{
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 12px;
  }
  .footer-brand img{
    height: 84px;
  }
}


/* ---------------------------
   iOS / mobile header spacing fixes
   --------------------------- */

/* Give the brand and pills some breathing room, and prevent nav from shrinking */
#topbar{
  gap: 16px;
}
.brand-block{
  min-width: 0;
}
.top-nav{
  flex-shrink: 0;
}

/* Phones: reduce pill size and add safe-area padding (iOS notch) */
@media (max-width: 520px){
  #topbar{
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
  }

  .top-nav{
    gap: 10px;
  }

  .pill{
    font-size: 13px;
    padding: 7px 12px;
  }

  /* Keep the claim from stealing horizontal space */
  .lines{
    max-width: 220px;
  }
}

/* Very small widths: allow wrapping so nav doesn't collide with the brand */
@media (max-width: 390px){
  #topbar{
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .top-nav{
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    margin-top: 10px;
  }

  /* Match main padding to the now-taller header */
  #main{
    padding-top: 140px;
  }
}

#about{
  scroll-margin-top: 110px;
}

/* About section */

/* About section */

.about-section{
  padding: 140px 20px;
  display: flex;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--text-primary);
  border-top: 1px solid var(--border-soft);
}

.about-inner{
  max-width: 820px;
}

.about-section h2{
  font-size: 30px;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.about-section p{
  line-height: 1.75;
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

/* Highlight words if needed */
.about-section strong{
  color: var(--accent);
  font-weight: 600;
}

/* Smooth scroll */
html{
  scroll-behavior: smooth;
}

#about{
  scroll-margin-top: 110px;
}
.workspace{
  margin: 160px auto;
  max-width: 800px;
}

.workspace img{
  width: 100%;
  display: block;
  filter: grayscale(100%) contrast(92%);
}

/* Offset specifico per #about (in caso serva più controllo) */
#about{
  scroll-margin-top: 90px;
}
