* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand: Italian warmth + modern AI — flat, no gradients */
  --brand-saffron: #fbbf24;
  --brand-terracotta: #f97316;
  --brand-wine: #be123c;
  --brand-cream: #fde68a;
  --brand-night: #0c1429;
  --brand-night-2: #131b35;

  --accent: var(--brand-saffron);
  --accent-hover: var(--brand-terracotta);
  --text: #faf8f3;
  --muted: rgba(250, 248, 243, 0.62);
  --muted-strong: rgba(250, 248, 243, 0.85);
  --error: #ef4444;
  --warning: #f59e0b;

  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);

  --radius: 18px;
  --radius-sm: 12px;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--brand-night);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

a { color: inherit; }
button { font-family: inherit; }

/* Layout */
.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 32px 22px 48px;
  padding-top: max(32px, env(safe-area-inset-top));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 32px;
  padding-top: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-text-accent {
  color: var(--brand-saffron);
}

h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 14px;
  color: var(--text);
}

@media (min-width: 480px) {
  h1 { font-size: 38px; }
}

h1 .accent { color: var(--brand-saffron); }

.tagline {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 440px;
  margin: 0 auto;
}

.tagline strong {
  color: var(--text);
  font-weight: 600;
}

/* View / Card */
.view {
  margin-bottom: 16px;
}

.view.hidden { display: none; }

.auth-card {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.text-center { text-align: center; }

.card-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--text);
}

.card-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Form */
form { display: flex; flex-direction: column; gap: 14px; }
form.hidden { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input,
.phone-wrap,
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="time"],
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  padding: 14px 16px;
  min-height: 50px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder,
input::placeholder,
textarea::placeholder { color: rgba(250, 248, 243, 0.35); }

.input:focus,
.phone-wrap:focus-within,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-saffron);
  background: rgba(251, 191, 36, 0.06);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Phone wrap with prefix */
.phone-wrap {
  display: flex;
  align-items: stretch;
  padding: 0;
  min-height: 50px;
}

.phone-prefix {
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.phone-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  min-height: 50px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Buttons */
.btn,
button[type="submit"] {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--brand-saffron);
  color: var(--brand-night);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 54px;
  margin-top: 4px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover,
button[type="submit"]:hover {
  background: var(--brand-terracotta);
  color: var(--text);
}

.btn:active,
button[type="submit"]:active { transform: scale(0.99); }

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

.btn-secondary {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--muted-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 6px;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.text-link {
  background: none;
  border: none;
  color: var(--brand-saffron);
  font-size: 14px;
  padding: 0;
  width: auto;
  min-height: 0;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

.link {
  display: inline-block;
  color: var(--brand-saffron);
  text-decoration: none;
  margin-bottom: 14px;
  font-size: 15px;
}

.link-accent {
  color: var(--brand-saffron);
  text-decoration: none;
}

.link-accent:hover { text-decoration: underline; }

/* User bar (in form view) */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
}

.user-bar strong { color: var(--text); font-weight: 600; }

/* Disclaimer */
.disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.55;
}

.disclaimer a {
  color: var(--muted-strong);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
  text-underline-offset: 2px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.55;
}

.hint-small {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
  padding: 0 4px;
}

/* Calling spinner */
.spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-saffron);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 8px auto 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Result box */
.result-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: left;
  margin-bottom: 14px;
  line-height: 1.55;
  font-size: 14px;
  color: var(--text);
}

.result-box.success { border-left: 3px solid var(--brand-saffron); }
.result-box.warning { border-left: 3px solid var(--warning); }
.result-box.failure { border-left: 3px solid var(--error); }

details#result-transcript-wrapper {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
}

details#result-transcript-wrapper summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

details#result-transcript-wrapper pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  color: var(--muted-strong);
  margin: 12px 0 0;
}

/* Meta strip */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.meta-strip svg {
  width: 13px;
  height: 13px;
  color: var(--brand-saffron);
  flex-shrink: 0;
}

.meta-strip .dot {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
  opacity: 0.5;
}

/* SEO sections */
.seo-section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.section-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-saffron);
  font-weight: 700;
  margin-bottom: 10px;
}

.seo-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 12px;
  color: var(--text);
}

@media (min-width: 480px) {
  .seo-section h2 { font-size: 26px; }
}

.seo-section .lead {
  font-size: 15px;
  color: var(--muted-strong);
  line-height: 1.6;
  margin-bottom: 22px;
}

.seo-section .lead strong { color: var(--text); }

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 14px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-saffron);
  color: var(--brand-night);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.step p {
  font-size: 14px;
  color: var(--muted-strong);
  line-height: 1.5;
}

/* Benefits grid */
.benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 480px) {
  .benefits { grid-template-columns: 1fr 1fr; }
}

.benefit {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.benefit-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-saffron);
  margin-bottom: 12px;
}

.benefit-icon svg { width: 14px; height: 14px; }

.benefit h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.benefit p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

details.faq-item {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}

details.faq-item[open] { border-color: var(--border-strong); }

details.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

details.faq-item[open] summary::after { content: '−'; }

details.faq-item p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-strong);
}

details.faq-item p a { color: var(--brand-saffron); }

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.site-footer nav a {
  color: var(--muted-strong);
  text-decoration: none;
  margin: 0 6px;
}

.site-footer nav a:hover { color: var(--text); }

.site-footer .copy {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* Google Places Autocomplete (New) — dark theme */
.place-ac-host { width: 100%; }

gmp-place-autocomplete {
  width: 100%;
  display: block;
  --gmpx-color-surface: var(--brand-night-2);
  --gmpx-color-on-surface: var(--text);
  --gmpx-color-on-surface-variant: var(--muted);
  --gmpx-color-primary: var(--brand-saffron);
  --gmpx-color-outline: var(--border);
  --gmpx-font-family-base: inherit;
  --gmpx-font-size-base: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-height: 50px;
}

gmp-place-autocomplete input,
gmp-place-autocomplete::part(input) {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
  border: none;
  font-family: inherit;
}

gmp-place-autocomplete [role="combobox"] {
  background: transparent !important;
  color: var(--text) !important;
  border: none !important;
}

/* Error message */
#error-message {
  color: var(--error);
}
