/* ORTIGIA RENT — Restyle design system */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --black: #0a0a0a;
  --ink: #141414;
  --ink-70: rgba(20, 20, 20, 0.7);
  --ink-55: rgba(20, 20, 20, 0.55);
  --ink-35: rgba(20, 20, 20, 0.35);
  --ink-15: rgba(20, 20, 20, 0.15);
  --ink-08: rgba(20, 20, 20, 0.08);

  --gold: #c79a2d;
  --gold-hover: #b38a25;
  --gold-soft: oklch(0.82 0.09 85);
  --gold-tint: oklch(0.95 0.04 85);

  --terracotta: oklch(0.62 0.12 40);
  --terracotta-tint: oklch(0.94 0.04 50);

  --sand: oklch(0.96 0.015 75);
  --sand-deep: oklch(0.92 0.025 75);
  --paper: #f7f3ee;
  --paper-2: #efe9e0;
  --white: #ffffff;
  --line: rgba(20,20,20,0.10);

  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, sans-serif;

  --radius-card: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(20,20,20,0.04), 0 2px 8px rgba(20,20,20,0.04);
  --shadow-md: 0 8px 24px rgba(20,20,20,0.08), 0 2px 6px rgba(20,20,20,0.04);
  --shadow-lg: 0 24px 60px rgba(20,20,20,0.14), 0 6px 16px rgba(20,20,20,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01','ss02';
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(44px, 6.5vw, 84px); letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 4vw, 52px); }
h3 { font-size: clamp(22px, 2vw, 30px); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.ink { color: var(--ink); opacity: 0.62; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.btn-gold { background: var(--gold); color: #141414; }
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(199,154,45,0.28); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-70); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--sand); }
.btn-lg { padding: 18px 32px; font-size: 13px; }
.btn-sm { padding: 10px 16px; font-size: 12px; }
.btn-block { width: 100%; }

/* Pills / badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sand-deep);
  color: var(--ink);
}
.pill-gold { background: var(--gold); color: #141414; }
.pill-outline { background: transparent; border: 1px solid var(--ink-15); }
.pill-dark { background: var(--ink); color: var(--paper); }
.pill-terracotta { background: var(--terracotta-tint); color: var(--terracotta); }

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-70);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 15px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199,154,45,0.14);
}

/* Layout primitives */
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.section { padding: 100px 0; }
.section-sm { padding: 56px 0; }

.divider-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--gold); display: inline-block; vertical-align: middle; }

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Placeholder bands (for missing imagery) */
.ph {
  background:
    repeating-linear-gradient(135deg, rgba(20,20,20,0.04) 0 10px, rgba(20,20,20,0.07) 10px 20px),
    var(--sand-deep);
  color: var(--ink-55);
  font-family: 'IBM Plex Mono', 'SF Mono', ui-monospace, monospace;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Decorative */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); border: 0; }

/* Sticky top bar tabs (for this mock) */
.page-switcher {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 6px;
  display: flex;
  gap: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.page-switcher button {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  border-radius: 999px;
  transition: all .2s ease;
}
.page-switcher button:hover { color: var(--white); }
.page-switcher button.active { background: var(--gold); color: #141414; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap { gap: 16px; }
.gap-lg { gap: 32px; }
.mt-sm { margin-top: 8px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 40px; }
.mt-xl { margin-top: 72px; }

/* Dark section */
.section-dark {
  background: var(--ink);
  color: var(--paper);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--paper); }
.section-dark .eyebrow { color: var(--gold); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 22px;
  bottom: 90px;
  width: 320px;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(18px);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px;
  z-index: 210;
  font-size: 13px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.tweaks-panel h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}
.tweak-row { margin-bottom: 14px; }
.tweak-row label { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; margin-bottom: 6px; }
.tweak-row select, .tweak-row input[type=range] {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--paper);
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--sans);
}
.tweak-swatches { display: flex; gap: 8px; }
.tweak-swatches button {
  width: 32px; height: 32px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
}
.tweak-swatches button.active { border-color: var(--paper); }

