/* ============================================
   Elisa Nails Art | Portfolio
   Mobile-first, soft elegance
   ============================================ */

/* ---- 1. CSS Custom Properties ---- */
:root {
  --cream: #F5EFE6;
  --blush: #E8C9C1;
  --nude: #D8B4A0;
  --taupe: #8A7060;
  --taupe-deep: #5C4A3E;
  --gold: #C9A96A;
  --white: #FFFDFA;

  --font-title: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-card: 0 4px 20px rgba(138, 112, 96, 0.12);
  --shadow-hover: 0 8px 32px rgba(138, 112, 96, 0.18);
  --radius-card: 16px;
  --gutter: 1.25rem;
  --max-width: 1200px;

  /* Gallery card aspect ratio 4/5 */
  --card-ratio: 4 / 5;
}

/* ---- 2. Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--taupe);
  background-color: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: var(--taupe-deep);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold);
}

/* ---- 3. Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--taupe-deep);
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

/* ---- Reveal on scroll (fade in once, via IntersectionObserver) ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal-fade.is-visible {
  opacity: 1;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1.5px;
  background: var(--gold);
  margin: 0.75rem auto 0;
}

/* ---- 4. Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

/* ---- Decorative floating elements ---- */
.decor-wrap {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  animation: decor-fly-a 16s ease-in-out infinite;
}

.decor-wrap:nth-of-type(4n+1) { animation-name: decor-fly-a; animation-duration: 15s; animation-delay: -1s; }
.decor-wrap:nth-of-type(4n+2) { animation-name: decor-fly-b; animation-duration: 19s; animation-delay: -4s; }
.decor-wrap:nth-of-type(4n+3) { animation-name: decor-fly-a; animation-duration: 22s; animation-delay: -9s; }
.decor-wrap:nth-of-type(4n+4) { animation-name: decor-fly-b; animation-duration: 17s; animation-delay: -6s; }

.decor {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.85;
  will-change: transform, opacity;
}

@media (max-width: 599px) {
  .decor {
    width: 40px !important;
  }
}

@keyframes decor-fly-a {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(40px, -50px) rotate(12deg); }
  50%  { transform: translate(-30px, -90px) rotate(-8deg); }
  75%  { transform: translate(-55px, -30px) rotate(6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes decor-fly-b {
  0%   { transform: translate(0, 0) rotate(0deg); }
  30%  { transform: translate(-45px, -40px) rotate(-10deg); }
  55%  { transform: translate(35px, -85px) rotate(9deg); }
  80%  { transform: translate(50px, -20px) rotate(-6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* ---- 5. Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 40%, var(--white) 0%, var(--cream) 60%, var(--blush) 100%);
  overflow: hidden;
  padding: 2rem;
}

.hero-logo {
  width: 190px;
  height: auto;
  margin-bottom: 1.5rem;
  will-change: transform;
}

.hero-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-name {
  font-family: var(--font-title);
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--taupe-deep);
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--taupe);
  font-style: italic;
  font-weight: 400;
  max-width: 320px;
  margin: 0 auto;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--taupe);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  animation: pulse-down 2.5s ease-in-out infinite;
}

.hero-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 24px;
  background: var(--taupe);
  margin: 0.5rem auto 0;
  opacity: 0.4;
}

@keyframes pulse-down {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ---- 6. Gallery ---- */
.gallery {
  background: var(--white);
}

.gallery-intro {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--taupe);
  font-style: italic;
  max-width: 480px;
  margin: -2rem auto 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.gallery-card {
  position: relative;
  aspect-ratio: var(--card-ratio);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  background: var(--cream);
  flex-shrink: 0;
}

.gallery-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

/* Placeholder gradient fallback for missing images */
.gallery-card img:not([src]),
.gallery-card img[src=""],
.gallery-card img[src$=".jpg"]:not([loaded]) {
  background: linear-gradient(135deg, var(--blush) 0%, var(--nude) 50%, var(--cream) 100%);
  min-height: 200px;
}

/* ---- 7. About ---- */
.about {
  background: var(--cream);
  position: relative;
}

.about-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.about-text {
  max-width: 600px;
  text-align: center;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--nude) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(201, 169, 106, 0.25);
}

.about-badge span {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 1.2;
}

/* ---- 8. Rules ---- */
.rules {
  background: var(--white);
}

.rules-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.rules-list li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid rgba(138, 112, 96, 0.1);
  font-size: 0.9375rem;
  line-height: 1.6;
}

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

.rules-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 1rem;
  color: var(--gold);
  font-size: 0.65rem;
}

.rules-thanks {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--taupe);
}

