:root {
  color-scheme: dark;
  --base: #121511;
  --panel: #1a1e17;
  --band: #171b15;
  --ink: #f2f4ea;
  --muted: #bac1b4;
  --line: #343d30;
  --accent: #d6fa70;
  --error: #ffbcaa;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--base); color: var(--ink); font: 1rem/1.65 var(--font); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--base); background: var(--accent); }
.wrap { width: min(100% - 5rem, 77.5rem); margin-inline: auto; }

.skip {
  position: fixed; z-index: 30; inset: 1rem auto auto 1rem; transform: translateY(-180%);
  padding: .65rem 1rem; background: var(--accent); color: var(--base); border-radius: .4rem;
}
.skip:focus { transform: none; }
.site-header {
  z-index: 10; position: sticky; top: 0; border-bottom: 1px solid var(--line); background: #121511f5;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 4.65rem; }
.brand { display: inline-flex; gap: .7rem; align-items: center; text-decoration: none; font-size: 1.04rem; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.brand-mark {
  display: inline-grid; grid-auto-flow: column; place-content: center; width: 2.1rem; height: 2.1rem;
  color: var(--base); background: var(--accent); border-radius: .48rem; font-size: 1.15rem; font-weight: 800;
  letter-spacing: -.085em; line-height: 1;
}
.brand-mark b { color: #415422; }
.site-nav, .header-actions { display: flex; align-items: center; gap: clamp(1rem, 2.45vw, 2.2rem); }
.site-nav a, .locale, .menu-toggle {
  display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none;
  color: var(--muted); font-size: .925rem; font-weight: 600;
}
.site-nav a:hover, .locale:hover, .menu-toggle:hover { color: var(--accent); }
.header-actions { gap: .85rem; }
.locale { padding-inline: .65rem; color: var(--ink); border: 1px solid var(--line); border-radius: .55rem; }
.menu-toggle { padding-inline: .75rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: .55rem; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; }
h1, h2 { font-weight: 750; letter-spacing: -.07em; }
h1 { font-size: clamp(3.45rem, 7.6vw, 7.1rem); }
h2 { font-size: clamp(2.45rem, 4.65vw, 4.75rem); }
h3 { font-size: clamp(1.26rem, 2.3vw, 1.53rem); letter-spacing: -.027em; }
h1 em, h2 em { color: var(--accent); font-style: normal; }
.eyebrow {
  display: flex; gap: .7rem; align-items: center; margin-bottom: 1.25rem;
  color: var(--accent); font-size: .875rem; line-height: 1.4; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: 0 0 1rem; height: 1px; background: currentColor; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.35rem; padding: .65rem 1.15rem;
  color: var(--base); background: var(--accent); border: 1px solid var(--accent); border-radius: .55rem;
  font-size: .96rem; font-weight: 750; text-decoration: none; text-align: center; line-height: 1.25;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.button:hover { background: #e3ffac; border-color: #e3ffac; }
.button-outline { background: transparent; color: var(--ink); border-color: #4d5948; }
.button-outline:hover { background: #263123; color: var(--ink); border-color: var(--accent); }
.button-small { min-height: 2.75rem; font-size: .875rem; padding-inline: .9rem; }
.button:disabled { opacity: .75; cursor: wait; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center;
  column-gap: clamp(1.5rem, 4vw, 4.25rem); padding-top: clamp(2.25rem, 5.5vw, 5rem);
}
.hero-copy { padding-block: 1rem; }
.hero h1 { line-height: .96; }
html[lang="it"] .hero h1 { font-size: clamp(3.35rem, 6.4vw, 6.3rem); }
.hero-intro { max-width: 31rem; margin-top: 1.6rem; color: var(--muted); font-size: clamp(1.075rem, 1.6vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.9rem; }
.hero-image {
  isolation: isolate; position: relative; display: grid; width: 100%; min-width: 0;
  aspect-ratio: 1.06; overflow: hidden; background: #1b2118; border: 1px solid #3d4934; border-radius: var(--radius);
}
.hero-image picture { position: absolute; inset: 0; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-location {
  grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem;
  padding-block: 1.25rem 1.65rem; margin-top: 1.45rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .9rem;
}

.section { padding-block: clamp(3.7rem, 8vw, 7.5rem); }
.band { border-block: 1px solid var(--line); background: var(--band); }
.section-heading {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .65fr); align-items: end; gap: 1.5rem 3rem;
  margin-bottom: clamp(1.85rem, 4vw, 3rem);
}
.section-heading > p, .about-copy > p:not(.eyebrow), .contact-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; max-width: 34rem; }
.section-heading > p { padding-bottom: .16rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.service {
  min-width: 0; padding: clamp(1.05rem, 2.25vw, 1.9rem); border: 1px solid var(--line);
  border-radius: var(--radius); background: #1e231b;
}
.service-icon {
  display: block; position: relative; width: 2.8rem; height: 2.8rem; margin-bottom: 1.85rem;
  border-radius: .6rem; background: #2b3821; color: var(--accent);
}
.service-icon::before, .service-icon::after { content: ""; position: absolute; }
.icon-web::before { inset: .72rem .58rem .73rem; border: 1.5px solid currentColor; border-radius: .14rem; }
.icon-web::after { top: 1.08rem; right: .62rem; left: .62rem; border-top: 1.5px solid currentColor; }
.icon-code::before, .icon-code::after {
  top: 1.02rem; width: .62rem; height: .62rem; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
}
.icon-code::before { left: .67rem; transform: rotate(-135deg); }
.icon-code::after { right: .67rem; transform: rotate(45deg); }
.icon-hosting::before, .icon-hosting::after { left: .61rem; right: .61rem; height: .54rem; border: 1.5px solid currentColor; border-radius: .15rem; }
.icon-hosting::before { top: .75rem; }
.icon-hosting::after { bottom: .75rem; }
.icon-tools::before { inset: .65rem; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-tools::after { inset: 1.13rem; border: 1.5px solid currentColor; border-radius: 50%; }
.service h3 { overflow-wrap: anywhere; }
.service p, .project-copy > p:not(.project-tag), .process p { margin-top: .65rem; color: var(--muted); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; overflow: clip; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.project-image { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.project-copy { display: flex; flex-direction: column; flex: 1; align-items: flex-start; padding: clamp(1.15rem, 2.45vw, 1.85rem); }
.project-copy h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.project-tag { color: var(--accent); font-size: .88rem; font-weight: 650; margin-bottom: .6rem; }
.project-link, .text-link { color: var(--accent); text-underline-offset: .22rem; font-weight: 650; }
.project-link { display: inline-grid; align-items: center; min-height: 2.75rem; margin-top: auto; padding-top: .55rem; }
.project-link:hover, .text-link:hover { color: #edffc6; }
.image-credit { margin-top: 1rem; color: var(--muted); font-size: .9rem; }

.about-grid, .contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 7vw, 7rem); }
.about-copy > p:not(.eyebrow), .contact-copy > p:not(.eyebrow) { margin-top: 1.15rem; }
.process { padding: clamp(1.3rem, 3vw, 2.4rem); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.process > h3 { margin-bottom: 1.3rem; }
.process ol { counter-reset: process; list-style: none; margin: 0; padding: 0; }
.process li { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .9rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.process li:last-child { padding-bottom: 0; }
.process li::before {
  counter-increment: process; content: counter(process); align-self: start; display: grid; place-items: center;
  min-height: 2.1rem; border-radius: 50%; color: var(--accent); background: #2b3821; font-size: .9rem; font-weight: 750;
}
.process li h3 { font-size: 1.1rem; margin-top: .1rem; }
.process p { margin-top: .3rem; }

.contact-section { background: radial-gradient(ellipse at 13% 32%, #272f20 0, var(--base) 57%); }
.contact-details { display: grid; gap: .9rem; margin: 1.8rem 0 0; min-width: 0; }
.contact-details dt { font-size: .875rem; color: var(--muted); }
.contact-details dd { margin: .12rem 0 0; font-weight: 650; font-size: clamp(1.05rem, 2.3vw, 1.5rem); overflow-wrap: anywhere; }
.contact-details a { text-decoration-color: #859473; text-underline-offset: .22rem; }
.contact-details a:hover { color: var(--accent); }
.contact-form { min-width: 0; padding: clamp(1.15rem, 3.25vw, 2.35rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.form-hint { margin: .45rem 0 1.05rem; color: var(--muted); font-size: .9rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.contact-form label { display: block; color: var(--ink); font-size: .92rem; }
.contact-form input:not([type="checkbox"]), .contact-form select, .contact-form textarea {
  display: block; width: 100%; min-height: 3.05rem; margin: .32rem 0 .85rem; padding: .6rem .75rem; color: var(--ink);
  background: #141812; border: 1px solid #56624e; border-radius: .43rem; font-size: 1rem;
}
.contact-form select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 51%, var(--ink) 51%), linear-gradient(135deg, var(--ink) 51%, transparent 51%);
  background-size: .32rem .32rem; background-position: right 1.1rem center, right .8rem center; background-repeat: no-repeat;
}
.contact-form textarea { min-height: 7rem; resize: vertical; }
.check-line { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); align-items: start; gap: .65rem; margin-bottom: 1rem; }
.check-line input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; accent-color: var(--accent); }
.check-line a { color: var(--accent); text-underline-offset: .2rem; }
.form-status { margin-top: .85rem; color: var(--muted); }
.form-status:empty { margin: 0; }
.form-status[data-state="sent"] { color: var(--accent); }
.form-status[data-state="invalid"], .form-status[data-state="failed"], .form-status[data-state="rate"] { color: var(--error); }

.site-footer { border-top: 1px solid var(--line); background: #111410; }
.footer-top, .footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.5rem; }
.footer-top { padding-block: 2rem; border-bottom: 1px solid var(--line); }
.footer-top p { color: var(--muted); margin-top: .55rem; }
.footer-bottom { padding-block: 1rem; color: var(--muted); font-size: .92rem; }
.footer-bottom small { font-size: inherit; }
.footer-bottom > div { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 2.75rem; text-underline-offset: .2rem; }
.footer-bottom a:hover { color: var(--accent); }

.legal { min-height: 55vh; padding-block: clamp(2.5rem, 6vw, 5.25rem); }
.legal article { max-width: 52rem; margin-top: 1rem; }
.legal h1 { font-size: clamp(2.5rem, 6vw, 5.25rem); overflow-wrap: anywhere; }
.legal article > section { border-top: 1px solid var(--line); margin-top: 1.55rem; padding-top: 1.55rem; }
.legal article h2 { font-size: 1.35rem; letter-spacing: -.03em; }
.legal article p, .error-page > p { margin-top: .65rem; color: var(--muted); overflow-wrap: anywhere; }
.legal article a { color: var(--accent); text-underline-offset: .22rem; }
.error-page .brand { margin-bottom: 1.9rem; }

@media (max-width: 1000px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { width: min(100% - 3rem, 77.5rem); }
  .header-inner { flex-wrap: wrap; gap: .3rem .8rem; padding-block: .55rem; min-height: 3.95rem; }
  .site-nav { order: 3; flex: 0 0 100%; flex-wrap: wrap; gap: 0 1.25rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; border-top: 1px solid var(--line); padding-top: .35rem; margin-top: .2rem; }
  .header-cta { display: none; }
  .header-actions { margin-left: auto; gap: .45rem; }
  .section-heading { grid-template-columns: 1fr; gap: .85rem; }
}
@media (min-width: 1001px) { .menu-toggle { display: none; } }
@media (max-width: 680px) {
  .wrap { width: min(100% - 2rem, 36rem); }
  .hero { grid-template-columns: 1fr; gap: 1.3rem; padding-top: 2.05rem; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(3rem, 11.9vw, 5.15rem); }
  html[lang="it"] .hero h1 { font-size: clamp(2.85rem, 10.9vw, 4.85rem); }
  .hero-intro { margin-top: 1.07rem; }
  .hero-actions { margin-top: 1.3rem; }
  .hero-image { aspect-ratio: 1.55; }
  .hero-location { margin-top: 0; padding-block: .9rem 1.15rem; flex-wrap: wrap; gap: .2rem .85rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project-image { aspect-ratio: 1.73; }
  .service-icon { margin-bottom: .9rem; }
}
@media (max-width: 390px) {
  .service-grid, .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
