/* ============================================================
   Eastern Studios Shop — Design System
   Ported from easternstudios.net 2026 stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --es-teal:    #1e4b4d;
  --es-teal2:   #224B4D;
  --es-navy:    #0f2d3d;
  --es-dark:    #0d1f20;
  --es-accent:  #2eb8c2;
  --es-white:   #ffffff;
  --es-gray:    #f4f6f7;
  --es-gray2:   #e8eaec;
  --es-text:    #2d3748;
  --es-muted:   #718096;
  --es-border:  rgba(0,0,0,0.08);
  --es-shadow:  0 4px 24px rgba(0,0,0,0.08);
  --es-radius:  10px;
  --transition: 0.3s ease;
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--es-text);
  background: var(--es-white);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

a { color: var(--es-teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--es-accent); }

img { max-width: 100%; height: auto; display: block; }

/* ── Flash Messages ────────────────────────────────────────── */
.flash-container { padding: 0 1rem; }
.flash-success {
  background: #d1fae5; border-left: 4px solid #10b981;
  color: #065f46; padding: 12px 16px; border-radius: 6px;
  margin-bottom: 1rem; font-size: 0.9rem;
}
.flash-error {
  background: #fee2e2; border-left: 4px solid #ef4444;
  color: #991b1b; padding: 12px 16px; border-radius: 6px;
  margin-bottom: 1rem; font-size: 0.9rem;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.es-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 20px rgba(0,0,0,0.45);
}

.es-navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
}
@media (min-width: 1024px) {
  .es-navbar .nav-inner { padding: 0 2.5rem; gap: 2.5rem; }
}

/* ── Stacked logo ────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 3px;
}
.nav-logo-e,
.nav-logo-a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: block;
  text-align: center;
}
/* Hardcoded — never let page-level --es-accent overrides bleed in */
.nav-logo-e { color: #ffffff !important; }
.nav-logo-a { color: #2eb8c2 !important; }

/* Mobile auth — shown in hamburger, hidden in nav-actions */
.mobile-auth-item { display: none; }
.mobile-auth-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 1.5rem;
  color: rgba(255,255,255,0.65);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-auth-link:hover { color: #2eb8c2; }
.mobile-auth-link i { font-size: 0.85rem; }

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

.es-navbar .nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: white;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

.es-navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: #2eb8c2;
  transition: width var(--transition);
  border-radius: 2px;
}

.es-navbar .nav-links a:hover,
.es-navbar .nav-links a.active {
  color: #2eb8c2;
}

.es-navbar .nav-links a:hover::after,
.es-navbar .nav-links a.active::after {
  width: 100%;
}

.es-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--es-accent); }
.nav-icon-btn .badge {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: var(--es-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif;
}

.nav-account-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.85);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-account-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: white;
}

.nav-user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(255,255,255,0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
}
.nav-user-pill:hover { background: rgba(255,255,255,0.14); }
.nav-user-pill .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--es-teal);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px;
  background: none; border: none;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.8); border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  /* Hide desktop Sign In from nav-actions on mobile */
  .nav-actions #nav-user-area { display: none; }
  /* Show the injected auth item in the hamburger dropdown */
  .mobile-auth-item { display: block; }
  .es-navbar .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #0a0a0a;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 12px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  }
  .es-navbar .nav-links.open { display: flex; }
  .es-navbar .nav-links li { width: 100%; }
  .es-navbar .nav-links a {
    display: block; padding: 12px 1.5rem;
    font-size: 0.95rem;
  }
  .es-navbar .nav-links a::after { display: none; }
}

/* ── Section scroll-blend (auto-applied by ea.js) ───────────── */
.blend-section {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity  0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.blend-section.blend-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page Header — Ocean gradient hero ──────────────────────── */
.es-page-header {
  background: #04111a;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(12,90,110,0.9)  0%, transparent 70%),
    radial-gradient(ellipse 100% 80% at 20% 80%,  rgba(5,55,80,0.75)  0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 80% 90%,  rgba(8,40,65,0.85)  0%, transparent 60%),
    linear-gradient(180deg, #04111a 0%, #062535 40%, #083550 70%, #0a4a6e 100%);
  padding: 80px 0 110px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Subtle caustic shimmer */
.es-page-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background:
    repeating-linear-gradient(120deg, transparent, transparent 60px, rgba(46,184,194,0.025) 60px, rgba(46,184,194,0.025) 62px),
    repeating-linear-gradient(60deg,  transparent, transparent 55px, rgba(100,210,220,0.02) 55px, rgba(100,210,220,0.02)  57px);
  animation: phCaustic 18s ease-in-out infinite alternate;
}
@keyframes phCaustic {
  from { transform: translateX(0) scaleX(1); }
  to   { transform: translateX(24px) scaleX(1.03); }
}

/* Wave blend into content below */
.es-page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: -10%; width: 120%; height: 80px;
  background: var(--es-gray);
  clip-path: ellipse(50% 100% at 50% 100%);
}

.es-page-header .es-ph-inner { position: relative; z-index: 2; }  to   { transform: translateX(2%) scaleY(1.05); }
}

