:root {
  --color-text: #2b2620;
  --color-text-muted: #6b6255;
  --color-bg: #faf7f2;
  --color-card: #ffffff;
  --color-border: #e4dcd0;
  --color-accent: #c17a52;
  --color-accent-dark: #a3623d;
  --color-accent-secondary: #7c8f5e;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --radius: 18px;
  --radius-sm: 4px;
  --shadow-soft: 0 12px 28px -18px rgba(43, 38, 32, 0.25);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Language toggling */
[data-lang] {
  display: none;
}

html.lang-it [data-lang="it"] {
  display: revert;
}

html.lang-en [data-lang="en"] {
  display: revert;
}

html.lang-it span[data-lang="it"],
html.lang-it a[data-lang="it"],
html.lang-it button[data-lang="it"] {
  display: inline;
}

html.lang-en span[data-lang="en"],
html.lang-en a[data-lang="en"],
html.lang-en button[data-lang="en"] {
  display: inline;
}

a {
  color: var(--color-accent);
}

img {
  max-width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Ruler / tailoring motif */
.ruler-divider {
  height: 1px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--color-border) 0,
    var(--color-border) 1px,
    transparent 1px,
    transparent 16px
  );
}

/* Header */
header.site-header {
  background: var(--color-bg);
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-toggle {
  display: flex;
  gap: 10px;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: #b8ac9a;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.lang-toggle button.active {
  color: var(--color-text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(280px, 80vw);
  background: var(--color-bg);
  box-shadow: var(--shadow-soft);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 50;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}

.drawer .lang-toggle {
  flex-direction: column;
  gap: 14px;
}

.drawer .lang-toggle button {
  font-size: 1rem;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 9px 20px;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-outline-accent {
  display: inline-block;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  padding: 9px 20px;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-outline-accent:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  border-bottom: 1.5px solid var(--color-accent);
  padding-bottom: 3px;
  font-size: 0.95rem;
  transition: color 0.15s ease, border-color 0.15s ease, gap 0.15s ease;
}

.btn-accent::after {
  content: "→";
  transition: transform 0.15s ease;
}

.btn-accent:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn-accent:hover::after {
  transform: translateX(2px);
}

.btn-large {
  font-size: 1.05rem;
}

.btn-small {
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Final CTA inverts the accent link to sit on a solid accent background */
.cta-section .btn-accent {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.7);
}

.cta-section .btn-accent:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
}

.hero .container {
  max-width: 1240px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hero-text {
  max-width: 460px;
  flex-shrink: 0;
}

.hero-image {
  flex: 1;
  min-width: 0;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-text {
    max-width: none;
    width: 100%;
    flex-shrink: 1;
  }

  .hero-image {
    display: none;
  }
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.18;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.hero .subheadline {
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 20px;
}

.hero p.lede {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 0 0 32px;
  max-width: 560px;
}

.hero .container.thank-you-inner {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
}

.thank-you-inner .lede {
  margin-left: auto;
  margin-right: auto;
}

.thank-you-note {
  font-size: 0.9rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 18px;
}

/* Sections */
section {
  padding: 64px 0;
}

section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-lede {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 0 40px;
}

/* Problem / solution */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 720px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.compare-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.compare-card.solution {
  border: 1.5px solid var(--color-accent);
}

.compare-card h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.compare-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text-muted);
}

.compare-card li {
  margin-bottom: 8px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(124, 143, 94, 0.16);
  color: var(--color-accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-card:nth-child(even) .service-icon {
  background: rgba(193, 122, 82, 0.16);
  color: var(--color-accent);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.service-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 880px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-soft);
}

.step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.why-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
}

.why-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

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

/* Final CTA */
.cta-section {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
}

.cta-section h2 {
  max-width: 720px;
  margin: 0 auto 28px;
}

/* Footer */
footer.site-footer {
  background: #f2ece3;
  color: var(--color-text-muted);
  padding: 32px 0;
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Simple content pages (Legal, FAQ, Terms) */
.page-intro {
  padding: 56px 0 24px;
}

.page-intro .container {
  max-width: 720px;
}

.page-intro h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.page-intro .lede {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0;
}

.legal-content {
  padding: 8px 0 64px;
}

.legal-content .container {
  max-width: 720px;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin: 32px 0 10px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p {
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.faq-list {
  padding: 8px 0 64px;
}

.faq-list .container {
  max-width: 720px;
}

.faq-item {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Contact form */
.contact-section {
  max-width: 640px;
}

.contact-form {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  margin-top: 32px;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-row .optional-tag {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  background: #fff;
  color: var(--color-text);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-row textarea {
  min-height: 130px;
  resize: vertical;
}

.form-msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  display: none;
}

.form-msg.error {
  display: block;
  background: rgba(196, 42, 42, 0.1);
  color: #b3261e;
}

.submit-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile header: swap lang/login for a drawer behind a hamburger toggle */
@media (max-width: 560px) {
  .nav-inner {
    padding: 16px 20px;
    flex-wrap: nowrap;
  }

  .brand-logo {
    height: 40px;
  }

  /* Logo already carries the wordmark; drop the duplicate text so the
     Request button and hamburger always fit on the same line. Kept
     accessible to screen readers instead of display:none. */
  .brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-actions {
    gap: 14px;
    margin-left: auto;
  }

  .nav-actions .drawer-only {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
