/* ============================================================
   Nikkie Crochet — design tokens
   Palette derived from the brand logo (blush rose + warm gray),
   deepened where needed to clear WCAG AA text contrast.
   ============================================================ */

:root {
  /* Rose family (from logo hue ~337°) */
  --rose-900: #7E2547;   /* deep field — hero / footer backgrounds */
  --rose-600: #A63862;   /* action rose — links, buttons, on white */
  --rose-300: #E8A8C0;   /* logo blush — decorative / large surfaces only */
  --rose-100: #F8E0E8;   /* soft tint — card + section backgrounds */

  /* Ink (warm, rose-tinted neutrals — never flat gray) */
  --ink: #3D242A;
  --ink-muted: #815F6B;
  --ink-on-rose: #FBEAF1;
  --ink-on-rose-muted: #E7BBCC;

  /* Logo warm gray — large display use only (3.4:1 on white) */
  --gray-display: #8C8C8C;

  --paper: #FEFBFC;
  --paper-alt: #FFFFFF;

  --font-display: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-signature: "Caveat", cursive;

  --measure: 68ch;
  --radius: 20px;
  --radius-sm: 12px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--rose-600);
  color: var(--ink-on-rose);
}

:focus-visible {
  outline: 2.5px solid var(--rose-600);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  max-width: var(--measure);
}

a {
  color: var(--rose-600);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--rose-900);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow-free-heading {
  /* marker class kept out of markup intentionally — headings carry their own weight */
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8em 1.7em;
  border-radius: 999px;
  text-decoration: none;
  border: 2.5px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out-expo), box-shadow 0.15s var(--ease-out-expo), background 0.2s, color 0.2s;
  cursor: pointer;
}

.btn-sm {
  padding: 0.5em 1.3em;
  font-size: 0.92rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(2px);
}

.btn-primary {
  background: var(--paper-alt);
  color: var(--rose-900);
  border-color: var(--ink-on-rose-muted);
  box-shadow: 0 4px 0 0 var(--ink-on-rose-muted);
}

.btn-primary:hover {
  color: var(--rose-900);
  box-shadow: 0 6px 0 0 var(--ink-on-rose-muted);
}

.btn-primary:active {
  box-shadow: 0 1px 0 0 var(--ink-on-rose-muted);
}

.btn-outline {
  background: transparent;
  color: var(--ink-on-rose);
  border-color: var(--ink-on-rose-muted);
  box-shadow: 0 4px 0 0 rgba(231, 187, 204, 0.4);
}

.btn-outline:hover {
  color: var(--ink-on-rose);
  border-color: var(--ink-on-rose);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 0 0 rgba(231, 187, 204, 0.5);
}

.btn-outline:active {
  box-shadow: 0 1px 0 0 rgba(231, 187, 204, 0.4);
}

.btn-rose {
  background: var(--rose-600);
  color: var(--ink-on-rose);
  border-color: var(--rose-900);
  box-shadow: 0 4px 0 0 var(--rose-900);
}

.btn-rose:hover {
  color: var(--ink-on-rose);
  box-shadow: 0 6px 0 0 var(--rose-900);
}

.btn-rose:active {
  box-shadow: 0 1px 0 0 var(--rose-900);
}

.btn-icon svg {
  width: 1.1em;
  height: 1.1em;
}

.btn-primary::after,
.btn-rose::after {
  content: "\2192";
  display: inline-block;
  transition: transform 0.25s var(--ease-out-expo);
}

.btn-primary:hover::after,
.btn-rose:hover::after {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(254, 251, 252, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(126, 37, 71, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
}

.brand-frame {
  display: inline-flex;
  align-items: center;
  background: var(--paper-alt);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--rose-300);
  flex-shrink: 1;
  min-width: 0;
}

.brand-mark {
  display: block;
  height: auto;
  width: auto;
  max-height: 38px;
  max-width: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:not(.btn):hover {
  color: var(--rose-600);
}

.nav-icon {
  display: inline-flex;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-icon:hover {
  color: var(--rose-600);
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--rose-900);
  color: var(--ink-on-rose);
  overflow: clip;
  padding: 96px 0 120px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: -120px;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cpath d='M0 30c10-18 20-18 30 0s20 18 30 0 20-18 30 0 20 18 30 0' fill='none' stroke='%23FBEAF1' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 60px;
  opacity: 0.07;
  pointer-events: none;
  animation: hero-stitch-drift 46s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.hero.is-in-view::before {
  animation-play-state: running;
}

@keyframes hero-stitch-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-120px);
  }
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 56px;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
}

