/* FT Inversiones — page-specific layout, one-page marketing site.
   Design-system tokens/components come from tokens.css; this file holds
   this page's structure, its dark-ground override, and its button-radius
   exception. Tweak freely without touching tokens.css. */

:root {
  /* Page ground — light (default). Dark values are introduced below;
     they are not part of the base design system. */
  --page-bg: var(--color-bg);
  --page-text: var(--color-text);
  --page-divider: var(--color-divider);
  --wa-link-color: #238a45;
  --eyebrow-color: var(--color-accent-700);
  --accent-callout: var(--color-accent-700);
}

/* Theme is CSS-only, no JS/localStorage: prefers-color-scheme sets the
   default, and the hidden #theme-switch checkbox in .nav-toggles flips
   it relative to whatever that default is (":checked" means "invert the
   OS choice" in each branch below). Trade-off: the manual override does
   not survive a reload — each load just follows the OS preference again. */
/* Scoped to :root (not #ft-app) so --page-bg etc. cascade to html/body too —
   otherwise only #ft-app's own background turns dark and the native browser
   chrome (mobile overscroll gutter, theme-color heuristics) stays light.
   :has() still finds the checkbox fine since it matches descendants at any
   depth, not just direct children. */
@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: var(--color-accent-900);
    --page-text: #f2f2f3;
    --page-divider: color-mix(in srgb, #f2f2f3 20%, transparent);
    --wa-link-color: #3ddc74;
    --eyebrow-color: var(--color-accent-300);
    --accent-callout: var(--color-accent-300);
  }
  :root:has(#theme-switch:checked) {
    --page-bg: var(--color-bg);
    --page-text: var(--color-text);
    --page-divider: var(--color-divider);
    --wa-link-color: #238a45;
    --eyebrow-color: var(--color-accent-700);
    --accent-callout: var(--color-accent-700);
  }
}
@media not (prefers-color-scheme: dark) {
  :root:has(#theme-switch:checked) {
    --page-bg: var(--color-accent-900);
    --page-text: #f2f2f3;
    --page-divider: color-mix(in srgb, #f2f2f3 20%, transparent);
    --wa-link-color: #3ddc74;
    --eyebrow-color: var(--color-accent-300);
    --accent-callout: var(--color-accent-300);
  }
}

html, body { margin: 0; }
html, body { background: var(--page-bg); }
body { color: var(--page-text); }

/* — brand exception colors — */
:root {
  --brand-logo-red: #d81f26;
  --brand-whatsapp: #2fa953;
}

#ft-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--page-text);
  transition: background 0.3s, color 0.3s;
}

/* — header / nav — */
.site-nav {
  flex: none;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 14px 4vw;
  border-bottom: 1px solid var(--page-divider);
}

.logo-mark {
  width: 42px; height: 42px; flex: none;
  background: var(--brand-logo-red);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; padding: 2px 0;
}
.logo-mark .logo-ft {
  font-family: Arial, sans-serif; font-weight: 700; font-size: 22px; color: #fff; letter-spacing: 0;
}
.logo-mark .logo-sub {
  font-family: Arial, sans-serif; font-weight: 700; font-size: 5px; letter-spacing: 0.02em; color: #fff; margin-top: 1px;
}
.nav-brand { margin-left: 10px; }

.nav-contacts {
  display: flex; align-items: center; gap: 16px; font-size: 13px; flex-wrap: wrap;
}
.nav-contacts a { color: inherit; display: flex; align-items: center; gap: 6px; }
.nav-contacts a svg { flex: none; }
.nav-whatsapp-link { color: var(--wa-link-color); font-weight: 600; }
.contact-short { display: none; }

/* — theme + language controls, grouped into one bordered segmented pill — */
.nav-toggles {
  display: flex; align-items: stretch;
  margin-left: 16px; flex: none;
  border: 1px solid var(--page-divider); border-radius: var(--radius-md);
  overflow: hidden;
}

.theme-switch-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; pointer-events: none;
}
.theme-switch-input:focus-visible ~ .icon-btn {
  outline: 2px solid var(--color-accent); outline-offset: -2px;
}

.icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 32px;
  background: transparent; border: none; color: var(--page-text);
  cursor: pointer; padding: 0;
}
.icon-btn svg { position: absolute; }
.theme-switch-input ~ .icon-btn svg[data-theme-icon="sun"] { display: none; }
.theme-switch-input:checked ~ .icon-btn svg[data-theme-icon="moon"] { display: none; }
.theme-switch-input:checked ~ .icon-btn svg[data-theme-icon="sun"] { display: block; }
@media (prefers-color-scheme: dark) {
  .theme-switch-input ~ .icon-btn svg[data-theme-icon="moon"] { display: none; }
  .theme-switch-input ~ .icon-btn svg[data-theme-icon="sun"] { display: block; }
  .theme-switch-input:checked ~ .icon-btn svg[data-theme-icon="sun"] { display: none; }
  .theme-switch-input:checked ~ .icon-btn svg[data-theme-icon="moon"] { display: block; }
}

.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; border-left: 1px solid var(--page-divider);
  color: var(--page-text);
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  font-family: var(--font-heading); font-weight: 600; font-size: 14px; cursor: pointer;
}

/* — main / hero — */
main {
  flex: 1; display: flex; flex-direction: column;
  padding: 0 4vw; overflow: auto; min-height: 0;
}

#ft-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 16px 0;
}
.hero-copy {
  min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-eyebrow {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--eyebrow-color); margin-bottom: 6px;
}
.hero-headline { font-size: clamp(20px, 2.6vw, 32px); margin: 0 0 8px; }
.hero-subhead {
  font-size: 12.5px; line-height: 1.4; max-width: 480px; margin: 0 0 10px; opacity: 0.85;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-media {
  min-height: 0; height: 100%; max-height: 100%;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-whatsapp); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md); border: 1px solid var(--brand-whatsapp);
  text-decoration: none;
}

/* — offerings + why-us — */
#ft-grids {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  flex: none;
  padding: 8px 0 22px;
  border-top: 1px solid var(--page-divider);
}
#ft-grids > div { padding-top: 18px; }
#ft-grids h6 { color: var(--accent-callout); margin-bottom: 12px; }

.offerings-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.offerings-grid .card-title { font-size: 15px; }

.trust-list { display: flex; flex-direction: column; gap: 10px; }
.trust-item {
  display: flex; gap: 8px; font-size: 13px; align-items: baseline;
}
.trust-item .plus {
  color: var(--accent-callout); font-family: var(--font-heading); font-weight: 600;
}
.trust-item strong::after { content: ":"; }

/* — footer — */
.site-footer {
  flex: none;
  padding: 10px 4vw;
  border-top: 1px solid var(--page-divider);
  font-size: 12px; opacity: 0.65;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* — button radius exception: this project uses rounded buttons —
     the design system default (square, in tokens.css) is overridden here. — */
.btn { border-radius: var(--radius-md); }

/* — no-scroll desktop layout vs. natural mobile flow — */
@media (min-width: 900px) {
  #ft-app { height: 100vh; overflow: hidden; }
}
@media (max-width: 899px) {
  #ft-app { height: auto; }
  .nav-brand { display: none; }
  .contact-full { display: none; }
  .contact-short { display: inline; }
  .nav-toggles { margin-left: auto; }
  #ft-hero { grid-template-columns: 1fr !important; flex: none !important; overflow: visible !important; }
  .hero-media { height: auto !important; aspect-ratio: 4 / 3; }
  #ft-grids { grid-template-columns: 1fr !important; }
  .offerings-grid { grid-template-columns: 1fr !important; }
  main { overflow: visible !important; }
}