.es-page-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.es-page-header .es-ph-sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.98rem;
  margin: 0 auto;
  max-width: 500px;
  line-height: 1.75;
}

/* ── Shared hero bubble styles ───────────────────────────────── */
.hero-bubbles {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 1;
}
.hero-bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.16), rgba(46,184,194,0.05));
  border: 1px solid rgba(46,184,194,0.22);
  animation: heroBubbleRise linear infinite;
}
@keyframes heroBubbleRise {
  0%   { transform: translateY(0) translateX(0);  opacity: 0; }
  5%   { opacity: 0.8; }
  95%  { opacity: 0.5; }
  100% { transform: translateY(-120%) translateX(8px); opacity: 0; }
}

/* ── Scroll-reveal ────────────────────────────────────────────── */
.sr {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.sr.visible {
  opacity: 1;
  transform: translateY(0);
}
.sr-delay-1 { transition-delay: 0.1s; }
.sr-delay-2 { transition-delay: 0.2s; }
.sr-delay-3 { transition-delay: 0.3s; }
.sr-delay-4 { transition-delay: 0.4s; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--es-teal); color: white;
}
.btn-primary:hover { background: var(--es-accent); color: white; transform: translateY(-1px); }

.btn-accent {
  background: var(--es-accent); color: white;
}
.btn-accent:hover { background: #26a3ac; color: white; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--es-teal);
  border: 1.5px solid var(--es-teal);
}
.btn-outline:hover { background: var(--es-teal); color: white; }

.btn-ghost {
  background: transparent; color: var(--es-muted);
  border: 1.5px solid var(--es-gray2);
}
.btn-ghost:hover { border-color: var(--es-teal); color: var(--es-teal); }

.btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-full { width: 100%; }

/* ── Section Utilities ──────────────────────────────────────── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

.es-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--es-accent);
  display: block;
  margin-bottom: 8px;
  font-family: 'Montserrat', sans-serif;
}

.es-divider {
  width: 48px; height: 4px;
  background: var(--es-teal);
  border-radius: 2px;
  margin: 14px 0 28px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.es-footer {
  background: var(--es-dark);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 0;
  font-size: 0.88rem;
}

.es-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { .es-footer .footer-grid { padding: 0 2.5rem; } }

@media (max-width: 900px) {
  .es-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .es-footer .footer-grid { grid-template-columns: 1fr; }
}

.es-footer .footer-brand .footer-logo {
  height: 32px; margin-bottom: 14px;
  filter: brightness(0) invert(1);
}
.es-footer .footer-brand p {
  font-size: 0.85rem; line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 300px;
}

.es-footer h6 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}

.es-footer ul {
  list-style: none; margin: 0; padding: 0;
}
.es-footer ul li { margin-bottom: 10px; }
.es-footer ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 6px;
  transition: color var(--transition), letter-spacing var(--transition);
}
.es-footer ul li a::before {
  content: '\203A';
  color: var(--es-accent);
  font-size: 1rem;
  line-height: 1;
}
.es-footer ul li a:hover {
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.3px;
}

.es-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 48px;
  padding: 20px 1.5rem;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ── Back to top ────────────────────────────────────────────── */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--es-teal);
  color: #fff;
  border-radius: 50%;
  align-items: center; justify-content: center;
  z-index: 999;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--es-accent); color: #fff; transform: translateY(-3px); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--es-text);
  font-family: 'Montserrat', sans-serif;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--es-gray2);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--es-text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--es-accent);
  box-shadow: 0 0 0 3px rgba(46,184,194,0.15);
}
.form-control::placeholder { color: #a0aec0; }

/* ══════════════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVE
   Covers every page — no page-level hacks needed
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Page hero headers (About, Gallery, Privacy, etc.) ─── */
  .es-page-header { padding: 52px 1.5rem 72px; }
  .es-page-header h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); letter-spacing: -0.3px; }
  .es-page-header .es-ph-sub { font-size: 0.88rem; padding: 0 0.5rem; }

  /* ── Section padding ───────────────────────────────────── */
  .section { padding: 48px 0; }
  .section-sm { padding: 28px 0; }

  /* ── Collapse any inline 2-column grid sitewide ─────────
     Handles about.html, product.html, register.html etc.  */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* ── Collapse 3-col+ inline grids too ───────────────────── */
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* ── Footer ────────────────────────────────────────────── */
  .es-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .es-footer .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  /* ── Buttons — prevent horizontal overflow ───────────────── */
  .btn-lg { padding: 11px 20px; font-size: 0.88rem; }

  /* ── Back to top — move in from edge ───────────────────── */
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  /* ── Footer single column on very small screens ─────────── */
  .es-footer .footer-grid { grid-template-columns: 1fr; }
  .es-footer .footer-bottom { font-size: 0.75rem; }

  /* ── Collapse inline 2-col that has extra specificity ────── */
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}
