/* Liquid Glass — MF Martínez Fernández */

:root {
  --bg-deep: #0a0e17;
  --bg-mid: #121a28;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --text-primary: #f4f6fa;
  --text-muted: rgba(244, 246, 250, 0.62);
  --accent: #6eb5ff;
  --accent-soft: rgba(110, 181, 255, 0.35);
  --gold: #c9a962;
  --radius-lg: 24px;
  --radius-md: 16px;
  --blur: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--text-primary);
  color: var(--bg-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* Ambient canvas */
.liquid-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.liquid-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  will-change: transform;
}

.liquid-blob--1 {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  background: radial-gradient(circle at 30% 30%, #3d6a9e, #1a2f4a 70%);
  top: -12%;
  left: -8%;
  animation: blob-drift-1 28s var(--ease-out) infinite alternate;
}

.liquid-blob--2 {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  background: radial-gradient(circle at 60% 40%, #2a4d6e, #0f1a28);
  bottom: 10%;
  right: -5%;
  animation: blob-drift-2 32s var(--ease-out) infinite alternate;
}

.liquid-blob--3 {
  width: min(35vw, 320px);
  height: min(35vw, 320px);
  background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 65%);
  top: 45%;
  left: 35%;
  animation: blob-drift-3 24s var(--ease-out) infinite alternate;
}

.liquid-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(255, 255, 255, 0.08),
    transparent 55%
  );
}

@keyframes blob-drift-1 {
  to {
    transform: translate(8%, 12%) scale(1.08);
  }
}

@keyframes blob-drift-2 {
  to {
    transform: translate(-10%, -8%) scale(1.05);
  }
}

@keyframes blob-drift-3 {
  to {
    transform: translate(6%, -6%) scale(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-blob {
    animation: none;
  }
}

/* Layout */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glass panel base */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 var(--glass-highlight);
  border-radius: var(--radius-lg);
}

.glass--nav {
  border-radius: 999px;
  padding: 0.65rem 0.65rem 0.65rem 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  padding: 1rem 0 0;
}

.site-header .shell,
.site-header .glass--nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand__sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.55rem 1.1rem !important;
  background: rgba(110, 181, 255, 0.15);
  border: 1px solid rgba(110, 181, 255, 0.35);
  color: var(--text-primary) !important;
}

.nav-cta:hover {
  background: rgba(110, 181, 255, 0.25) !important;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 4.5rem 0 5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero__eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 34ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, rgba(110, 181, 255, 0.9), rgba(70, 130, 200, 0.85));
  color: #0a0e17;
  box-shadow: 0 8px 32px rgba(110, 181, 255, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 12px 40px rgba(110, 181, 255, 0.35);
}

.btn--ghost {
  background: var(--glass);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero__visual {
  position: relative;
  padding: 2rem;
  min-height: 280px;
}

.hero__orb {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(110, 181, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 2px 40px rgba(255, 255, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.35);
  animation: orb-morph 18s var(--ease-out) infinite alternate;
}

@keyframes orb-morph {
  0% {
    border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  }
  100% {
    border-radius: 58% 42% 48% 52% / 42% 58% 42% 58%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb {
    animation: none;
  }
}

.hero__card {
  position: relative;
  padding: 1.75rem;
  max-width: 320px;
  margin: 0 auto;
}

.hero__card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.hero__card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

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

.section__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 500;
  margin: 0 0 1rem;
}

.section__intro {
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 2.5rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-stat {
  padding: 1.5rem 1.75rem;
  transition: transform 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}

.about-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.about-stat__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.about-stat p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Practice areas */
.practices {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .practices {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .practices {
    grid-template-columns: repeat(3, 1fr);
  }
}

.practice-card {
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.45s var(--ease-out), background 0.45s var(--ease-out);
}

.practice-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
}

.practice-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.practice-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.practice-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(110, 181, 255, 0.12);
  border: 1px solid rgba(110, 181, 255, 0.2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0.9;
}

/* Contact */
.contact-wrap {
  display: grid;
  gap: 2rem;
  padding: 2.5rem;
}

@media (min-width: 768px) {
  .contact-wrap {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9375rem;
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-list span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.contact-note--spaced {
  margin-top: 1rem;
}

.contact-note a,
.prose a {
  color: var(--accent);
  text-decoration: none;
}

.contact-note a:hover,
.prose a:hover {
  text-decoration: underline;
}

.section--tight {
  padding-top: 0;
}

.page-hero {
  padding: 3rem 0 2rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.page-hero__lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.35rem;
  opacity: 0.5;
}

.page-content {
  padding-bottom: 4rem;
}

.prose {
  padding: 2rem 2.25rem;
  max-width: 780px;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2rem 0 0.75rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.prose ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0 1rem;
}

.page-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}

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

.footer-inner a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: rgba(18, 26, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
  }

  .nav-links.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .site-header .shell,
  .site-header .glass--nav {
    flex-wrap: wrap;
  }

  .site-header nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}