/* Scrollbar tweak inside page container we keep simple */

/* ============================================================
   Responsive — mobile/tablet adaptations for restyle 2026
   ============================================================ */
@media (max-width: 1024px) {
  h1 { font-size: clamp(36px, 5vw, 64px); }
  h2 { font-size: clamp(28px, 3.6vw, 44px); }
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
}

@media (max-width: 900px) {
  /* Stack two-column layouts (checkout / flotta page) */
  [data-restyle="2col"],
  .container-wide > div[style*="grid-template-columns: 1.5fr"],
  .container > div[style*="grid-template-columns: 1.4fr"],
  .container-wide > div[style*="grid-template-columns: 1.4fr"],
  .container-wide > div[style*="grid-template-columns: 1fr 320px"] {
    display: block !important;
  }
  /* Sticky sidebars become inline on mobile */
  aside[style*="sticky"] { position: static !important; margin-top: 24px; }
  /* Form fields full-width */
  .field input, .field select, .field textarea { font-size: 16px; }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(32px, 8vw, 48px); }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .container, .container-wide { padding: 0 16px; }
  .section { padding: 48px 0; }
  .btn, .btn-lg { padding: 14px 20px; font-size: 13px; }
  .btn-lg { padding: 16px 24px; }
  .card { border-radius: 12px; }

  /* Checkout/flotta: card panels lighter padding */
  .card[style*="padding: 40"],
  .card[style*="padding: 36"],
  .card[style*="padding: 28"] { padding: 22px !important; }

  /* Two-col grids → single column */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: repeat(2, 1fr)"],
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 1.5fr 1fr"],
  div[style*="grid-template-columns: 1.4fr 1fr"],
  div[style*="grid-template-columns: 1.5fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Three-col tier cards → single column */
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  /* Four-col fleet cards → 2 columns */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero sections lower padding */
  section[style*="padding-top: 80"] { padding-top: 48px !important; padding-bottom: 36px !important; }

  /* Header navbar collapse — hide center nav on mobile (logo + lang stay) */
  header nav { display: none !important; }
  header > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr auto !important;
  }

  /* Discount bar: stack items */
  div[style*="DISCOUNT"], section[style*="discount"] { font-size: 11px; }

  /* Page switcher: smaller on mobile */
  .page-switcher { padding: 4px; gap: 0; }
  .page-switcher button { padding: 8px 12px; font-size: 10px; }

  /* Stepper: compact */
  div[role="tablist"], div[style*="step-num"] { gap: 4px !important; }

  /* Booking form date picker: smaller calendar grid on mobile */
  div[style*="grid-template-columns: repeat(7, 1fr)"] { gap: 1px; }
}

@media (max-width: 520px) {
  /* Stack everything below 520px */
  div[style*="grid-template-columns: 96px 1fr"],
  div[style*="grid-template-columns: 110px 1fr"] {
    grid-template-columns: 80px 1fr !important;
  }
  /* Vehicle row card: simplify */
  .card[style*="grid-template-columns: 320px 1fr"] {
    display: block !important;
  }
  .card[style*="grid-template-columns: 320px 1fr"] > div:first-child {
    min-height: 200px !important;
  }
  /* Buttons full-width */
  .btn-block, .btn { width: 100%; }
  /* Discount bar wraps */
  div[style*="-5%"] { font-size: 11px; }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
  button, a.btn { min-height: 44px; }
}

/* Native date inputs: armonize visual */
input[type="date"], input[type="time"] {
  font-family: var(--sans) !important;
  color: var(--ink) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  accent-color: #c79a2d !important;
}
input[type="date"]:focus, input[type="time"]:focus {
  border-color: #c79a2d !important;
  box-shadow: 0 0 0 4px rgba(199,154,45,0.14) !important;
  outline: none !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5) sepia(1) saturate(5) hue-rotate(15deg);
  cursor: pointer;
}
