/* iOutlet Apple Design System — CSS Variables & Base
   Loaded sitewide. All page-specific styles in io-*.css files. */

:root {
  --io-black:        #000000;
  --io-near-black:   #1d1d1f;
  --io-gray-bg:      #f5f5f7;
  --io-white:        #ffffff;
  --io-blue:         #0071e3;
  --io-blue-link:    #0066cc;
  --io-blue-bright:  #2997ff;
  --io-green:        #34c759;
  --io-orange:       #ff9f0a;
  --io-text-2:       rgba(0, 0, 0, 0.56);
  --io-text-3:       rgba(0, 0, 0, 0.58); /* a11y AA: was 0.40 (~3.32:1 vs #f5f5f7), now ~5:1 */
  --io-text-light-2: rgba(255, 255, 255, 0.72);
  --io-gray-sub:     #6e6e73; /* AA-compliant tertiary text on light bgs (~4.6:1 vs #f5f5f7, ~5:1 vs #fff) */
  --io-nav-bg:       rgba(0, 0, 0, 0.82);
  --io-surface-d:    #1c1c1e;
  --io-surface-d2:   #2c2c2e;
  --font: -apple-system, BlinkMacSystemFont, "DM Sans", "SF Pro Text", "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "DM Sans", "SF Pro Display", "Helvetica Neue", sans-serif;

  /* Shadows */
  --io-shadow-xs: 0 1px 4px rgba(0,0,0,0.06);
  --io-shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --io-shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --io-shadow-lg: 0 20px 60px rgba(0,0,0,0.13);
  --io-shadow-xl: 0 40px 100px rgba(0,0,0,0.16);

  /* Border radii */
  --io-r-sm:  8px;
  --io-r-md:  14px;
  --io-r-lg:  20px;
  --io-r-xl:  28px;
  --io-r-2xl: 40px;
}

body {
  font-family: var(--font) !important;
  color: var(--io-near-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 44px; /* fixed header offset */
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  scrollbar-gutter: stable; /* reserve scrollbar space — prevents text touching scrollbar */
}

*, *::before, *::after { box-sizing: border-box; }

/* ── Shared buttons ── */
.io-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--io-blue);
  color: var(--io-white) !important;
  border-radius: 980px;
  border: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none !important;
  letter-spacing: -0.2px;
  transition: background 0.25s, transform 0.25s;
}
.io-btn-primary:hover {
  background: #0077ed;
  transform: scale(1.02);
}

.io-btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--io-blue-bright) !important;
  border: 1px solid rgba(41, 151, 255, 0.4);
  border-radius: 980px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none !important;
  letter-spacing: -0.2px;
  transition: border-color 0.25s, background 0.25s;
}
.io-btn-outline:hover {
  border-color: var(--io-blue-bright);
  background: rgba(41, 151, 255, 0.08);
}

/* ── Animations ── */
/* 10 Set 2026 — sem fade de opacidade: o Chrome exclui do LCP qualquer elemento
   que entre com opacity:0, e o h1 do hero (o maior texto do ecrã) nunca contava.
   O PSI media o LCP no banner de cookies (7,5 s) e o Lighthouse local nem
   encontrava LCP. Fica o movimento; o texto pinta visível desde o 1.º frame. */
@keyframes io-fadeInUp {
  from { transform: translateY(24px); }
  to   { transform: translateY(0); }
}
@keyframes io-fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes io-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
@keyframes io-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Lazy load placeholder ── */
img.lazyload,
img.lazyloading {
  background: linear-gradient(90deg,
    var(--io-gray-bg) 25%,
    #ebebed 50%,
    var(--io-gray-bg) 75%);
  background-size: 400% 100%;
  animation: io-shimmer 1.4s ease infinite;
}

/* ── Checkout: social login buttons inside the «Já tem conta?» box ──
   The box is 293px wide on a phone; Klarna's SDK fixes its button at 335px (:host). */
body.woocommerce-checkout form.woocommerce-form-login .nsl-container-buttons {
  width: 100%;
  max-width: 335px;
}
body.woocommerce-checkout #klarna-identity-button > * {
  display: block;
  width: 100% !important;
}
