/* Inter, self-hosted (SIL OFL 1.1, see fonts/OFL.txt). Same files as trifase-web's
   @fontsource-variable/inter; pt/en/es only need the latin subsets. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Company palette: neutral, so each app's own colors (see .app-card--trifase) stand out. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f4f5f7;
  --line: #e3e5e9;
  --ink: #0f1217;
  --muted: #586070;
  --accent: #0b2237;
  --accent-ink: #ffffff;
  --dot: rgba(15, 18, 23, 0.16);
  --glow: rgba(70, 120, 190, 0.14);
  --mark: rgba(33, 205, 244, 0.3);
  --font-sans: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c0e12;
    --surface: #15181e;
    --line: #262a32;
    --ink: #f1f2f4;
    --muted: #9aa1ad;
    --accent: #f1f2f4;
    --accent-ink: #0c0e12;
    --dot: rgba(241, 242, 244, 0.12);
    --glow: rgba(70, 130, 210, 0.16);
    --mark: rgba(33, 205, 244, 0.32);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  position: relative;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

/* Brand: text wordmark for now. When the logo exists, put an <img class="brand-logo">
   inside .brand (before or instead of .brand-name); the slot already lays it out. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 2rem;
  width: auto;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lang {
  display: flex;
  gap: 0.25rem;
  /* Pull the last link's padding back so its text lines up with the content edge. */
  margin: 0 -0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.lang a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--muted);
  text-decoration: none;
}

.lang a:hover,
.lang a[aria-current='true'] {
  color: var(--ink);
  background: var(--surface);
}

/* Hero: dot grid fading out from the top-left, with a soft glow behind it. */
.hero {
  position: relative;
  padding: 5rem 0 2.5rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: radial-gradient(60rem 28rem at 85% -10%, var(--glow), transparent 70%);
}

.hero::after {
  background-image: radial-gradient(var(--dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000 20%, transparent 75%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
}

.eyebrow::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #21cdf4;
  box-shadow: 0 0 0 3px var(--mark);
}

.hero h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h1 mark {
  color: inherit;
  background: linear-gradient(transparent 62%, var(--mark) 62%, var(--mark) 92%, transparent 92%);
}

.hero-lead {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.apps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* App cards wear their app's own colors, not the company's. */
.app-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 1.75rem;
  isolation: isolate;
}

.app-card-text {
  padding: 2rem 1.5rem 0;
}

@media (min-width: 768px) {
  .app-card {
    grid-template-columns: 1.15fr 1fr;
    min-height: 26rem;
  }

  .app-card-text {
    align-self: center;
    padding: 3rem 0 3rem 3rem;
  }
}

.app-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-icon {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 1.125rem;
}

.app-card h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.app-card-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  opacity: 0.75;
}

.app-card-body {
  max-width: 30rem;
  margin: 1.5rem 0 1.25rem;
  font-size: 1.0625rem;
}

.app-features {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.app-features li {
  display: flex;
  gap: 0.625rem;
  align-items: baseline;
}

.app-features li::before {
  content: '';
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  transform: translateY(-0.1rem);
  background: currentColor;
}

.app-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Phone frame showing the app; the card's overflow crops its bottom. */
.app-card-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 19rem;
  padding-top: 2.5rem;
}

@media (min-width: 768px) {
  .app-card-visual {
    height: auto;
    padding-top: 3.5rem;
  }
}

.phone {
  width: 15rem;
  padding: 0.5rem;
  border-radius: 2.25rem;
  transform: rotate(-4deg);
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-card:hover .phone {
  transform: rotate(-2deg) translateY(-6px);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
}

@media (min-width: 768px) {
  .phone {
    position: absolute;
    top: 3rem;
    width: 17rem;
  }
}

/* TriFase: navy, cyan, and the logo's concentric rings. */
.app-card--trifase {
  color: #ffffff;
  background: #0b2237;
}

.app-card--trifase::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-radial-gradient(circle at 78% 62%, transparent 0 46px, rgba(33, 205, 244, 0.1) 47px 48px),
    radial-gradient(28rem 22rem at 78% 62%, rgba(18, 165, 160, 0.35), transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 78% 62%, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle at 78% 62%, #000 30%, transparent 70%);
}

.app-card--trifase .app-features li::before {
  background: #21cdf4;
}

.app-card--trifase .chip {
  color: #21cdf4;
  background: rgba(33, 205, 244, 0.12);
}

.app-card--trifase .phone {
  background: #1c3248;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.app-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 150ms ease;
}

.app-cta:hover {
  gap: 0.75rem;
}

.app-card--trifase .app-cta {
  color: #0b2237;
  background: linear-gradient(90deg, #21cdf4, #12a5a0);
}

.apps-more {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.apps-more::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 2s ease-in-out infinite;
}

/* Contact */
.contact-panel {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--surface);
}

@media (min-width: 768px) {
  .contact-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 2.5rem 3rem;
  }
}

.contact-panel h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.contact-panel p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.5rem;
  padding: 0.875rem 1.375rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: gap 150ms ease;
}

.button:hover {
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  text-decoration: none;
}

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

/* Motion: content rises in on load, in order of --i. */
.reveal {
  animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .apps-more::before {
    animation: none;
  }

  .phone,
  .app-cta,
  .button {
    transition: none;
  }
}
