/* ===================================================
   Freelance Experts LLC — Apple Glass Design System
   =================================================== */

:root {
  /* Background scene */
  --scene-bg: #edf6f8;

  /* Glass surfaces. Note: backdrop-filter is the real effect. */
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-bg-subtle: rgba(255, 255, 255, 0.28);
  --glass-border: rgba(255, 255, 255, 0.68);
  --glass-border-subtle: rgba(23, 184, 200, 0.22);

  /* Ink */
  --text: #0a1820;
  --muted: #4a5e68;
  --muted-light: #7a98a8;

  /* Accent — brand teal */
  --accent: #0f9baa;
  --accent-dark: #0a7e8c;
  --accent-soft: rgba(15, 155, 170, 0.10);

  /* Highlight — bright brand teal for eyebrow labels */
  --highlight: #1abccc;

  /* Layered shadows for depth illusion */
  --shadow-sm: 0 2px 8px rgba(10, 20, 60, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  --shadow-md: 0 8px 32px rgba(10, 20, 60, 0.10), 0 1px 2px rgba(10, 20, 60, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.60) inset;
  --shadow-lg: 0 20px 60px rgba(10, 20, 60, 0.14), 0 4px 12px rgba(10, 20, 60, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;

  /* Radii */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  /* Layout */
  --site-width: min(1120px, calc(100vw - 2rem));
}

/* ─── Reset ─────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ─── Background scene ───────────────────────────── */

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  line-height: 1.6;

  /* Soft, cool scene with depth blobs */
  background-color: var(--scene-bg);
  background-image:
    radial-gradient(ellipse 72% 55% at 10% 0%,   rgba(23, 184, 200, 0.20), transparent),
    radial-gradient(ellipse 55% 45% at 92% 8%,   rgba(12, 140, 155, 0.15), transparent),
    radial-gradient(ellipse 50% 60% at 50% 100%,  rgba(23, 184, 200, 0.11), transparent),
    radial-gradient(ellipse 35% 35% at 75% 50%,  rgba(8, 55, 65, 0.08), transparent);
  background-attachment: fixed;
}

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

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ─── Shell / Layout ──────────────────────────────── */

.site-shell {
  width: var(--site-width);
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

/* ─── Navigation ──────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 2rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow-md);
}

.compact-header {
  margin-bottom: 2rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  padding: 2px;
  object-fit: contain;
}

.brand-tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.site-nav a,
.footer-nav a,
.legal-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

/* ─── Glass card mixin (applied to all surfaces) ─── */

.hero-copy,
.hero-panel,
.content-card,
.service-card,
.legal-section,
.page-intro {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-lg);
}

/* ─── Hero ────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.9fr);
  gap: 1.25rem;
  padding: 1rem 0 1rem;
}

.section-grid,
.contact-grid,
.card-grid,
.legal-links,
.footer-nav {
  display: grid;
  gap: 1rem;
}

.hero-copy {
  padding: 3rem 3rem 2.5rem;
}

/* ─── Logo in hero panel ───────────────────────────────────── */

.hero-logo-wrap {
  margin: -1.6rem -1.6rem 1.4rem;
  border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0;
  overflow: hidden;
  background: #0d1f2f;
  line-height: 0;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
}

.hero-panel,
.content-card,
.service-card,
.legal-section,
.page-intro {
  padding: 1.6rem;
}

/* ─── Typography ──────────────────────────────────── */

.hero h1,
.section-heading h2,
.page-intro h1 {
  margin: 0;
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.8vw, 4.4rem);
  max-width: 12ch;
}

.lead {
  font-size: 1.15rem;
  max-width: 56ch;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--highlight);
}

/* ─── CTA buttons ─────────────────────────────────── */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(15, 155, 170, 0.38);
}

.button-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 4px 18px rgba(15, 155, 170, 0.46);
}

.button-secondary {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

/* ─── Lists ───────────────────────────────────────── */

.fact-list,
.process-list,
.legal-section ul {
  margin: 0;
  padding-left: 1.15rem;
}

.fact-list li,
.process-list li,
.legal-section li {
  margin-bottom: 0.8rem;
}

/* ─── Content sections ────────────────────────────── */

.content-section {
  padding: 2.25rem 0 0.5rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 14ch;
}

.prose-block p,
.legal-section p,
.page-intro p,
.note-card p,
.service-card p,
.contact-card p,
.contact-card address {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.prose-block p:last-child,
.legal-section p:last-child,
.page-intro p:last-child,
.note-card p:last-child,
.service-card p:last-child,
.contact-card p:last-child {
  margin-bottom: 0;
}

/* ─── Service cards ────────────────────────────────── */

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 28px 70px rgba(10, 20, 60, 0.18),
    0 4px 14px rgba(10, 20, 60, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.70) inset;
}

/* Subtle iridescent shimmer spot */
.service-card::after {
  content: "";
  position: absolute;
  bottom: -2.5rem;
  right: -2.5rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 68%);
  pointer-events: none;
}

