/* ABC Force — sito studio */

:root {
  --ink: #070b12;
  --ink-2: #10182a;
  --cream: #f4f0e7;
  --cream-2: #e8e2d6;
  --white: #f7f4ee;
  --red: #ff4b3e;
  --red-deep: #c41218;
  --muted: #5d6674;
  --muted-light: #b7c0ce;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(16, 21, 31, 0.12);
  --font-d: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-b: "Outfit", "Avenir Next", sans-serif;
  --font-s: "Fraunces", Georgia, serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --nav: 78px;
  --max: 1160px;
  --shadow: 0 30px 70px rgba(7, 11, 18, 0.18);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-b);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--red);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--font-d);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.muted {
  color: var(--muted);
}

.light-muted {
  color: var(--muted-light);
}

/* Nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--nav);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-solid {
  border-bottom-color: var(--line);
}

.nav.is-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 11, 18, 0.86);
  backdrop-filter: blur(16px);
}

.nav__inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  z-index: 42;
}

.nav__brand img {
  height: 34px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(247, 244, 238, 0.78);
}

.nav__links a:hover {
  color: #fff;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--red-deep);
  color: #fff !important;
  font-weight: 600 !important;
}

.nav__cta:hover {
  background: #a50e14;
}

.nav__toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  position: relative;
  z-index: 42;
}

.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  position: absolute;
  left: 14px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle span {
  top: 22px;
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  left: 0;
}

.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }

.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after { top: 0; transform: rotate(-45deg); }

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav) + 36px) 0 48px;
  overflow: hidden;
  background:
    radial-gradient(820px 480px at 88% 0%, rgba(255, 75, 62, 0.22), transparent 58%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 68px 68px, 68px 68px, auto;
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 20%), rgba(255, 75, 62, 0.16), transparent 42%);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 36px;
  font-size: clamp(3.3rem, 8vw, 7rem);
  font-weight: 800;
  max-width: 16ch;
}

.hero h1 span {
  display: block;
}

.hero h1 em {
  font-family: var(--font-s);
  font-style: italic;
  font-weight: 560;
  letter-spacing: -0.04em;
  color: var(--red);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: 48px;
  align-items: end;
}

.hero__lead {
  margin: 0 0 28px;
  max-width: 42ch;
  font-size: 1.15rem;
  color: var(--muted-light);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--fill {
  background: var(--red-deep);
  color: #fff;
}

.btn--fill:hover {
  background: #a50e14;
  transform: translateY(-2px);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn--ghost:hover {
  border-color: #fff;
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: #1c2433;
  transform: translateY(-2px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 0.92rem;
}

.hero__meta a:hover {
  color: #fff;
}

/* Window */

.window {
  background: #0c1322;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 390px;
  display: flex;
  flex-direction: column;
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.window__dots {
  display: flex;
  gap: 6px;
}

.window__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a3346;
  display: block;
}

