/* ============================================
   Primi Sapori — Auth & Public pages CSS
   Stessa estetica dell'app v2
   ============================================ */

:root {
  --cream: #F5EFE6;
  --cream-soft: #FBF8F2;
  --cream-warm: #EDE3D2;
  --cream-dark: #DDD0BC;
  --terracotta: #C97D5D;
  --terracotta-dark: #A85F44;
  --terracotta-soft: #E5B7A3;
  --sage: #7C9885;
  --sage-dark: #5E7C68;
  --sage-soft: #B8CDBE;
  --amber: #E8A44C;
  --amber-dark: #C6832E;
  --rust: #B84A39;
  --rust-dark: #913828;
  --brown: #3D2E24;
  --brown-soft: #5C4737;
  --brown-muted: #8B7565;
  --brown-light: #B5A393;
  --divider: rgba(61, 46, 36, 0.12);
  --divider-strong: rgba(61, 46, 36, 0.18);

  --shadow-sm: 0 1px 2px rgba(61, 46, 36, 0.05), 0 1px 3px rgba(61, 46, 36, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(61, 46, 36, 0.06), 0 2px 4px -2px rgba(61, 46, 36, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(61, 46, 36, 0.1);
  --shadow-xl: 0 20px 40px -10px rgba(61, 46, 36, 0.18);

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Manrope', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(201, 125, 93, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(124, 152, 133, 0.05) 0%, transparent 40%);
}

img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-dark); text-decoration: underline; }

/* ========== HEADER ========== */
.site-header {
  padding: 20px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brown);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--terracotta);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(201, 125, 93, 0.3);
}
.brand-mark::after {
  content: '';
  position: absolute;
  top: 8px; left: 13px;
  width: 13px; height: 13px;
  background: var(--cream);
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  font-style: italic;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 100;
}
.brand-name em { font-style: normal; font-weight: 600; }

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  color: var(--brown-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--terracotta); text-decoration: none; }

.btn-cta {
  background: var(--terracotta);
  color: var(--cream-soft) !important;
  padding: 10px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(201, 125, 93, 0.25);
}
.btn-cta:hover {
  background: var(--terracotta-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ========== AUTH CARD ========== */
.auth-wrapper {
  max-width: 460px;
  margin: 30px auto 60px;
  padding: 0 20px;
}

.auth-card {
  background: var(--cream-soft);
  border-radius: var(--radius-xl);
  padding: 32px 30px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--divider);
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
  font-variation-settings: 'SOFT' 50;
}
.auth-title em { font-style: italic; font-variation-settings: 'SOFT' 100; }

.auth-subtitle {
  color: var(--brown-muted);
  font-size: 14px;
  margin-bottom: 26px;
}

/* ========== FORMS ========== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--cream);
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--brown);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(201, 125, 93, 0.12);
}
.form-input::placeholder { color: var(--brown-light); }

/* Password toggle wrapper */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  color: var(--brown-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}
.password-toggle:hover {
  color: var(--terracotta);
  background: var(--cream-warm);
}
.password-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}
.password-toggle .eye-closed { display: none; }
.password-toggle.revealed .eye-open { display: none; }
.password-toggle.revealed .eye-closed { display: block; }

.form-hint {
  font-size: 12px;
  color: var(--brown-muted);
  margin-top: 5px;
  line-height: 1.4;
}

.form-error {
  background: rgba(184, 74, 57, 0.08);
  border: 1px solid rgba(184, 74, 57, 0.3);
  color: var(--rust-dark);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}

.form-success {
  background: rgba(124, 152, 133, 0.1);
  border: 1px solid rgba(124, 152, 133, 0.3);
  color: var(--sage-dark);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}

.form-info {
  background: rgba(232, 164, 76, 0.08);
  border: 1px solid rgba(232, 164, 76, 0.3);
  color: var(--amber-dark);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--brown-soft);
}
.checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  width: 18px; height: 18px;
  accent-color: var(--terracotta);
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-row label { cursor: pointer; }
.checkbox-row a { color: var(--terracotta); font-weight: 600; }

/* ========== BUTTONS ========== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--terracotta);
  color: var(--cream-soft);
  border: none;
  border-radius: 13px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--terracotta-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: var(--cream);
  color: var(--brown);
  border: 1px solid var(--divider-strong);
  border-radius: 13px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-secondary:hover {
  background: var(--cream-warm);
  border-color: var(--brown-muted);
  text-decoration: none;
}

.btn-google {
  width: 100%;
  padding: 13px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 13px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn-google:hover {
  background: #f8f9fa;
  border-color: #c2c5c9;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(60,64,67,0.08);
  color: #202124;
}
.btn-google svg { flex-shrink: 0; }

/* ========== DIVIDER ========== */
.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--brown-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.divider-or::before, .divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ========== AUTH LINKS ========== */
.auth-footer {
  text-align: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--brown-muted);
}
.auth-footer a {
  color: var(--terracotta);
  font-weight: 700;
}

.small-link {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 16px;
  font-size: 12px;
}
.small-link a { color: var(--brown-muted); font-weight: 500; }
.small-link a:hover { color: var(--terracotta); }

/* ========== LANDING SPECIFIC ========== */
.hero {
  max-width: var(--max-w);
  margin: 40px auto;
  padding: 0 24px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--sage-soft);
  color: var(--sage-dark);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-variation-settings: 'SOFT' 50;
}
.hero-title em {
  font-style: italic;
  color: var(--terracotta);
  font-variation-settings: 'SOFT' 100;
}

.hero-sub {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--brown-soft);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.55;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.btn-hero {
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero.primary {
  background: var(--brown);
  color: var(--cream-soft);
  box-shadow: 0 6px 16px rgba(61, 46, 36, 0.25);
}
.btn-hero.primary:hover {
  background: var(--brown-soft);
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-hero.secondary {
  background: var(--cream-soft);
  color: var(--brown);
  border: 1px solid var(--divider-strong);
}
.btn-hero.secondary:hover {
  background: var(--cream-warm);
  text-decoration: none;
}

/* Features */
.features {
  max-width: var(--max-w);
  margin: 60px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--cream-soft);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  border: 1px solid var(--divider);
  transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-desc {
  color: var(--brown-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ========== FOOTER ========== */
.site-footer {
  max-width: var(--max-w);
  margin: 60px auto 0;
  padding: 32px 24px;
  border-top: 1px solid var(--divider);
  text-align: center;
  font-size: 12px;
  color: var(--brown-muted);
  line-height: 1.8;
}
.site-footer a {
  color: var(--brown-soft);
  margin: 0 8px;
  font-weight: 600;
}

/* ========== STATIC PAGES (privacy, terms) ========== */
.static-page {
  max-width: 760px;
  margin: 20px auto 60px;
  padding: 0 24px;
}
.static-page h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  font-variation-settings: 'SOFT' 50;
}
.static-page .updated {
  font-size: 13px;
  color: var(--brown-muted);
  margin-bottom: 30px;
  font-style: italic;
}
.static-page h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--brown);
  letter-spacing: -0.01em;
}
.static-page h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown-muted);
  margin-top: 24px;
  margin-bottom: 8px;
}
.static-page p {
  margin-bottom: 14px;
  line-height: 1.65;
  color: var(--brown-soft);
}
.static-page ul, .static-page ol {
  margin: 12px 0 18px 24px;
  line-height: 1.7;
  color: var(--brown-soft);
}
.static-page li { margin-bottom: 6px; }
.static-page strong { color: var(--brown); }

.note-box {
  background: var(--cream-soft);
  border-left: 4px solid var(--terracotta);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: var(--radius-md);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .site-header { padding: 16px 20px; }
}
