/* Studio di Architettura Fainozzi Lamberti — Static Site */

:root {
  --color-beige: #d1c1b1;
  --color-slate: #526671;
  --color-slate-dark: #3f5159;
  --color-beige-light: #e5dbd0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-slate);
  background-color: var(--color-beige-light);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-slate);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-slate-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-slate);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-slate);
  color: var(--color-beige);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-beige);
  border-bottom: 1px solid rgba(82, 102, 113, 0.2);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-slate);
  line-height: 1.3;
}

.site-logo:hover {
  color: var(--color-slate-dark);
}

.site-logo__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-logo__sub {
  font-size: 0.8125rem;
  color: rgba(82, 102, 113, 0.75);
  font-weight: 400;
}

/* Navigation */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(82, 102, 113, 0.35);
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-slate);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-slate);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-slate-dark);
  border-bottom-color: var(--color-slate);
}

/* Main layout */

main {
  min-height: 60vh;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid rgba(82, 102, 113, 0.2);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 60%, rgba(82, 102, 113, 0.08) 60%);
  pointer-events: none;
}

.hero__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(82, 102, 113, 0.75);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1.75rem;
  max-width: 20ch;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--color-slate);
  max-width: 42rem;
  margin: 0;
}

/* Page header (inner pages) */

.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid rgba(82, 102, 113, 0.2);
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.page-header__intro {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-slate);
  max-width: 42rem;
  margin: 0;
}

/* Sections */

.section {
  padding: 3.5rem 0;
}

.section--alt {
  background-color: rgba(209, 193, 177, 0.45);
  border-top: 1px solid rgba(82, 102, 113, 0.15);
  border-bottom: 1px solid rgba(82, 102, 113, 0.15);
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__number {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-slate);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.section p {
  margin: 0 0 1.25rem;
  color: var(--color-slate);
  max-width: 42rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* Service grid */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  padding: 2rem 1.75rem;
  background: var(--color-beige-light);
  border: 1px solid rgba(82, 102, 113, 0.2);
  position: relative;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--color-slate);
}

.service-card__number {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-slate);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.service-card h3 a {
  color: var(--color-slate);
  text-decoration: none;
}

.service-card h3 a:hover {
  color: var(--color-slate-dark);
}

.service-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(82, 102, 113, 0.85);
  margin: 0;
}

/* Content blocks */

.content-block {
  padding: 2.5rem 0;
}

.content-block + .content-block {
  border-top: 1px solid rgba(82, 102, 113, 0.15);
}

.content-block h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-slate);
}

.content-block p {
  margin: 0;
  color: var(--color-slate);
  max-width: 42rem;
  line-height: 1.75;
}

/* CTA */

.cta {
  padding: 3rem 2rem;
  margin: 2rem 0 0;
  border: 1px solid rgba(82, 102, 113, 0.2);
  background: rgba(209, 193, 177, 0.35);
  text-align: center;
}

.cta p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--color-slate);
  max-width: 36rem;
  margin-inline: auto;
}

.cta a {
  font-weight: 600;
}

/* Contact page */

.contact-details {
  padding: 2.5rem 0;
}

.contact-card {
  padding: 2.5rem;
  border: 1px solid rgba(82, 102, 113, 0.2);
  background: rgba(209, 193, 177, 0.3);
  max-width: 28rem;
}

.contact-card p {
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem !important;
}

.contact-card__alt {
  color: rgba(82, 102, 113, 0.75);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem !important;
}

.contact-card__people {
  margin-bottom: 1.25rem !important;
  font-style: italic;
  color: var(--color-slate);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-call {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--color-slate);
  color: var(--color-beige);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--color-slate);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-call:hover {
  background-color: transparent;
  color: var(--color-slate);
}

.btn-email {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: transparent;
  color: var(--color-slate);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--color-slate);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-email:hover {
  background-color: var(--color-slate);
  color: var(--color-beige);
}

.contact-note {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  border-left: 3px solid var(--color-slate);
  background: rgba(209, 193, 177, 0.35);
}

.contact-note p {
  margin: 0;
  color: var(--color-slate);
}

/* Internal links section */

.related-links {
  padding: 2rem 0 0;
}

.related-links h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.related-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.related-links a {
  font-size: 0.9375rem;
}

/* Footer */

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2.5rem;
  background-color: var(--color-slate);
  color: var(--color-beige);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand p {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-brand__name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-beige);
  margin-bottom: 0.75rem !important;
}

.footer-brand a {
  color: var(--color-beige);
  text-decoration: none;
}

.footer-brand a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-nav h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-beige);
  margin: 0 0 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--color-beige);
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(209, 193, 177, 0.25);
  font-size: 0.8125rem;
  color: rgba(209, 193, 177, 0.75);
  text-align: center;
}

/* 404 */

.error-page {
  padding: 5rem 0;
  text-align: center;
}

.error-page h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
}

.error-page p {
  color: rgba(82, 102, 113, 0.85);
  margin: 0 0 2rem;
}

/* Decorative line */

.deco-line {
  width: 3rem;
  height: 2px;
  background-color: var(--color-slate);
  margin-bottom: 1.5rem;
}

/* Responsive */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-beige);
    border-bottom: 1px solid rgba(82, 102, 113, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.is-open {
    max-height: 24rem;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(82, 102, 113, 0.15);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 0.875rem 0;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    position: relative;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-card {
    padding: 1.75rem;
  }

  .contact-actions {
    flex-direction: column;
  }

  .btn-call,
  .btn-email {
    text-align: center;
  }
}

@media (min-width: 769px) {
  .main-nav {
    max-height: none !important;
    overflow: visible;
  }
}
