:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1b1b1b;
  --muted: #6f6a65;
  --border: #ece8e3;
  --accent: #1b1b1b;
  --accent-text: #ffffff;

  /* Soft Digitals brand, used sparingly */
  --brand: #fc4f1d;
  --brand-gradient: linear-gradient(90deg, #fe9d32, #fc4f1d 55%, #c11f14);
  --glow: rgba(252, 79, 29, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1a1918;
    --text: #f5f3f1;
    --muted: #a39e98;
    --border: #2a2825;
    --accent: #f5f3f1;
    --accent-text: #121110;
    --brand: #fd6b40;
    --glow: rgba(252, 79, 29, 0.10);
  }
}

* { box-sizing: border-box; }

html[data-lang="pt"] .en,
html:not([data-lang="pt"]) .pt { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }

::selection { background: var(--brand); color: #fff; }

a { text-underline-offset: 3px; }

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 720px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 96px;
  width: auto;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}

.lang-toggle button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-text);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.button.ghost {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* Home */
.hero {
  position: relative;
  padding: 88px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -120px;
  right: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 20px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
}

.hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 24px;
  max-width: 820px;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand);
  white-space: nowrap;
}

.hero p.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  margin: 0;
  max-width: 580px;
}

.section { padding: 32px 0 56px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Cards */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: card;
}

.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 24px;
  transition: border-color .2s ease, transform .2s ease;
}

.principle:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  transform: translateY(-2px);
}

.principle::before {
  counter-increment: card;
  content: "0" counter(card);
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 14px;
}

.principle h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-footer .footer-brand img { height: 20px; width: auto; }

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* Policy */
.policy { padding: 24px 0 0; }

.policy h1 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.policy .updated { color: var(--muted); margin: 0 0 32px; }

.policy .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 16px;
  padding: 20px 24px;
  font-weight: 500;
  margin-bottom: 8px;
}

.policy h2 { font-size: 20px; margin: 36px 0 8px; letter-spacing: -0.01em; }
.policy p, .policy li { color: var(--text); }
.policy li { margin-bottom: 8px; }
.policy a { color: inherit; text-decoration-color: var(--brand); }

/* Contact */
.contact {
  position: relative;
  overflow: hidden;
  background: #1b1b1b;
  color: #f5f3f1;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.contact h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.contact p { margin: 0; color: #a39e98; }
.contact .button { background: #f5f3f1; color: #1b1b1b; }

@media (prefers-color-scheme: dark) {
  .contact { background: var(--surface); border: 1px solid var(--border); }
}

@media (max-width: 720px) {
  .section-head { align-items: start; }
  .contact { padding: 28px 24px; }
  .hero { padding: 56px 0 56px; }
  .brand img { height: 68px; }
}

/* Motion */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.12); }
}

@keyframes sweep { to { background-position: -200% 0; } }

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

.site-header { animation: fade .8s ease both; }

.hero .eyebrow,
.hero h1,
.hero .lead { animation: rise .9s var(--ease-out) both; }
.hero h1 { animation-delay: .1s; }
.hero .lead { animation-delay: .2s; }

.hero .eyebrow::before {
  transform-origin: left;
  animation: grow .9s .35s var(--ease-out) both;
}

.hero::before { animation: drift 16s ease-in-out infinite; }

/* Scroll reveal: "backwards" fill so hover transforms work once it has played */
.js-motion .reveal { opacity: 0; }
.js-motion .reveal.is-visible {
  opacity: 1;
  animation: rise .8s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

/* Cards: lift, soft shadow and a spotlight that follows the pointer */
.principle {
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s var(--ease-out), box-shadow .3s ease;
}

.principle:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(27, 27, 27, 0.25);
}

.principle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(252, 79, 29, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.principle:hover::after { opacity: 1; }

.principle::before { transition: letter-spacing .3s var(--ease-out); }
.principle:hover::before { letter-spacing: 0.14em; }

/* Contact: slow sweep along the gradient line */
.contact::after {
  background: linear-gradient(90deg, #fe9d32, #fc4f1d, #c11f14, #fc4f1d, #fe9d32);
  background-size: 200% 100%;
  animation: sweep 8s linear infinite;
}

.button { transition: transform .2s var(--ease-out), box-shadow .2s ease, opacity .2s ease; }
.button:hover { box-shadow: 0 10px 24px -12px rgba(27, 27, 27, 0.4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
