@layer reset, base, theme, components, utilities;

/* =========================================================
   1. Dark Luxury Design Tokens
   ========================================================= */
:root {
  color-scheme: dark;

  --surface-base: #100e14;
  --surface-tint-rose: #281722;
  --surface-tint-lavender: #201a2a;
  --surface-tint-sky: #171d29;
  --surface-glass: rgba(30, 26, 35, 0.84);
  --surface-card: #211c25;

  --text-primary: #fff5fa;
  --text-secondary: #d3c7d4;
  --text-muted: #ab9caf;

  --accent-rose: #e889b5;
  --accent-rose-bright: #ffacd0;
  --accent-rose-soft: #f3bdd6;
  --accent-lavender: #b6a0df;
  --accent-sky: #91b7e5;
  --accent-gold: #d9bd82;

  --border-soft: rgba(182, 160, 223, 0.24);
  --border-strong: rgba(232, 137, 181, 0.42);
  --focus-ring: #ffd1e5;

  --shadow-soft:
    0 10px 30px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-elevated:
    0 24px 54px rgba(0, 0, 0, 0.42),
    0 8px 20px rgba(199, 39, 116, 0.2);
  --shadow-cta:
    0 12px 28px rgba(199, 39, 116, 0.34),
    0 4px 12px rgba(156, 132, 214, 0.26);

  --font-ar: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-script: "Allura", "Brush Script MT", cursive;

  --radius-card: 28px;
  --radius-pill: 999px;
  --card-width: clamp(260px, 75dvw, 390px);
}

@keyframes sparkle-glow {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.82) rotate(-12deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.12) rotate(12deg);
    filter: drop-shadow(0 0 8px rgba(217, 189, 130, 0.85));
  }
}

/* =========================================================
   2. Targeted Resets (No global * reset)
   ========================================================= */
@layer reset {
  html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
  }

  body,
  h1,
  h2,
  h3,
  p,
  figure {
    margin: 0;
  }

  button,
  a {
    font: inherit;
    color: inherit;
  }

  img,
  svg {
    display: block;
    max-inline-size: 100%;
  }
}

/* =========================================================
   3. Base Layout & Typography
   ========================================================= */
@layer base {
  body {
    min-block-size: 100dvh;
    font-family: var(--font-ar);
    color: var(--text-primary);
    background:
      radial-gradient(circle at 12% 14%, var(--surface-tint-rose) 0%, transparent 46%),
      radial-gradient(circle at 88% 22%, var(--surface-tint-sky) 0%, transparent 45%),
      radial-gradient(circle at 50% 82%, var(--surface-tint-lavender) 0%, transparent 52%),
      var(--surface-base);
    overflow-x: clip;
    line-height: 1.65;
  }

  body.intro-locked {
    overflow: hidden;
    block-size: 100dvh;
  }

  :where(a, button, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }
}

/* =========================================================
   4. Ambient Backdrop Effects
   ========================================================= */
@layer theme {
  #ambient-canvas {
    position: fixed;
    inset: 0;
    inline-size: 100dvw;
    block-size: 100dvh;
    pointer-events: none;
    z-index: 0;
  }

  .aurora-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
  }

  .aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.42;
    will-change: transform;
  }

  .orb-rose {
    inline-size: clamp(220px, 36dvw, 460px);
    aspect-ratio: 1;
    inset-block-start: -8%;
    inset-inline-start: -6%;
    background: radial-gradient(circle, rgba(233, 78, 154, 0.34), transparent 70%);
  }

  .orb-lavender {
    inline-size: clamp(240px, 40dvw, 520px);
    aspect-ratio: 1;
    inset-block-start: 28%;
    inset-inline-end: -10%;
    background: radial-gradient(circle, rgba(179, 157, 219, 0.36), transparent 70%);
  }

  .orb-sky {
    inline-size: clamp(200px, 34dvw, 420px);
    aspect-ratio: 1;
    inset-block-end: -10%;
    inset-inline-start: 22%;
    background: radial-gradient(circle, rgba(144, 202, 249, 0.34), transparent 70%);
  }

  @media (prefers-reduced-motion: no-preference) {
    .site-shell.is-revealed .brand-script {
      animation: write-script 1.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
    }

    .orb-rose {
      animation: float-orb 16s ease-in-out infinite alternate;
    }

    .orb-lavender {
      animation: float-orb 20s ease-in-out infinite alternate-reverse;
    }

    .orb-sky {
      animation: float-orb 18s ease-in-out infinite alternate 2s;
    }
  }
}