.hero-mark-frame {
  background: var(--paper-alt);
  padding: clamp(20px, 4vw, 40px) clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  border: 2px solid var(--rose-300);
  box-shadow: 0 30px 60px -28px rgba(20, 5, 12, 0.5);
}

.hero-mark {
  width: min(420px, 68vw);
  height: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

.hero-follow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-on-rose-muted);
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 4px;
}

.hero-follow:hover {
  color: var(--ink-on-rose);
}

.hero-follow svg {
  width: 18px;
  height: 18px;
}

.hero-rail-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-on-rose-muted);
  margin: 0 0 18px;
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-alt);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-decoration: none;
  box-shadow: 0 16px 30px -20px rgba(20, 5, 12, 0.45);
  transition: transform 0.35s var(--ease-out-expo);
}

.rail-card:hover {
  transform: translateX(-4px);
}

.rail-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: calc(var(--radius-sm) - 4px);
  background: var(--rose-100);
  color: var(--rose-900);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
}

.rail-thumb svg {
  width: 24px;
  height: 24px;
  opacity: 0.65;
}

.rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.rail-more {
  display: inline-block;
  margin-top: 18px;
  color: var(--ink-on-rose);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.rail-more:hover {
  color: var(--ink-on-rose-muted);
}

/* ---------- Section scaffolding ---------- */

section {
  padding: 100px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  color: var(--ink);
}

/* ---------- Funny Birds spotlight ---------- */

.spotlight {
  background: var(--rose-100);
}

.spotlight-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  background: var(--paper-alt);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: 0 30px 60px -30px rgba(126, 37, 71, 0.35);
}

.spotlight-media {
  position: relative;
  background: var(--paper-alt);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-media img {
  width: 100%;
  max-width: 380px;
}

.spotlight-badge {
  position: absolute;
  top: 28px;
  left: 28px;
  background: var(--rose-600);
  color: var(--ink-on-rose);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
}

.spotlight-content {
  padding: 56px 56px 56px 16px;
}

.spotlight-content h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  color: var(--rose-900);
  margin-bottom: 18px;
}

.spotlight-content p {
  color: var(--ink-muted);
  margin-bottom: 26px;
}

/* ---------- Designs page ---------- */

.page-intro {
  padding: 64px 0 8px;
}

.page-intro h1 {
  text-align: center;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--ink);
}

.designs-section {
  padding-top: 40px;
}

.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.design-card {
  display: block;
  background: var(--paper-alt);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: 0 24px 50px -30px rgba(126, 37, 71, 0.35);
  transition: transform 0.4s var(--ease-out-expo);
}

.design-card:hover {
  transform: translateY(-6px);
}

.design-gallery {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--rose-100);
  color: var(--rose-900);
}

.design-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.design-gallery-track::-webkit-scrollbar {
  display: none;
}

.design-gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  user-select: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose-900);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 8px 18px -8px rgba(20, 5, 12, 0.5);
  transition: opacity 0.25s var(--ease-out-expo), background 0.2s;
  z-index: 2;
}

.gallery-nav svg {
  width: 16px;
  height: 16px;
}

.gallery-nav:hover {
  background: var(--paper-alt);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.design-gallery:hover .gallery-nav,
.gallery-nav:focus-visible {
  opacity: 1;
}

.design-gallery.is-single .gallery-nav,
.design-gallery.is-single .gallery-dots {
  display: none;
}

.gallery-nav:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.gallery-dots {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 2;
}

.gallery-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-dot::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s, transform 0.2s;
}