/* ---- 9. Contact / CTA ---- */
.contact {
  background: var(--cream);
  text-align: center;
}

.contact-subtitle {
  font-size: 0.9rem;
  color: var(--taupe);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 48px;
  padding: 0.875rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--taupe-deep);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 169, 106, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--taupe-deep);
  border: 1.5px solid var(--taupe-deep);
}

.btn-secondary:hover {
  background: var(--taupe-deep);
  color: var(--white);
  transform: translateY(-1px);
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  border: 1.5px solid var(--gold);
  color: var(--taupe-deep);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-social:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-1px);
}

/* ---- 10. Footer ---- */
.footer {
  padding: 2rem 0;
  background: var(--taupe-deep);
  color: var(--cream);
  text-align: center;
  font-size: 0.8125rem;
}

.footer a {
  color: var(--gold);
}

.footer a:hover {
  color: var(--white);
}

.footer-cream {
  background: var(--cream);
  color: var(--taupe);
}

/* ---- Gallery Page Header ---- */
.gallery-page-header {
  text-align: center;
  padding: 3rem 1.25rem 1rem;
  background: var(--white);
}

.gallery-page-header .booking-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--taupe);
}

.gallery-page-header .booking-back:hover {
  color: var(--gold);
}

.gallery-page-header .booking-back::before {
  content: '←';
  font-size: 1.1rem;
}

/* ---- 11. Booking Page ---- */
.booking-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--cream);
}

.booking-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--taupe);
  margin-bottom: 3rem;
  align-self: flex-start;
}

.booking-back:hover {
  color: var(--gold);
}

.booking-back::before {
  content: '←';
  font-size: 1.1rem;
}

.booking-content {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.booking-content h1 {
  margin-bottom: 1rem;
}

.booking-message {
  font-size: 1.1rem;
  color: var(--taupe);
  font-family: var(--font-title);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.booking-ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

.booking-ig-link:hover {
  color: var(--taupe-deep);
}

.booking-rules {
  margin-top: 3rem;
  text-align: left;
  padding-top: 2rem;
  border-top: 1px solid rgba(138, 112, 96, 0.15);
}

.booking-rules h2 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ---- 12. Responsive: Tablet (≥600px) ---- */
@media (min-width: 600px) {
  :root {
    --gutter: 2rem;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }

  .section {
    padding: 6rem 0;
  }

  .hero-name {
    font-size: 3.5rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
    max-width: 400px;
  }

  .hero-logo {
    width: 220px;
    height: auto;
  }

  .gallery-grid {
    gap: 1.25rem;
  }

  .about-grid {
    flex-direction: row;
    gap: 3rem;
  }

  .about-text {
    text-align: left;
  }

  .about-badge {
    width: 140px;
    height: 140px;
  }

  .about-badge span {
    font-size: 1.75rem;
  }

  .contact-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

/* ---- 13. Responsive: Desktop (≥1024px) ---- */
@media (min-width: 1024px) {
  :root {
    --gutter: 2.5rem;
  }

  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }

  .section {
    padding: 8rem 0;
  }

  .section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
  }

  .hero-name {
    font-size: 4.5rem;
  }

  .hero-tagline {
    font-size: 1.4rem;
    max-width: 500px;
  }

  .hero-logo {
    width: 250px;
    height: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .gallery-grid .gallery-card:nth-child(3n+2) {
    margin-top: 3rem;
  }

  .about-badge {
    width: 160px;
    height: 160px;
  }

  .about-badge span {
    font-size: 2rem;
  }

  .rules-list li {
    font-size: 1rem;
    padding: 1.25rem 0 1.25rem 2.5rem;
  }
}

/* ---- 14. Responsive: Large Desktop (≥1400px) ---- */
@media (min-width: 1400px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid .gallery-card:nth-child(3n+2) {
    margin-top: 0;
  }

  .gallery-grid .gallery-card:nth-child(4n+2),
  .gallery-grid .gallery-card:nth-child(4n+4) {
    margin-top: 3rem;
  }
}

/* ---- 15. Accessibility & Focus ---- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Skip to content (visually hidden, available on focus) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  background: var(--taupe-deep);
  color: var(--white);
  font-size: 0.875rem;
}

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

/* Tap target sizing */
.btn,
a.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---- 16. Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-scroll-hint {
    animation: none;
  }

  .decor-wrap {
    display: none !important;
    animation: none !important;
  }

  .gallery-card {
    transition: none;
  }

  .gallery-card:hover {
    transform: none;
  }

  .gallery-card:hover img {
    transform: none;
  }

  .gallery-card {
    transform: none !important;
  }

  .btn {
    transition: none;
  }
}

/* ---- 17. Utility ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}