@keyframes float-orb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(24px, -22px, 0) scale(1.08);
  }
}

/* =========================================================
   5. Intro Screen ("YOYO NAILS" Written Reveal)
   ========================================================= */
@layer components {
  #intro-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
      radial-gradient(circle at 20% 20%, rgba(244, 143, 177, 0.24), transparent 48%),
      radial-gradient(circle at 80% 78%, rgba(144, 202, 249, 0.26), transparent 50%),
      linear-gradient(145deg, #100c14 0%, #211725 52%, #111722 100%);
    transition:
      opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.75s;
  }

  #intro-screen.is-leaving {
    opacity: 0;
    transform: scale(1.03);
    visibility: hidden;
    pointer-events: none;
  }

  #intro-screen.is-gone {
    display: none;
  }

  .intro-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.9rem;
    max-inline-size: min(92dvw, 660px);
  }

  .intro-sparkle {
    font-size: 1.6rem;
    color: var(--accent-rose-bright);
    filter: drop-shadow(0 0 12px rgba(233, 78, 154, 0.45));
  }

  .intro-wordmark {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(5rem, 3rem + 10dvw, 8.5rem);
    line-height: 1;
    letter-spacing: 0.015em;
    user-select: none;
  }

  .intro-script {
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(120deg, #fff1f7 4%, #f09bc1 48%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 8px 22px rgba(232, 137, 181, 0.28));
  }

  .writing-pen {
    position: absolute;
    inset-block-start: 42%;
    inset-inline-start: 0;
    inline-size: 3px;
    block-size: 0.85em;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff1f7, var(--accent-gold));
    box-shadow: 0 0 16px rgba(255, 172, 208, 0.9);
    opacity: 0;
    transform: rotate(18deg);
    pointer-events: none;
  }

  .intro-flourish {
    inline-size: clamp(190px, 48dvw, 320px);
    block-size: auto;
  }

  .flourish-path {
    stroke-dasharray: 420;
    stroke-dashoffset: 0;
  }

  .intro-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.05rem, 0.85rem + 1dvw, 1.45rem);
    letter-spacing: 0.08em;
    color: var(--text-secondary);
  }

  @media (prefers-reduced-motion: no-preference) {
    .intro-sparkle {
      opacity: 0;
      animation: intro-sparkle-pop 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
    }

    .intro-script {
      opacity: 0;
      clip-path: inset(0 100% 0 0);
      filter: blur(5px) drop-shadow(0 8px 22px rgba(232, 137, 181, 0.28));
      animation: write-script 1.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
    }

    .writing-pen {
      animation: pen-write 1.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
    }

    .flourish-path {
      stroke-dashoffset: 420;
      animation: draw-flourish 0.9s cubic-bezier(0.37, 0, 0.63, 1) 1.35s forwards;
    }

    .intro-tagline {
      opacity: 0;
      transform: translate3d(0, 10px, 0);
      animation: fade-up 0.65s ease-out 1.75s forwards;
    }

  }

  /* =========================================================
     6. Main Site Shell & Header
     ========================================================= */
  .site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-block-size: 100dvh;
  }

  @media (prefers-reduced-motion: no-preference) {
    .site-shell.is-waiting {
      opacity: 0;
      transform: translate3d(0, 18px, 0);
    }

    .site-shell.is-revealed {
      opacity: 1;
      transform: translate3d(0, 0, 0);
      transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    }
  }

  .site-header {
    padding-block: clamp(1.8rem, 4dvh, 3.2rem) clamp(1rem, 2.5dvh, 2rem);
    padding-inline: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }

  .brand-wordmark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 1.1rem;
    font-family: var(--font-script);
    font-size: clamp(3.2rem, 6vw, 4.5rem);
    line-height: 1;
    user-select: none;
  }

  .brand-script {
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(120deg, #fff1f7 4%, #f09bc1 48%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 5px 16px rgba(232, 137, 181, 0.28));
  }

  .brand-sparkle {
    position: absolute;
    inset-block-start: 0.08em;
    inset-inline-end: 0;
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-size: 0.45em;
    animation: sparkle-glow 2.4s ease-in-out infinite;
  }

  .eyebrow {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--accent-rose);
    margin-block-start: 0.35rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 1.1rem + 2.2dvw, 2.85rem);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
    max-inline-size: 32ch;
    text-align: center;
    background: linear-gradient(135deg, #fff5fa 15%, #f0a2c6 58%, #c3b0eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 0.88rem + 0.4dvw, 1.12rem);
    font-family: var(--font-display);
    line-height: 1.7;
    color: var(--text-secondary);
    max-inline-size: 68ch;
    text-align: center;
  }

  /* =========================================================
     7. Layered Card Album Carousel
     ========================================================= */
  .album-section {
    padding-block: clamp(0.8rem, 2dvh, 1.6rem) clamp(2rem, 4dvh, 3.2rem);
  }

  .section-heading {
    text-align: center;
    padding-inline: 1.25rem;
    margin-block-end: clamp(1.2rem, 3dvh, 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
  }

  .section-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-rose);
    background: linear-gradient(135deg, rgba(245, 181, 211, 0.35), rgba(156, 132, 214, 0.25));
    border: 1px solid rgba(232, 137, 181, 0.32);
  }

  .section-title {
    font-size: clamp(1.35rem, 1.05rem + 1.2dvw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
  }

  .section-hint {
    font-size: 0.92rem;
    color: var(--text-secondary);
  }

  .carousel-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-inline-size: 1320px;
    margin-inline: auto;
    overflow-x: clip;
  }

  .carousel-controls {
    display: flex;
    order: 3;
    justify-content: center;
    gap: 1rem;
    margin-block-start: 1rem;
  }

  .album-nav-btn {
    pointer-events: auto;
    display: inline-grid;
    place-items: center;
    inline-size: 46px;
    block-size: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(37, 31, 42, 0.92);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    touch-action: manipulation;
    transition:
      transform 0.22s ease,
      box-shadow 0.22s ease,
      background-color 0.22s ease,
      color 0.22s ease;
  }

  .album-nav-btn:hover:not(:disabled) {
    background: var(--accent-rose);
    color: #ffffff;
    border-color: var(--accent-rose);
    box-shadow: var(--shadow-cta);
    transform: scale(1.06);
  }

  .album-nav-btn:active:not(:disabled) {
    scale: 0.94;
  }

  .carousel-track {
    position: relative;
    order: 1;
    inline-size: 100%;
    block-size: clamp(470px, 50vw, 590px);
    touch-action: pan-y;
  }

  .album-slide {
    --stack-x: 0%;
    --stack-angle: 0deg;
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: 50%;
    inline-size: var(--card-width);
    transform:
      translate(calc(-50% + var(--stack-x)), -50%)
      scale(0.7)
      rotate(0deg);
    transform-origin: center;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition:
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.55s ease,
      filter 0.55s ease;
  }

  .album-slide.is-current {
    z-index: 5;
    opacity: 1;
    filter: brightness(1);
    transform:
      translate(-50%, -50%)
      scale(1)
      rotate(0deg);
    pointer-events: auto;
  }

  .album-slide.is-left,
  .album-slide.is-right {
    z-index: 4;
    opacity: 0.78;
    filter: brightness(0.78);
    pointer-events: auto;
  }

  .album-slide.is-left {
    --stack-x: -35%;
    transform:
      translate(calc(-50% + var(--stack-x)), -50%)
      scale(0.86)
      rotate(calc(-5deg + var(--stack-angle)));
  }

  .album-slide.is-right {
    --stack-x: 35%;
    transform:
      translate(calc(-50% + var(--stack-x)), -50%)
      scale(0.86)
      rotate(calc(5deg + var(--stack-angle)));
  }

  .album-slide.is-back-left,
  .album-slide.is-back-right {
    z-index: 2;
    opacity: 0.48;
    filter: brightness(0.68);
  }

  .album-slide.is-back-left {
    --stack-x: -78%;
    transform:
      translate(calc(-50% + var(--stack-x)), calc(-50% + 12px))
      scale(0.72)
      rotate(calc(-9deg + var(--stack-angle)));
  }

  .album-slide.is-back-right {
    --stack-x: 78%;
    transform:
      translate(calc(-50% + var(--stack-x)), calc(-50% + 12px))
      scale(0.72)
      rotate(calc(9deg + var(--stack-angle)));
  }

  .nail-card {
    --mx: 50%;
    --my: 40%;
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    display: block;
    inline-size: 100%;
    aspect-ratio: 4 / 4.35;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    background: var(--surface-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-align: start;
    cursor: pointer;
    touch-action: manipulation;
    transform-style: preserve-3d;
    transition:
      transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.35s ease,
      scale 0.2s ease;
  }

  @supports (corner-shape: squircle) {
    .nail-card {
      corner-shape: squircle;
    }
  }

  .album-slide.is-current .nail-card {
    box-shadow: var(--shadow-elevated);
    border-color: rgba(232, 137, 181, 0.5);
  }

  @media (hover: hover) and (pointer: fine) {
    .nail-card:hover {
      transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
      box-shadow: var(--shadow-elevated);
    }
  }

  .nail-card:active {
    scale: 0.975;
  }

  .card-media {
    position: absolute;
    inset: 0;
    display: block;
    inline-size: 100%;
    block-size: 100%;
    overflow: hidden;
    background: var(--surface-tint-rose);
  }

  .card-media::before {
    content: "";
    position: absolute;
    inset: -12px;
    background-image:
      linear-gradient(rgba(16, 14, 20, 0.38), rgba(16, 14, 20, 0.38)),
      var(--card-image);
    background-position: center;
    background-size: cover;
    filter: blur(14px);
    opacity: 0.7;
    transform: scale(1.05);
  }

  .card-media img {
    position: relative;
    z-index: 1;
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .album-slide.is-current .nail-card:hover .card-media img {
    transform: scale(1.05);
  }

  .card-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(
      circle 220px at var(--mx) var(--my),
      rgba(255, 255, 255, 0.32),
      transparent 70%
    );
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .card-zoom {
    position: absolute;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    inline-size: 42px;
    block-size: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #fff;
    background: rgba(16, 14, 20, 0.76);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    cursor: zoom-in;
    transition:
      transform 0.2s ease,
      background-color 0.2s ease,
      border-color 0.2s ease;
  }

  .card-zoom svg {
    inline-size: 19px;
    block-size: 19px;
  }

  .card-zoom:hover {
    transform: scale(1.08);
    border-color: var(--accent-rose-soft);
    background: rgba(199, 39, 116, 0.9);
  }

  @media (hover: hover) and (pointer: fine) {
    .nail-card:hover .card-sheen {
      opacity: 1;
    }
  }

  /* Marker Dots with WCAG >=24x24 touch target and non-color active state */
  .album-markers {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    max-inline-size: min(100%, 520px);
    margin-block-start: 0.25rem;
  }

  .album-markers button {
    position: relative;
    box-sizing: content-box;
    inline-size: 10px;
    block-size: 10px;
    padding: 9px 7px;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(156, 132, 214, 0.38);
    background-clip: content-box;
    cursor: pointer;
    touch-action: manipulation;
    transition:
      inline-size 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.3s ease;
  }

  .album-markers button:hover {
    background: rgba(199, 39, 116, 0.6);
    background-clip: content-box;
  }

  .album-markers button[aria-current="true"] {
    inline-size: 28px;
    background: linear-gradient(90deg, var(--accent-rose), var(--accent-lavender));
    background-clip: content-box;
    box-shadow: inset 0 0 0 1px rgba(255, 245, 250, 0.22);
  }

  /* =========================================================
     8. Contact Invitation Section (Below Card Album)
     ========================================================= */
  .contact-section {
    margin-block-start: auto;
    padding-block: clamp(1.2rem, 3dvh, 2.4rem) clamp(2rem, 4dvh, 3rem);
    padding-inline: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.35rem;
  }

  .contact-card {
    position: relative;
    box-sizing: border-box;
    inline-size: min(100%, 740px);
    padding: clamp(1.75rem, 4dvw, 3rem) clamp(1.35rem, 4dvw, 2.75rem);
    border-radius: 32px;
    text-align: center;
    background: linear-gradient(
      145deg,
      rgba(42, 34, 47, 0.96),
      rgba(48, 31, 45, 0.94) 55%,
      rgba(29, 37, 52, 0.96)
    );
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    overflow: hidden;
  }

  .contact-ornament {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent-rose);
  }

  .contact-title {
    font-size: clamp(1.35rem, 1.05rem + 1.3dvw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
  }

  .contact-copy {
    font-size: clamp(0.95rem, 0.9rem + 0.3dvw, 1.08rem);
    color: var(--text-secondary);
    max-inline-size: 46ch;
  }

  .cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-block-start: 0.55rem;
    min-block-size: 52px;
    padding: 0.85rem 2.25rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.02rem;
    color: #ffffff;
    background: linear-gradient(125deg, #c72774 0%, #9b59b6 55%, #6a8be0 100%);
    box-shadow: var(--shadow-cta);
    overflow: hidden;
    touch-action: manipulation;
    transition:
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.28s ease;
  }

  .cta-button::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -70%;
    inline-size: 55%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: skewX(-20deg);
    transition: transform 0.65s ease;
  }

  .cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
      0 18px 36px rgba(199, 39, 116, 0.34),
      0 6px 16px rgba(156, 132, 214, 0.28);
  }

  .cta-button:hover::before {
    transform: translateX(340%) skewX(-20deg);
  }

  .cta-button:active {
    scale: 0.97;
  }

  .cta-icon {
    transform: scaleX(-1);
    transition: transform 0.25s ease;
  }

  .cta-button:hover .cta-icon {
    transform: scaleX(-1) translateX(4px);
  }

  .footer-meta {
    display: grid;
    justify-items: center;
    gap: 0.38rem;
    inline-size: min(100%, 760px);
    padding-block-start: 1.1rem;
    border-block-start: 1px solid var(--border-soft);
    text-align: center;
  }

  .copyright-line,
  .copyright-note,
  .developer-credit {
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .copyright-line {
    color: var(--text-secondary);
  }

  .copyright-note {
    color: var(--text-muted);
  }

  .developer-credit {
    color: var(--text-secondary);
  }

  .developer-credit a {
    color: var(--accent-rose-soft);
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .developer-credit a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .image-viewer {
    position: fixed;
    box-sizing: border-box;
    inline-size: 94vw;
    block-size: 90dvh;
    max-inline-size: min(94vw, 1100px);
    max-block-size: 90dvh;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    color: var(--text-primary);
    background: var(--surface-base);
    box-shadow: var(--shadow-elevated);
  }

  .image-viewer::backdrop {
    background: rgba(5, 4, 8, 0.88);
    backdrop-filter: blur(9px);
  }

  .viewer-image {
    inline-size: 100%;
    block-size: 100%;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    box-sizing: border-box;
    object-fit: contain;
  }

  .viewer-close {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    z-index: 1;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    inline-size: 42px;
    block-size: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(16, 14, 20, 0.78);
    cursor: pointer;
    transition:
      background-color 0.2s ease,
      transform 0.2s ease;
  }

  .viewer-close:hover {
    transform: scale(1.06);
    background: rgba(199, 39, 116, 0.9);
  }
}

/* =========================================================
   9. Utilities, Keyframes & Accessibility Modes
   ========================================================= */
@layer utilities {
  .visually-hidden {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

@keyframes intro-sparkle-pop {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-35deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.18) rotate(8deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes write-script {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0) drop-shadow(0 8px 22px rgba(232, 137, 181, 0.28));
  }
}

@keyframes pen-write {
  0% {
    inset-inline-start: 0;
    opacity: 0;
  }
  8%,
  88% {
    opacity: 1;
  }
  100% {
    inset-inline-start: 100%;
    opacity: 0;
  }
}

@keyframes draw-flourish {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Mobile refinements */
@media (max-width: 640px) {
  .album-nav-btn {
    inline-size: 40px;
    block-size: 40px;
  }

  .card-zoom,
  .viewer-close {
    inline-size: 40px;
    block-size: 40px;
  }
}

/* Forced Colors (Windows High Contrast) fallbacks */
@media (forced-colors: active) {
  #intro-screen,
  .brand-wordmark,
  .contact-card,
  .nail-card,
  .card-zoom,
  .album-nav-btn,
  .viewer-close,
  .image-viewer,
  .hero-title,
  .intro-script,
  .brand-script {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }

  .cta-button {
    background: ButtonFace;
    color: ButtonText;
    border: 2px solid ButtonText;
  }

  .album-markers button {
    background: CanvasText;
    border: 1px solid CanvasText;
  }

  .album-markers button[aria-current="true"] {
    background: Highlight;
    outline: 2px solid Highlight;
  }
}

@layer utilities {
  @media (prefers-reduced-motion: reduce) {
    .album-slide,
    .nail-card,
    .card-zoom,
    .viewer-close {
      transition: none;
    }

    .brand-sparkle {
      animation: none;
    }
  }
}