.gallery-dot.is-active::after {
  background: var(--paper-alt);
  transform: scale(1.35);
}

@media (hover: none) {
  .gallery-nav {
    opacity: 1;
  }
}

.design-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.design-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rose-600);
  text-decoration: none;
}

.design-link:hover {
  color: var(--rose-900);
}

.design-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.gallery-note {
  text-align: center;
  color: var(--ink-muted);
  margin: 40px auto 0;
  font-size: 0.95rem;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}

.about-badge {
  border-radius: 999px;
  overflow: clip;
  box-shadow: 0 24px 50px -26px rgba(126, 37, 71, 0.4);
}

.about-copy p {
  color: var(--ink);
  font-size: 1.08rem;
  margin-bottom: 18px;
}

.about-copy p:last-of-type {
  margin-bottom: 0;
}

.signature {
  font-family: var(--font-signature);
  font-size: 2.1rem;
  color: var(--rose-600);
  display: inline-block;
  margin-top: 22px;
}

/* ---------- Links / close ---------- */

.links {
  background: var(--rose-900);
  color: var(--ink-on-rose);
  text-align: center;
}

.links h2 {
  color: var(--ink-on-rose);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  margin-bottom: 36px;
}

.links-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
  background: var(--paper);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 1;
  transform: none;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

/* Hero: one rehearsed entrance, distinct from the quieter reveal used elsewhere */

.js-ready .hero-mark-frame.reveal {
  transform: translateY(22px) scale(0.96);
}

.js-ready .hero-mark-frame.reveal.is-visible {
  transform: none;
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  transition-delay: 0ms;
}

.js-ready .hero-actions.reveal {
  transform: translateY(16px);
}

.js-ready .hero-actions.reveal.is-visible {
  transform: none;
  transition: opacity 0.55s var(--ease-out-expo), transform 0.55s var(--ease-out-expo);
  transition-delay: 140ms;
}

.js-ready .hero-follow.reveal {
  transform: translateY(12px);
}

.js-ready .hero-follow.reveal.is-visible {
  transform: none;
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
  transition-delay: 220ms;
}

.js-ready .hero-rail.reveal.is-visible {
  transform: none;
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
  transition-delay: 90ms;
}

.js-ready .hero-rail .rail-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
}

.js-ready .hero-rail.reveal.is-visible .rail-card {
  opacity: 1;
  transform: none;
}

.js-ready .hero-rail.reveal.is-visible .rail-card:nth-child(1) {
  transition-delay: 280ms;
}

.js-ready .hero-rail.reveal.is-visible .rail-card:nth-child(2) {
  transition-delay: 360ms;
}

.js-ready .hero-rail.reveal.is-visible .rail-card:nth-child(3) {
  transition-delay: 440ms;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-rail {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .spotlight-content {
    padding: 12px 32px 44px;
    text-align: center;
  }

  .spotlight-media {
    padding: 40px 32px 8px;
  }

  .spotlight-badge {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .about-badge {
    width: 200px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 72px 0;
  }

  .hero {
    padding: 72px 0 88px;
  }

  .page-intro {
    padding: 48px 0 4px;
  }

  .header-inner {
    padding: 12px 20px;
    gap: 12px;
  }

  .brand-frame {
    padding: 4px 10px;
  }

  .brand-mark {
    max-height: 32px;
  }

  .nav {
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: var(--paper-alt);
    border-bottom: 1px solid rgba(126, 37, 71, 0.12);
    box-shadow: 0 16px 30px -18px rgba(30, 8, 18, 0.35);
    padding: 8px 20px 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo), visibility 0.25s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a {
    padding: 10px 0;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .header-inner {
    gap: 8px;
  }

  .brand-frame {
    padding: 4px 8px;
  }

  .brand-mark {
    max-height: 26px;
  }

  .nav {
    gap: 8px;
  }

  .nav .btn-sm {
    padding: 0.45em 0.9em;
    font-size: 0.8rem;
  }

  .nav .btn-sm::after {
    display: none;
  }
}