.window__dots i:first-child { background: #ff5f57; }
.window__dots i:nth-child(2) { background: #febc2e; }
.window__dots i:nth-child(3) { background: #28c840; }

.window__tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.window__tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted-light);
  font-size: 0.82rem;
  font-weight: 500;
}

.window__tab.is-on {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.window__body {
  padding: 22px 22px 26px;
  flex: 1;
}

.window__body[hidden] {
  display: none;
}

.code {
  margin: 0;
  font-family: var(--font-m);
  font-size: 0.84rem;
  line-height: 1.7;
  color: #d5dbea;
  white-space: pre-wrap;
}

.c-comment { color: #7f8ba3; }
.c-key { color: #ff8b7a; }
.c-fn { color: #9ecbff; }
.c-str { color: #b6f0c2; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat__msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.chat__msg--user {
  align-self: flex-end;
  background: #1b2740;
  border-bottom-right-radius: 5px;
}

.chat__msg--ai {
  align-self: flex-start;
  background: rgba(255, 75, 62, 0.12);
  border: 1px solid rgba(255, 75, 62, 0.28);
  border-bottom-left-radius: 5px;
}

.chat__who {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--red);
  transform: translateY(2px);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Marquee */

.marquee {
  background: var(--cream);
  color: var(--ink);
  border-top: 1px solid rgba(7, 11, 18, 0.06);
  border-bottom: 1px solid rgba(7, 11, 18, 0.06);
  overflow: hidden;
  padding: 18px 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--font-d);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  white-space: nowrap;
}

.marquee__item i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-deep);
  display: block;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* Sections */

.section {
  padding: 108px 0;
}

.section--cream {
  background: var(--cream);
  color: var(--ink);
}

.section--ink {
  background:
    radial-gradient(700px 320px at 0% 0%, rgba(255, 75, 62, 0.14), transparent 60%),
    var(--ink);
}

.section__head {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 48px;
}

.section__head h2,
.block-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
}

.section--cream .section__head p,
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 46ch;
}

.section--ink .lede {
  color: var(--muted-light);
}

/* Studio */

.principles {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  gap: 18px;
}

.principle,
.studio__intro {
  background: #fff;
  border-radius: 22px;
  padding: 26px 24px 28px;
  border: 1px solid rgba(16, 21, 31, 0.06);
}

.studio__intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.principle strong {
  display: block;
  margin: 18px 0 8px;
  font-family: var(--font-d);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.num {
  font-family: var(--font-m);
  font-size: 0.78rem;
  color: var(--red-deep);
  letter-spacing: 0.08em;
}

/* Bento */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.card {
  background: #fff;
  border-radius: 24px;
  padding: 26px 24px 28px;
  border: 1px solid rgba(16, 21, 31, 0.06);
  min-height: 210px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(16, 21, 31, 0.08);
}

.card--wide { grid-column: span 4; }
.card--mid { grid-column: span 2; }
.card--third { grid-column: span 2; }

.card--feature {
  background:
    linear-gradient(160deg, #171f30 0%, #0d1320 70%);
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.card--ai {
  background: var(--red-deep);
  color: #fff;
  min-height: 320px;
}

.card--feature p,
.card--ai p {
  color: rgba(255, 255, 255, 0.84);
}

.card h3 {
  margin: 14px 0 10px;
  font-size: 1.7rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 18, 24, 0.1);
  color: var(--red-deep);
}

.card--feature .card__icon,
.card--ai .card__icon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.card .more {
  margin-top: auto;
  padding-top: 22px;
  font-family: var(--font-m);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.snippet {
  margin: 22px 0 0;
  font-family: var(--font-m);
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  white-space: pre-wrap;
}

/* Codice */

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
  color: var(--muted-light);
}

.exp-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.exp {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
}

.exp h3 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  color: #fff;
}

.exp p {
  margin: 0;
  color: var(--muted-light);
  max-width: 58ch;
}

.code-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

/* AI */

.ai-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: stretch;
}

.ai-panel {
  background: #fff;
  color: var(--ink);
  border-radius: 28px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.ai-panel .chat__msg--user {
  background: var(--cream);
  color: var(--ink);
}

.ai-panel .chat__msg--ai {
  background: #fff5f3;
  color: var(--ink);
}

.caps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cap {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 20px 24px;
  background: rgba(255, 255, 255, 0.03);
}

.cap h3 {
  margin: 10px 0;
  font-size: 1.45rem;
}

.cap p {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.98rem;
}

/* Projects */

.project {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 42px 0;
  border-top: 1px solid var(--line-dark);
}

.project:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.project--flip .project__media {
  order: 2;
}

.project__media {
  background:
    radial-gradient(420px 220px at 20% 20%, rgba(255, 75, 62, 0.16), transparent 60%),
    #fff;
  border-radius: 28px;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px solid rgba(16, 21, 31, 0.06);
}

.project__media img {
  width: min(100%, 460px);
  height: 280px;
  object-fit: contain;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(196, 18, 24, 0.1);
  color: var(--red-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project h3 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.project p {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
}

/* Contact */

.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.contact__grid h2 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  margin: 0 0 18px;
}

.contact__list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__list span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}

.contact__list a:hover {
  color: #fff;
}

.form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  color: var(--muted-light);
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(255, 75, 62, 0.8);
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form__note,
.form__status {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.88rem;
  max-width: 42ch;
}

.form__status:empty {
  display: none;
}

.form__status.is-error {
  color: #ffb4ae;
}

/* Footer */

.footer {
  background: #05080e;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--muted-light);
  font-size: 0.92rem;
}

.footer a:hover {
  color: #fff;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red-deep);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(196, 18, 24, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

.to-top.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* Reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
  animation-play-state: paused;
}

.js .reveal.is-in {
  animation-play-state: running;
}

.js .d1 { animation-delay: 0.08s; }
.js .d2 { animation-delay: 0.16s; }
.js .d3 { animation-delay: 0.24s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .nav__toggle { display: inline-block; }

  .nav__links {
    position: fixed;
    z-index: 41;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: #070b12;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 100px 32px;
    gap: 8px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.is-open .nav__links {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav__links a {
    font-family: var(--font-d);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #fff;
  }

  .nav__cta {
    height: auto;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--red) !important;
  }

  .hero__grid,
  .section__head,
  .principles,
  .code-layout,
  .ai-layout,
  .project,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .project--flip .project__media { order: 0; }

  .card--wide,
  .card--mid,
  .card--third {
    grid-column: span 6;
  }

  .caps {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }
}

@media (max-width: 640px) {
  .to-top {
    display: none;
  }

  .wrap,
  .nav__inner {
    width: min(var(--max), calc(100% - 28px));
  }

  .section {
    padding: 76px 0;
  }

  .card,
  .principle,
  .studio__intro,
  .window,
  .form,
  .ai-panel,
  .project__media {
    border-radius: 18px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions .btn,
  .form__row .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .marquee__track,
  .caret,
  .js .reveal {
    animation: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .btn,
  .card,
  .nav,
  .nav__links,
  .to-top {
    transition: none;
  }
}
