/*
Theme Name: Aistema Blocks
Theme URI: https://aistema.it
Author: Aistema
Description: Tema a blocchi leggero e SEO-friendly per Aistema. Compatibile con il Site Editor di WordPress.
Version: 2.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: aistema
*/

:root {
  --aistema-navy: #08213f;
  --aistema-navy-2: #0d2c50;
  --aistema-teal: #26989b;
  --aistema-teal-light: #8bd7d5;
  --aistema-ink: #10233a;
  --aistema-muted: #5d6b78;
  --aistema-paper: #f5f2eb;
  --aistema-line: #d9e0e3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .18em; }
.aistema-wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.aistema-eyebrow {
  margin: 0 0 20px !important;
  color: var(--aistema-teal);
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.aistema-button .wp-block-button__link {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .2s, background .2s;
}
.aistema-button .wp-block-button__link:hover { transform: translateY(-2px); }

.aistema-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 84px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(8,33,63,.1);
}
.aistema-header > .wp-block-group {
  min-height: 84px;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.aistema-brand img { width: 178px; height: auto; display: block; }
.aistema-header .wp-block-navigation { margin-left: auto; font-size: 14px; font-weight: 600; }
.aistema-header .wp-block-navigation-item__content:hover { color: var(--aistema-teal); }

.aistema-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 84px);
  padding: 70px 0 0;
  background-color: var(--aistema-paper);
  background-image:
    linear-gradient(rgba(8,33,63,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,33,63,.045) 1px, transparent 1px);
  background-size: 48px 48px;
}
.aistema-hero-main { min-height: calc(100vh - 240px); align-items: center !important; gap: 70px !important; }
.aistema-hero h1 { max-width: 780px; margin-bottom: 28px; font-size: clamp(54px, 6.4vw, 88px); line-height: .96; letter-spacing: -.055em; }
.aistema-hero h1 strong { color: var(--aistema-teal); font-weight: inherit; }
.aistema-lead { max-width: 680px; color: #435363; font-size: 19px !important; line-height: 1.65; }
.aistema-microcopy { color: #71808e; font-size: 12px !important; }
.aistema-actions { gap: 12px !important; margin-top: 34px !important; }

.aistema-map {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(8,33,63,.18);
  background: rgba(255,255,255,.58);
  box-shadow: 0 35px 80px rgba(8,33,63,.08);
}
.aistema-map-top {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(8,33,63,.14);
  color: #5e6c78;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.aistema-map-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(8,33,63,.08) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(8,33,63,.08) 50%, transparent 50.2%);
}
.aistema-map-visual img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
  object-fit: contain;
}
.aistema-map-core {
  width: 130px;
  height: 130px;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  background: var(--aistema-navy);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(38,152,155,.10), 0 0 0 66px rgba(38,152,155,.10), 0 0 0 67px rgba(38,152,155,.28);
}
.aistema-map-core strong { display: block; font-size: 52px; line-height: 1; }
.aistema-map-core span { color: var(--aistema-teal-light); font-size: 9px; letter-spacing: .12em; }
.aistema-map-metrics { margin: 0 !important; border-top: 1px solid rgba(8,33,63,.14); }
.aistema-map-metrics > .wp-block-column { padding: 18px; border-right: 1px solid rgba(8,33,63,.12); }
.aistema-map-metrics > .wp-block-column:last-child { border-right: 0; }
.aistema-map-metrics strong { color: var(--aistema-teal); font-size: 12px; }
.aistema-map-metrics p { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
.aistema-trust {
  margin-top: 56px;
  min-height: 86px;
  padding: 22px 0;
  border-top: 1px solid rgba(8,33,63,.14);
  color: #61707e;
  font-size: 12px;
}

.aistema-section { padding: 120px 0; }
.aistema-section h2 { font-size: clamp(38px, 5vw, 64px); line-height: 1.03; letter-spacing: -.045em; }
.aistema-split { gap: 90px !important; align-items: end !important; }
.aistema-split > div:last-child { color: var(--aistema-muted); font-size: 18px; }
.aistema-card-grid, .aistema-process-grid { gap: 0 !important; margin-top: 68px !important; }
.aistema-card {
  min-height: 280px;
  padding: 30px;
  border: 1px solid var(--aistema-line);
  border-right: 0;
}
.aistema-card:last-child { border-right: 1px solid var(--aistema-line); }
.aistema-card > p:first-child { color: var(--aistema-teal); font-size: 12px; font-weight: 700; }
.aistema-card h3 { margin-top: 64px; font-size: 23px; letter-spacing: -.03em; }
.aistema-card p:last-child { color: var(--aistema-muted); font-size: 14px; line-height: 1.7; }

.aistema-dark { color: white; background: var(--aistema-navy); }
.aistema-dark .aistema-intro { max-width: 680px; color: #aebdca; font-size: 18px; }
.aistema-process {
  min-height: 280px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-right: 0;
}
.aistema-process:last-child { border-right: 1px solid rgba(255,255,255,.18); }
.aistema-process > p:first-child { color: var(--aistema-teal-light); font-size: 12px; font-weight: 700; }
.aistema-process h3 { margin-top: 70px; font-size: 28px; }
.aistema-process p:last-child { color: #aec0cf; font-size: 14px; line-height: 1.7; }
.aistema-deliverable { margin-top: 28px; padding: 48px; background: var(--aistema-teal); color: #06213c; }
.aistema-deliverable h3 { font-size: 42px; line-height: 1.05; }
.aistema-deliverable ul { columns: 2; column-gap: 38px; }
.aistema-deliverable li { margin-bottom: 14px; }

.aistema-outcomes { gap: 90px !important; }
.aistema-outcome { padding: 26px 0; border-top: 1px solid var(--aistema-line); }
.aistema-outcome:last-child { border-bottom: 1px solid var(--aistema-line); }
.aistema-outcome h3 { margin-bottom: 7px; font-size: 23px; }
.aistema-outcome p { margin: 0; color: var(--aistema-muted); font-size: 14px; }

.aistema-journal { background: var(--aistema-paper); }
.aistema-post-grid { gap: 24px !important; }
.aistema-post-card {
  height: 100%;
  overflow: hidden;
  background: white;
  transition: transform .25s, box-shadow .25s;
}
.aistema-post-card::before {
  content: "AISTEMA / JOURNAL";
  min-height: 210px;
  display: flex;
  align-items: end;
  padding: 24px;
  color: var(--aistema-teal-light);
  background:
    radial-gradient(circle at 78% 100%, transparent 0 66px, rgba(255,255,255,.22) 67px 68px, transparent 69px 112px, rgba(255,255,255,.16) 113px 114px, transparent 115px),
    var(--aistema-navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}
.aistema-post-grid > li:nth-child(3n+2) .aistema-post-card::before {
  color: var(--aistema-navy);
  background:
    radial-gradient(circle at 78% 100%, transparent 0 66px, rgba(8,33,63,.22) 67px 68px, transparent 69px 112px, rgba(8,33,63,.16) 113px 114px, transparent 115px),
    var(--aistema-teal);
}
.aistema-post-grid > li:nth-child(3n) .aistema-post-card::before {
  color: var(--aistema-teal);
  background:
    radial-gradient(circle at 78% 100%, transparent 0 66px, rgba(8,33,63,.18) 67px 68px, transparent 69px 112px, rgba(8,33,63,.12) 113px 114px, transparent 115px),
    #dce6e6;
}
.aistema-post-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(8,33,63,.1); }
.aistema-post-card .wp-block-post-featured-image { display: none; }
.aistema-post-card .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; }
.aistema-post-card-body { padding: 25px; }
.aistema-post-card h3 { font-size: 24px; line-height: 1.16; }
.aistema-post-card .wp-block-post-excerpt { color: var(--aistema-muted); font-size: 14px; }
.aistema-post-meta { color: #71808d; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.aistema-cta { padding: 72px; border-left: 6px solid var(--aistema-teal); background: var(--aistema-paper); }
.aistema-cta h2 { margin-bottom: 0; }
.aistema-page-hero { padding: 105px 0 80px; background: var(--aistema-paper); border-bottom: 1px solid var(--aistema-line); }
.aistema-page-hero h1 { max-width: 930px; font-size: clamp(50px, 7vw, 86px); line-height: .98; letter-spacing: -.05em; }
.aistema-page-hero .aistema-lead { max-width: 790px; }
.aistema-page-content { padding: 100px 0 120px; }
.aistema-content-grid { gap: 100px !important; }
.aistema-content-grid h2 { font-size: 48px; }
.aistema-prose { color: var(--aistema-muted); font-size: 17px; line-height: 1.8; }
.aistema-feature { padding: 24px 0; border-top: 1px solid var(--aistema-line); }
.aistema-feature:last-child { border-bottom: 1px solid var(--aistema-line); }
.aistema-feature h3 { margin-bottom: 8px; color: var(--aistema-ink); font-size: 22px; }
.aistema-service-sidebar { position: sticky; top: 115px; padding: 28px; color: white; background: var(--aistema-navy); }
.aistema-service-sidebar p { color: #b5c4cf; }

.aistema-blog-hero { padding-bottom: 58px; }
.aistema-blog-index { padding: 80px 0 120px; }
.aistema-single-header { padding: 80px 0 68px; background: var(--aistema-paper); }
.aistema-single-header h1 { max-width: 960px; margin: 28px 0; font-size: clamp(48px, 7vw, 82px); line-height: .98; letter-spacing: -.05em; }
.aistema-single-content { max-width: 820px !important; padding: 86px 24px 120px; }
.aistema-single-content h2 { margin-top: 58px; font-size: 38px; line-height: 1.12; }
.aistema-single-content p, .aistema-single-content li { color: #405364; font-size: 17px; line-height: 1.82; }
.aistema-single-content .wp-block-post-content > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.aistema-single-content .wp-block-post-content > .alignwide { max-width: 1000px; }
.aistema-article-answer {
  padding: 24px 28px;
  border-left: 4px solid var(--aistema-teal);
  background: var(--aistema-paper);
}
.aistema-related-cta {
  margin-top: 64px !important;
  padding: 34px;
  color: white;
  background: var(--aistema-navy);
}
.aistema-related-cta h3 { color: white; }
.aistema-related-cta a { color: var(--aistema-teal-light); }

.aistema-contact-grid { gap: 80px !important; }
.aistema-contact-card { padding: 42px; color: white; background: var(--aistema-navy); }
.aistema-contact-card h2 { font-size: 42px; }
.aistema-contact-card p { color: #b4c2ce; }
.aistema-contact-form { display: grid; gap: 18px; }
.aistema-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.aistema-contact-form label { display: grid; gap: 8px; color: var(--aistema-ink); font-size: 13px; font-weight: 700; }
.aistema-contact-form input, .aistema-contact-form textarea, .aistema-contact-form select {
  width: 100%;
  padding: 14px 15px;
  color: var(--aistema-ink);
  background: white;
  border: 1px solid #cbd5da;
  border-radius: 3px;
  font: inherit;
}
.aistema-contact-form textarea { min-height: 140px; resize: vertical; }
.aistema-contact-form button { width: fit-content; padding: 15px 20px; color: white; background: var(--aistema-navy); border: 0; border-radius: 4px; font-weight: 700; cursor: pointer; }
.aistema-form-status { padding: 14px; background: #e8f5f3; border-left: 3px solid var(--aistema-teal); }

.aistema-footer { padding: 74px 0 24px; color: #d9e2e9; background: #061a31; }
.aistema-footer > .wp-block-group { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.aistema-footer h3 { color: var(--aistema-teal-light); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.aistema-footer a { color: #d9e2e9; text-decoration: none; }
.aistema-footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: #71899b; font-size: 11px; }

@media (max-width: 980px) {
  .aistema-hero-main, .aistema-split, .aistema-outcomes, .aistema-content-grid, .aistema-contact-grid { flex-wrap: wrap !important; }
  .aistema-hero-main > .wp-block-column, .aistema-split > .wp-block-column, .aistema-outcomes > .wp-block-column, .aistema-content-grid > .wp-block-column, .aistema-contact-grid > .wp-block-column { flex-basis: 100% !important; }
  .aistema-card-grid, .aistema-process-grid { flex-wrap: wrap !important; }
  .aistema-card-grid > .wp-block-column, .aistema-process-grid > .wp-block-column { flex-basis: 50% !important; }
  .aistema-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .aistema-service-sidebar { position: static; }
}

@media (max-width: 680px) {
  .aistema-wrap, .aistema-header > .wp-block-group, .aistema-footer > .wp-block-group { width: min(100% - 32px, 1200px); }
  .aistema-header { min-height: 72px; }
  .aistema-header > .wp-block-group { min-height: 72px; }
  .aistema-brand img { width: 145px; }
  .aistema-hero { min-height: auto; padding-top: 58px; }
  .aistema-hero h1 { font-size: 48px; }
  .aistema-section { padding: 80px 0; }
  .aistema-card-grid > .wp-block-column, .aistema-process-grid > .wp-block-column { flex-basis: 100% !important; }
  .aistema-card, .aistema-process { border-right: 1px solid var(--aistema-line); }
  .aistema-deliverable, .aistema-cta { padding: 32px 24px; }
  .aistema-deliverable ul { columns: 1; }
  .aistema-post-grid { grid-template-columns: 1fr !important; }
  .aistema-page-hero { padding: 72px 0 56px; }
  .aistema-page-content { padding: 72px 0 90px; }
  .aistema-form-row { grid-template-columns: 1fr; }
  .aistema-map-visual { min-height: 290px; }
}
