/* Studio Di Mare — base styles (loaded after fonts) */

:root {
  --offwhite: #EFEFEF;
  --sand:     #E5E5E2;
  --sand-2:   #D8D6D1;
  --terracotta: #866D51;
  --terracotta-deep: #6D5740;
  --blue:     #112131;
  --blue-deep:#0A1620;
  --charcoal: #0A1620;
  --ink:      #1A1A1A;
  --muted:    #5E5A52;
  --hairline: rgba(17,33,49,.16);
  --hairline-light: rgba(239,239,239,.22);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:  'Inter', 'Manrope', system-ui, -apple-system, sans-serif;

  --container: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* When tweaks change tokens, the prototype root re-reads them */
.sdm-root {
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--sans);
}

/* ── Type ─────────────────────────────────── */
.sdm-serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.sdm-eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  font-weight: 500;
  color: var(--terracotta);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.015em; line-height: 1.05; }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────── */
.sdm-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 56px;
}
.sdm-section { padding: 140px 0; }
.sdm-section--tight { padding: 96px 0; }

/* ── Buttons ──────────────────────────────── */
.sdm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 32px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
  white-space: nowrap;
}
.sdm-btn--primary { background: var(--terracotta); color: var(--offwhite); }
.sdm-btn--primary:hover { background: var(--terracotta-deep); }
.sdm-btn--ghost-light {
  background: transparent;
  color: var(--offwhite);
  border: 1px solid rgba(245,242,237,.55);
}
.sdm-btn--ghost-light:hover { background: rgba(245,242,237,.1); border-color: var(--offwhite); }
.sdm-btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.sdm-btn--ghost-dark:hover { background: var(--ink); color: var(--offwhite); border-color: var(--ink); }
.sdm-btn--dark { background: var(--blue); color: var(--offwhite); }
.sdm-btn--dark:hover { background: var(--blue-deep); }

/* ── Hairlines ────────────────────────────── */
.sdm-rule { height: 1px; background: var(--hairline); border: 0; }
.sdm-rule--light { background: var(--hairline-light); }

/* ── Reveal animation ─────────────────────── */
.sdm-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1);
}
.sdm-reveal.is-visible { opacity: 1; transform: none; }

/* ── Form ─────────────────────────────────── */
.sdm-input {
  width: 100%;
  height: 54px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(245,242,237,.3);
  color: var(--offwhite);
  font-family: var(--sans);
  font-size: 14px;
  padding: 0 4px;
  outline: none;
  transition: border-color .25s ease;
}
.sdm-input:focus { border-bottom-color: var(--terracotta); }
.sdm-input::placeholder { color: rgba(245,242,237,.4); }

.sdm-input--dark {
  border-bottom-color: var(--hairline);
  color: var(--ink);
}
.sdm-input--dark::placeholder { color: rgba(26,26,26,.35); }

/* WhatsApp floating */
.sdm-wa-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(37,211,102,.35);
  transition: transform .2s ease;
}
.sdm-wa-fab:hover { transform: scale(1.05); }

/* MOBILE-specific tweaks scoped via container query analogue (we'll set
   .sdm-root[data-vw="mobile"] when rendered in the mobile frame) */
.sdm-root[data-vw="mobile"] .sdm-container { padding: 0 24px; }
.sdm-root[data-vw="mobile"] .sdm-section   { padding: 80px 0; }
.sdm-root[data-vw="mobile"] .sdm-btn       { height: 52px; padding: 0 22px; font-size: 11px; }

/* ── REAL MOBILE (smartphones reais, < 768px) ──────────────── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .sdm-root, .sdm-root * { max-width: 100%; }

  .sdm-container { padding: 0 22px; }
  .sdm-section { padding: 72px 0; }
  .sdm-section--tight { padding: 56px 0; }

  .sdm-serif, h1, h2, h3 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  h1 { font-size: clamp(40px, 11vw, 64px) !important; line-height: 1.02 !important; }
  h2 { font-size: clamp(32px, 8vw, 48px) !important; line-height: 1.08 !important; }
  h3 { font-size: clamp(22px, 6vw, 32px) !important; line-height: 1.15 !important; }

  .sdm-btn {
    height: 52px;
    padding: 0 20px;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .sdm-btn-row, [class*="sdm-cta"] {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 12px;
  }
  .sdm-btn-row .sdm-btn, [class*="sdm-cta"] .sdm-btn { width: 100%; }

  img, video, picture, svg { max-width: 100%; height: auto; }

  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  .sdm-wa-fab { width: 50px; height: 50px; right: 16px; bottom: 16px; }
  .sdm-input { font-size: 16px; }
}

@media (max-width: 380px) {
  .sdm-container { padding: 0 18px; }
  h1 { font-size: clamp(34px, 10vw, 44px) !important; }
}

/* Hide native scrollbars inside artboards (already done by design canvas) */