.service-card h3,
.contact-card h3,
.legal-section h2,
.hero-panel h2,
.legal-card h2 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.025em;
}

/* ─── Note / callout card ─────────────────────────── */

.note-card {
  margin-top: 1rem;
  background: var(--accent-soft);
  border-color: rgba(0, 113, 227, 0.18);
}

/* ─── Process list ─────────────────────────────────── */

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  list-style: none;
  padding: 0;
  counter-reset: process-step;
}

.process-list li {
  min-height: 13rem;
  padding: 1.4rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-md);
  counter-increment: process-step;
  transition: transform 0.2s ease;
}

.process-list li:hover {
  transform: translateY(-2px);
}

.process-list li::before {
  content: counter(process-step, decimal-leading-zero);
  display: inline-flex;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--highlight);
  letter-spacing: 0.08em;
}

.process-list strong,
.process-list span {
  display: block;
}

.process-list strong {
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.process-list span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Contact ──────────────────────────────────────── */

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card address {
  font-style: normal;
}

/* ─── Legal CTA ───────────────────────────────────── */

.legal-cta .legal-card {
  display: grid;
  gap: 1rem;
  padding: 2.25rem;
  background:
    linear-gradient(135deg, rgba(230, 248, 250, 0.72), rgba(215, 245, 248, 0.66));
  border-color: var(--glass-border);
}

/* ─── Legal links row ─────────────────────────────── */

.legal-links,
.footer-nav {
  grid-template-columns: repeat(auto-fit, minmax(170px, max-content));
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}

.legal-links a:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ─── Footer ───────────────────────────────────────── */

.site-footer {
  display: grid;
  gap: 0.5rem 1rem;
  padding: 1.8rem 0 0.5rem;
  color: var(--muted-light);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  margin-top: 0.5rem;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ─── Legal pages ──────────────────────────────────── */

.legal-shell {
  padding-bottom: 1rem;
}

.legal-main {
  display: grid;
  gap: 1rem;
}

.page-intro {
  padding: 2.25rem;
}

.page-intro h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  max-width: 12ch;
}

.legal-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ─── Responsive: tablet ────────────────────────────── */

@media (max-width: 900px) {
  .site-header {
    border-radius: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    flex-direction: column;
  }

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

  .site-nav a {
    padding: 0.5rem 0.25rem;
  }

  .hero,
  .card-grid,
  .process-list,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 2rem;
  }

  .process-list li {
    min-height: auto;
  }
}

/* ─── Responsive: mobile ──────────────────────────── */

