/* ==========================================================================
   Montaggio Video — montaggiovideo.click
   Visual system: "editing timeline" — non-linear video editor aesthetic.
   Dark studio surface, timecode monospace, track lanes, playhead accents.
   ========================================================================== */

:root {
  --ink: #0c0e13;
  --panel: #14171f;
  --panel-2: #1b1f29;
  --panel-3: #232836;
  --line: #2c3140;
  --line-soft: #232735;
  --text: #e8ebf2;
  --muted: #9aa3b5;
  --muted-2: #6f7892;
  --accent: #46e0c0;
  --accent-2: #ffb454;
  --accent-3: #7c8cff;
  --danger: #ff6a8a;
  --track-a: #2a4d55;
  --track-b: #4a3b2a;
  --track-c: #2e3358;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(70, 224, 192, 0.07), transparent 60%),
    radial-gradient(900px 520px at 6% 4%, rgba(124, 140, 255, 0.06), transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.timecode {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .73rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Scroll progress (playhead) ---------- */
.scrollbar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: transparent;
  z-index: 80;
}
.scrollbar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 12px rgba(70, 224, 192, 0.5);
}
.scrollbar__head {
  position: absolute;
  top: -3px;
  width: 2px; height: 9px;
  background: var(--text);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(12, 14, 19, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 22px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  position: relative;
  flex: none;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0; height: 0;
  border-left: 10px solid var(--ink);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform: translateX(2px);
}
.brand__name { font-weight: 700; letter-spacing: -0.02em; font-size: 1.02rem; }
.brand__name span { color: var(--muted-2); font-family: var(--mono); font-size: .68rem; display: block; letter-spacing: .12em; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav__cta {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.nav__cta:hover { background: var(--accent); color: var(--ink); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #36c4a8);
  color: var(--ink);
  box-shadow: 0 12px 30px -14px rgba(70, 224, 192, 0.7);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Section frame ---------- */
.section { padding: 92px 0; position: relative; }
.section__head { max-width: 660px; margin-bottom: 42px; }
.section__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-top: .35em; }
.section__head p { color: var(--muted); font-size: 1.04rem; }

/* ---------- HERO — editing timeline ---------- */
.hero { padding: 54px 0 70px; position: relative; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 46px;
  align-items: center;
}
.hero__title {
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
  letter-spacing: -0.035em;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 48ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero__meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted-2);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.hero__meta b { color: var(--text); font-weight: 600; }

.hero__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.hero__media img { width: 100%; height: 280px; object-fit: cover; }
.hero__badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(12, 14, 19, 0.82);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 11px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--accent);
  display: flex; align-items: center; gap: 7px;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* timeline strip below hero media */
.timeline {
  margin-top: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
}
.timeline__ruler {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--muted-2);
  letter-spacing: .1em;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 7px;
}
.track { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.track:last-child { margin-bottom: 0; }
.track__label { font-family: var(--mono); font-size: .6rem; color: var(--muted-2); letter-spacing: .08em; text-align: right; }
.track__lane { display: flex; gap: 6px; height: 26px; }
.clip {
  border-radius: 5px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--text);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.clip--v { background: var(--track-a); }
.clip--a { background: var(--track-b); }
.clip--t { background: var(--track-c); }
.clip::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: rgba(255,255,255,0.22);
}
.timeline__playhead {
  position: relative;
  height: 0;
}
.playhead-line {
  position: absolute;
  left: 64px; right: 0; top: -86px; height: 86px;
}
.playhead-line::after {
  content: "";
  position: absolute;
  left: var(--ph, 30%);
  top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 224, 192, 0.7);
  animation: sweep 6s ease-in-out infinite alternate;
}
@keyframes sweep { from { left: 8%; } to { left: 92%; } }

/* ---------- SERVICES ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.svc-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.svc-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s;
}
.svc-card:hover { transform: translateY(-4px); border-color: var(--line); }
.svc-card:hover::before { transform: scaleY(1); }
.svc-card__no { font-family: var(--mono); font-size: .7rem; color: var(--muted-2); letter-spacing: .14em; }
.svc-card h3 { font-size: 1.18rem; margin: 10px 0 8px; }
.svc-card p { color: var(--muted); font-size: .95rem; margin: 0 0 14px; }
.svc-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.svc-card li { font-size: .86rem; color: var(--muted); display: flex; gap: 8px; }
.svc-card li::before { content: "▸"; color: var(--accent); }
.svc-figure {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 4px;
  align-items: stretch;
}
.svc-figure img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.svc-figure__note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.svc-figure__note h3 { font-size: 1.2rem; }
.svc-figure__note p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- REVISION WORKFLOW — process timeline ---------- */
.workflow { background: linear-gradient(180deg, transparent, rgba(20,23,31,0.5)); }
.proc {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 30px;
}
.proc::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%; top: 26px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
}
.proc__step { padding: 0 12px; text-align: center; position: relative; }
.proc__dot {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 2;
  transition: border-color .25s, transform .25s;
}
.proc__step:hover .proc__dot { border-color: var(--accent); transform: scale(1.06); }
.proc__step h4 { font-size: 1rem; margin-bottom: 6px; }
.proc__step p { font-size: .85rem; color: var(--muted); margin: 0; }
.proc__time { font-family: var(--mono); font-size: .62rem; color: var(--muted-2); letter-spacing: .1em; display: block; margin-bottom: 8px; }

