/* Fernandez Advisory marketing site. Apple-inspired, plain CSS. */

:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --hairline: #d2d2d7;
  --dark-bg: #000000;
  --dark-text: #f5f5f7;
  --dark-2: #86868b;
  --dark-card: #1d1d1f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--link);
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Layout helpers */
.wrap {
  width: min(980px, calc(100% - 32px));
  margin-inline: auto;
}

.wrap-wide {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

.section {
  padding: 72px 0;
  scroll-margin-top: 60px;
}

@media (min-width: 735px) {
  .section {
    padding: 120px 0;
  }
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head p {
  margin-top: 16px;
  font-size: 21px;
  color: var(--dark-2);
}

.section-dark .section-head p {
  color: var(--dark-2);
}

.section-alt .section-head p,
.section-head .lede {
  color: var(--text-2);
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  color: inherit;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.eyebrow {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
}

.eyebrow-gradient {
  font-size: 17px;
  font-weight: 600;
  background: linear-gradient(90deg, #2997ff, #bf5af2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (forced-colors: active) {
  .eyebrow-gradient {
    background: none;
    color: CanvasText;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* Focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sticky translucent nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 48px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(980px, calc(100% - 32px));
  margin-inline: auto;
}

.brand {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 13px;
  color: var(--text);
  opacity: 0.8;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 733px) {
  .site-header {
    height: auto;
  }
  .nav-inner {
    height: 48px;
  }
  .nav-links {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    height: 36px;
    padding: 0 16px;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--hairline);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.72);
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .section {
    scroll-margin-top: 92px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header,
  .nav-links {
    background: #fff;
  }
}

.pill-sm {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
  background: var(--accent);
  border-radius: 980px;
  text-decoration: none;
  white-space: nowrap;
}

.pill-sm:hover {
  background: var(--accent-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.2;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 980px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:active,
.pill-sm:active {
  transform: scale(0.97);
}

.link-more {
  display: inline-block;
  font-size: 17px;
  color: var(--link);
  text-decoration: none;
}

.link-more:hover {
  text-decoration: underline;
}

.section-dark .link-more {
  color: #2997ff;
}

/* Hero */
.hero {
  padding: 72px 0 72px;
  text-align: center;
}

@media (min-width: 735px) {
  .hero {
    padding: 120px 0 96px;
  }
}

.hero h1 {
  margin-top: 16px;
}

.hero-sub {
  max-width: 680px;
  margin: 24px auto 0;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
}

/* Decorative dashboard */
.dash {
  max-width: 880px;
  margin: 72px auto 0;
  padding: 0;
}

.dash-panel {
  background: var(--bg-alt);
  border-radius: 32px;
  padding: clamp(16px, 4vw, 40px);
}

.dash-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  padding: clamp(18px, 4vw, 36px);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi {
  background: var(--bg-alt);
  border-radius: 18px;
  padding: 20px;
  text-align: left;
  min-width: 0;
}

.kpi-label {
  min-height: 2.6em;
  font-size: 13px;
  color: var(--text-2);
}

.kpi-value {
  margin-top: 6px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi svg {
  width: 100%;
  height: 56px;
  margin-top: 12px;
}

.dash-caption {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}

/* Cards (services) */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 733px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 28px;
  }
  .tile {
    padding: 28px !important;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 28px;
  padding: 40px;
  min-width: 0;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 0.3s ease;
  }

  .card:hover {
    transform: translateY(-4px);
  }
}

.card-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--link);
}

.card h3 {
  margin-top: 12px;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.card-body {
  margin-top: 16px;
  color: var(--text-2);
}

.check-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-list svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--text);
}

.card .link-more {
  margin-top: auto;
  padding-top: 28px;
}

.note {
  margin-top: 40px;
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 733px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.step-num {
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  color: var(--dark-2);
}

.step h3 {
  margin-top: 16px;
}

.step p {
  margin-top: 12px;
  color: var(--text-2);
}

/* 219 Ledger (dark) */
.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 733px) {
  .ledger-grid {
    grid-template-columns: 1fr;
  }
}

.tile {
  background: var(--dark-card);
  border-radius: 18px;
  padding: 36px;
  min-width: 0;
}

.tile h3 {
  color: var(--dark-text);
}

.tile p {
  margin-top: 10px;
  color: var(--dark-2);
}

.ledger-note {
  margin-top: 40px;
  font-size: 14px;
  color: var(--dark-2);
  text-align: center;
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

@media (max-width: 733px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.why-grid h3 {
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.why-grid p {
  margin-top: 12px;
  color: var(--text-2);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 733px) {
  .about {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.about h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.02em;
}

.about p {
  margin-top: 20px;
  font-size: 19px;
  color: var(--text-2);
}

/* Final CTA */
.cta {
  text-align: center;
}

.cta p.cta-sub {
  margin-top: 16px;
  font-size: 21px;
  color: var(--text-2);
}

.cta .btn {
  margin-top: 32px;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin-top: 28px;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  color: #515154;
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-size: 12px;
}

.footer-copy p + p {
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
}

.footer-links a {
  color: #515154;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* 404 */
.notfound {
  padding: 120px 0;
  text-align: center;
}

.notfound p {
  margin-top: 20px;
  font-size: 21px;
  color: var(--text-2);
}

.notfound .btn {
  margin-top: 32px;
}

/* Scroll reveal: only hidden when JS runs AND motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}