@media (max-width: 640px) {
  .site-shell {
    width: min(100vw - 1rem, 100%);
  }

  .site-header,
  .hero-copy,
  .hero-panel,
  .content-card,
  .service-card,
  .legal-section,
  .page-intro {
    border-radius: 22px;
  }

  .site-header {
    top: 0.5rem;
    padding: 0.9rem 1rem;
  }

  .hero {
    padding-top: 0.5rem;
  }

  .hero h1,
  .page-intro h1 {
    max-width: none;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-links,
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

/* ─── Theme toggle button ────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: scale(1.09);
}

/* Icon visibility driven by data-theme on <html> — no flash, no JS dependency for initial render */
html[data-theme="light"] .theme-icon-sun  { display: none; }
html[data-theme="dark"]  .theme-icon-moon { display: none; }
html[data-theme="dark"]  .theme-icon-sun  { display: block; }

/* ─── Dark mode: custom properties ───────────────────── */

html[data-theme="dark"] {
  --scene-bg: #071418;
  --glass-bg: rgba(9, 25, 34, 0.65);
  --glass-bg-strong: rgba(12, 32, 44, 0.82);
  --glass-bg-subtle: rgba(9, 25, 34, 0.38);
  --glass-border: rgba(23, 184, 200, 0.18);
  --glass-border-subtle: rgba(23, 184, 200, 0.12);
  --text: #e4f2f5;
  --muted: #6aa0ad;
  --muted-light: #4a7a88;
  --accent: #22cedd;
  --accent-dark: #17b8c8;
  --accent-soft: rgba(34, 206, 221, 0.14);
  --highlight: #5dd9e6;
  --shadow-sm: 0 2px 8px rgba(0, 10, 20, 0.55), 0 0 0 1px rgba(23, 184, 200, 0.08) inset;
  --shadow-md: 0 8px 32px rgba(0, 10, 20, 0.65), 0 1px 2px rgba(0, 10, 20, 0.45), 0 0 0 1px rgba(23, 184, 200, 0.10) inset;
  --shadow-lg: 0 20px 60px rgba(0, 10, 20, 0.75), 0 4px 12px rgba(0, 10, 20, 0.55), 0 0 0 1px rgba(23, 184, 200, 0.12) inset;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --scene-bg: #071418;
    --glass-bg: rgba(9, 25, 34, 0.65);
    --glass-bg-strong: rgba(12, 32, 44, 0.82);
    --glass-bg-subtle: rgba(9, 25, 34, 0.38);
    --glass-border: rgba(23, 184, 200, 0.18);
    --glass-border-subtle: rgba(23, 184, 200, 0.12);
    --text: #e4f2f5;
    --muted: #6aa0ad;
    --muted-light: #4a7a88;
    --accent: #22cedd;
    --accent-dark: #17b8c8;
    --accent-soft: rgba(34, 206, 221, 0.14);
    --highlight: #5dd9e6;
    --shadow-sm: 0 2px 8px rgba(0, 10, 20, 0.55), 0 0 0 1px rgba(23, 184, 200, 0.08) inset;
    --shadow-md: 0 8px 32px rgba(0, 10, 20, 0.65), 0 1px 2px rgba(0, 10, 20, 0.45), 0 0 0 1px rgba(23, 184, 200, 0.10) inset;
    --shadow-lg: 0 20px 60px rgba(0, 10, 20, 0.75), 0 4px 12px rgba(0, 10, 20, 0.55), 0 0 0 1px rgba(23, 184, 200, 0.12) inset;
  }
}

/* ─── Dark mode: background scene ─────────────────────── */

html[data-theme="dark"] body {
  background-color: #071418;
  background-image:
    radial-gradient(ellipse 72% 55% at 10% 0%,   rgba(23, 184, 200, 0.30), transparent),
    radial-gradient(ellipse 55% 45% at 92% 8%,   rgba(12, 140, 155, 0.22), transparent),
    radial-gradient(ellipse 50% 60% at 50% 100%,  rgba(7, 25, 35, 0.92), transparent),
    radial-gradient(ellipse 35% 35% at 75% 50%,  rgba(23, 184, 200, 0.18), transparent);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body {
    background-color: #071418;
    background-image:
      radial-gradient(ellipse 72% 55% at 10% 0%,   rgba(23, 184, 200, 0.30), transparent),
      radial-gradient(ellipse 55% 45% at 92% 8%,   rgba(12, 140, 155, 0.22), transparent),
      radial-gradient(ellipse 50% 60% at 50% 100%,  rgba(7, 25, 35, 0.92), transparent),
      radial-gradient(ellipse 35% 35% at 75% 50%,  rgba(23, 184, 200, 0.18), transparent);
  }
}

/* ─── Dark mode: component overrides ─────────────────── */

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(23, 184, 200, 0.25);
  background: rgba(9, 32, 42, 0.70);
}
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(12, 42, 55, 0.90);
}

html[data-theme="dark"] .button-primary {
  color: #0a1820;
}

html[data-theme="dark"] .button-secondary {
  background: rgba(9, 32, 42, 0.60);
  border-color: rgba(23, 184, 200, 0.20);
}
html[data-theme="dark"] .button-secondary:hover {
  background: rgba(12, 42, 55, 0.82);
}

html[data-theme="dark"] .menu-toggle {
  border-color: rgba(23, 184, 200, 0.22);
}

html[data-theme="dark"] .legal-links a {
  background: rgba(9, 32, 42, 0.60);
  border-color: rgba(23, 184, 200, 0.20);
}
html[data-theme="dark"] .legal-links a:hover {
  background: rgba(12, 42, 55, 0.82);
}

html[data-theme="dark"] .legal-cta .legal-card {
  background: linear-gradient(135deg, rgba(8, 28, 38, 0.82), rgba(9, 38, 52, 0.78));
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle {
    border-color: rgba(23, 184, 200, 0.25);
    background: rgba(9, 32, 42, 0.70);
  }
  html:not([data-theme="light"]) .theme-toggle:hover {
    background: rgba(12, 42, 55, 0.90);
  }
  html:not([data-theme="light"]) .button-primary {
    color: #0a1820;
  }
  html:not([data-theme="light"]) .button-secondary {
    background: rgba(9, 32, 42, 0.60);
    border-color: rgba(23, 184, 200, 0.20);
  }
  html:not([data-theme="light"]) .menu-toggle {
    border-color: rgba(23, 184, 200, 0.22);
  }
  html:not([data-theme="light"]) .legal-links a {
    background: rgba(9, 32, 42, 0.60);
    border-color: rgba(23, 184, 200, 0.20);
  }
  html:not([data-theme="light"]) .legal-cta .legal-card {
    background: linear-gradient(135deg, rgba(8, 28, 38, 0.82), rgba(9, 38, 52, 0.78));
  }
}