/**
 * ACCOUNT PAGE — Layout CSS
 * =========================
 * Page-level styles for the /account single-page layout.
 * Covers the Webflow `ac-*` class elements: hero section,
 * flex container, sidebar nav, and main content area.
 * Hosted on R2: ld/account-page.css
 */

/* ── Hero Section ── */
.ac-hero {
  padding: 0 0 64px;
  background: #fafaf9;
  min-height: calc(100vh - 160px);
}

/* ── Container (sidebar + main) ── */
.ac-container {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

/* ── Sidebar Navigation ── */
.ac-page-nav {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ac-nav-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f0f0f;
  margin: 0 0 16px 0;
  padding: 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.ac-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(.22,.68,0,1);
  cursor: pointer;
  border: 1px solid transparent;
}

.ac-nav-link:hover {
  color: #1a1a1a;
  background: rgba(0,0,0,.03);
}

.ac-nav-link.is-active {
  background: #fff;
  color: #0f0f0f;
  font-weight: 600;
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
}

/* ── Main Content ── */
.ac-main {
  flex: 1;
  min-width: 0;
}

/* ── Ken Burns Background Animation ── */
@keyframes ac-ken-burns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* ── Greeting Animation (JS adds .ac-greeting-animated) ── */
@keyframes ac-greeting-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes ac-wave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(14deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(14deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* Greeting heading — default static */
.ac-banner-greeting {
  transition: opacity 0.4s ease;
}

/* When JS personalizes it, animate in */
.ac-banner-greeting.ac-greeting-animated {
  animation: ac-greeting-in 0.7s cubic-bezier(.22,.68,0,1) both;
}

/* Wave emoji inside the heading */
.ac-greeting-wave {
  display: inline-block;
  font-size: 1.1em;
  animation: ac-wave 1.2s ease-in-out;
  animation-delay: 0.6s;
  transform-origin: 70% 70%;
  margin-right: 4px;
}

/* Ken Burns on the banner background */
.ac-banner-bg {
  animation: ac-ken-burns 30s ease-in-out alternate infinite;
}

/* ── View Crossfade Transitions ── */
@keyframes ac-view-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ac-view-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
#saved-content,
#settings-content,
#searches-content {
  animation: ac-view-in 0.35s cubic-bezier(.22,.68,0,1) both;
}
#saved-content.ac-leaving,
#settings-content.ac-leaving,
#searches-content.ac-leaving {
  animation: ac-view-out 0.2s ease both;
}

/* ── Active Nav Link Indicator ── */
.ac-nav-link.is-active {
  position: relative;
}
.ac-nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: #c8102e;
  border-radius: 0 3px 3px 0;
  animation: ac-indicator-in 0.3s cubic-bezier(.22,.68,0,1) both;
}
@keyframes ac-indicator-in {
  from { height: 0; opacity: 0; }
  to   { height: 18px; opacity: 1; }
}

/* On tablet (horizontal nav), put indicator on bottom instead */
@media (max-width: 991px) {
  .ac-nav-link.is-active::before {
    left: 50%;
    top: auto;
    bottom: -2px;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }
  @keyframes ac-indicator-in {
    from { width: 0; opacity: 0; }
    to   { width: 18px; opacity: 1; }
  }
}

/* ── Responsive: Tablet ── */
@media (max-width: 991px) {
  .ac-hero {
    padding: 0;
  }
  .ac-container {
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
    margin-top: 32px;
  }
  .ac-main {
    width: 100%;
  }
  .ac-page-nav {
    width: 100%;
    position: static;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .ac-page-nav::-webkit-scrollbar {
    display: none;
  }
  .ac-nav-title {
    display: none;
  }
  .ac-nav-link {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 767px) {
  .ac-hero {
    padding: 0;
  }
  .ac-container {
    padding: 0 16px;
    gap: 20px;
    margin-top: 24px;
  }
  .ac-nav-link {
    padding: 9px 16px;
    font-size: 0.82rem;
    border-radius: 8px;
  }
}
