:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0d1b2d;
  --surface-2: #12243a;
  --ink: #f5f8fc;
  --muted: #aab8ca;
  --line: rgba(255, 255, 255, .1);
  --cyan: #58e1db;
  --gold: #ffd166;
  --radius: 26px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 28%, rgba(88, 225, 219, .17), transparent 24%),
    radial-gradient(circle at 68% 62%, rgba(255, 209, 102, .1), transparent 28%),
    linear-gradient(145deg, #07111f 12%, #0c2034 65%, #07111f);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.55) .7px, transparent .7px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.nav, .hero-content, .section, footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

/* Il marchio e' una scatola vera: cubo isometrico ciano col punto oro dentro
   (l'idea nella scatola), e la g torna una lettera del wordmark, in ciano,
   attaccata a "Box" — e' una parola sola. Il respiro sta solo dopo il cubo. */
.brand-mark {
  width: 27px;
  height: 27px;
  margin-right: 9px;
  color: var(--cyan);
  filter: drop-shadow(0 0 10px rgba(88,225,219,.35));
}

.brand-g { color: var(--cyan); }

.nav-link {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.nav-link:hover, .nav-link:focus-visible { color: var(--ink); }

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 130px 160px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { text-wrap: pretty; }

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 7.5vw, 6.8rem);
  line-height: .98;
  letter-spacing: -.068em;
}

h1 span { color: var(--gold); }

.hero-copy {
  max-width: 650px;
  margin: 32px 0 40px;
  color: #c5d1df;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-orbit {
  position: absolute;
  right: -150px;
  bottom: -330px;
  width: 720px;
  aspect-ratio: 1;
  border: 1px solid rgba(88, 225, 219, .18);
  border-radius: 50%;
}

.hero-orbit::before, .hero-orbit::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: inherit;
}

.hero-orbit::after { inset: 29%; border-color: rgba(255,209,102,.16); }

.hero-orbit span {
  position: absolute;
  left: 106px;
  top: 105px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 30px var(--cyan);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--cyan);
  color: #06131c;
  box-shadow: 0 12px 34px rgba(88,225,219,.16);
}

.button-primary:hover { box-shadow: 0 14px 38px rgba(88,225,219,.28); }

main { background: linear-gradient(#07111f, #091728); }

.section { padding-block: 108px; }

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

.section-heading { max-width: 820px; margin-bottom: 42px; }
.section-heading.compact { max-width: 700px; }

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.section-heading > p:last-child { color: var(--muted); font-size: 1.1rem; }

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(0,0,0,.26);
}

.featured-media { min-height: 520px; background: #0b1725; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
}

.project-tag {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.featured-copy h3, .project-body h3 {
  margin: 0 0 18px;
  font-size: 2.2rem;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.featured-copy p:not(.project-tag), .project-body p:not(.project-tag) { color: var(--muted); }
.featured-copy strong { color: var(--ink); font-weight: 700; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 22px;
}

.text-link {
  color: var(--ink);
  font-weight: 750;
  text-underline-offset: 5px;
  text-decoration-color: rgba(88,225,219,.55);
}

.text-link:hover, .text-link:focus-visible { color: var(--cyan); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(160px, .75fr) minmax(0, 1.25fr);
  min-height: 290px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88,225,219,.3);
  background: var(--surface-2);
}

.project-card > img { width: 100%; height: 100%; object-fit: cover; }
.project-body { display: flex; flex-direction: column; align-items: flex-start; padding: 30px; }
.project-body h3 { font-size: 1.65rem; }
.project-body p:not(.project-tag) { margin-top: 0; }
.project-body .text-link { margin-top: auto; }

.project-wide { grid-column: 1 / -1; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 42px;
  color: var(--muted);
  font-size: .92rem;
}

.footer-brand { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-content { padding-block: 100px 130px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-media { min-height: 360px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-wide { grid-column: auto; }
}

@media (max-width: 590px) {
  body { font-size: 16px; }
  .nav, .hero-content, .section, footer { width: min(100% - 28px, 1180px); }
  .hero-content { padding-block: 82px 105px; }
  .section { padding-block: 76px; }
  .featured-media { min-height: 280px; }
  .featured-copy { padding: 28px 24px 34px; }
  .project-card, .project-wide { grid-template-columns: 1fr; }
  .project-card > img { height: 220px; }
  .project-body { padding: 25px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