.workflow__media {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: center;
}
.workflow__media img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.workflow__panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.workflow__panel h3 { font-size: 1.25rem; }
.workflow__panel p { color: var(--muted); font-size: .95rem; }
.workflow__panel ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.workflow__panel li { display: flex; gap: 10px; font-size: .9rem; color: var(--muted); }
.workflow__panel li b { color: var(--text); }
.workflow__panel li span { color: var(--accent); font-family: var(--mono); font-size: .82rem; }

/* ---------- FORMAT COMPARISON — segmented controls + comparison blocks ---------- */
.formats__top { display: grid; grid-template-columns: 1fr 0.85fr; gap: 30px; align-items: end; margin-bottom: 30px; }
.segmented {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 5px;
  gap: 4px;
  flex-wrap: wrap;
}
.segmented button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-weight: 600;
}
.segmented button[aria-selected="true"] {
  background: linear-gradient(135deg, var(--accent), #36c4a8);
  color: var(--ink);
}
.segmented button:hover:not([aria-selected="true"]) { color: var(--text); }

.fmt-panel { display: none; }
.fmt-panel.is-active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.compare__col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.compare__col--hl { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(70,224,192,0.2), var(--shadow); }
.compare__tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; }
.compare__col--hl .compare__tag { color: var(--accent); }
.compare__col h4 { font-size: 1.22rem; margin: 8px 0 4px; }
.compare__spec { display: grid; gap: 12px; margin-top: 16px; }
.compare__spec div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.compare__spec div:last-child { border-bottom: none; padding-bottom: 0; }
.compare__spec dt { color: var(--muted); margin: 0; }
.compare__spec dd { color: var(--text); margin: 0; font-family: var(--mono); font-size: .82rem; text-align: right; }

.formats__media { margin-top: 26px; }
.formats__media img { width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------- FAQ accordion ---------- */
.faq__grid { display: grid; gap: 12px; max-width: 860px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item__q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
  font-family: inherit;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item__q::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform .25s;
  flex: none;
}
.faq-item__q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-item__a p { padding: 0 20px 18px; margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- CONTACT ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.contact__media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact__media img { width: 100%; height: 260px; object-fit: cover; }
.contact__info { margin-top: 20px; display: grid; gap: 14px; }
.info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
}
.info-row__k { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; margin-bottom: 3px; }
.info-row__v { color: var(--text); font-size: .96rem; }
.info-row__v a:hover { color: var(--accent); }

.form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 15px; display: flex; flex-direction: column; }
.field label { font-size: .78rem; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); letter-spacing: .06em; }
.field input, .field textarea, .field select {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  padding: 12px 13px;
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 110px; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin: 4px 0 18px; }
.form__consent input { margin-top: 3px; }
.form__note { font-size: .78rem; color: var(--muted-2); margin: 14px 0 0; }
.form__status { font-size: .9rem; margin-top: 14px; min-height: 1.2em; }
.form__status.ok { color: var(--accent); }
.form__status.err { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--panel); padding: 50px 0 30px; margin-top: 30px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer__about p { color: var(--muted); font-size: .9rem; max-width: 38ch; }
.footer__col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); font-family: var(--mono); }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer__col a, .footer__col li { color: var(--muted); font-size: .9rem; }
.footer__col a:hover { color: var(--accent); }
.footer__legal {
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--muted-2);
}
.footer__ids { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: rgba(20, 23, 31, 0.95);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  z-index: 60;
  transition: transform .35s ease;
  backdrop-filter: blur(8px);
}
.sticky-cta.is-visible { transform: translateX(-50%) translateY(0); }
.sticky-cta p { margin: 0; font-size: .88rem; color: var(--muted); }
.sticky-cta b { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { padding: 60px 0 40px; }
.legal__inner { max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; color: var(--text); }
.legal p, .legal li { color: var(--muted); font-size: .98rem; }
.legal ul { padding-left: 20px; }
.legal__updated { font-family: var(--mono); font-size: .76rem; color: var(--muted-2); letter-spacing: .08em; }
.legal__back { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-size: .9rem; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .proc { grid-template-columns: 1fr 1fr; gap: 26px 0; }
  .proc::before { display: none; }
  .workflow__media, .contact__grid, .formats__top, .svc-figure { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .nav.is-open { display: flex; position: absolute; top: 60px; right: 22px; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; gap: 14px; }
  .nav-toggle { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); width: 40px; height: 38px; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; }
  .services__grid, .form__row { grid-template-columns: 1fr; }
  .proc { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__media img { height: 220px; }
  .sticky-cta { left: 12px; right: 12px; transform: translateY(120%); width: auto; }
  .sticky-cta.is-visible { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
