/* ============================================================
   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-800: #7E2547;   /* deep rose — headings and text on the blush field, button lip */
  --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;       /* text on rose-600 / rose-800 fills only */
  --ink-on-rose-muted: #E7BBCC; /* borders and lips on light buttons */

  /* Surfaces */
  --field-blush: #F8E1E7;  /* powder-pink field — hero and closing section; text on it uses --ink / --rose-800 */

  /* 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%;
  height: auto;
  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;
  overflow-wrap: break-word;
}

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-800);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 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-800);
  border-color: var(--ink-on-rose-muted);
  box-shadow: 0 4px 0 0 var(--ink-on-rose-muted);
}

.btn-primary:hover {
  color: var(--rose-800);
  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: var(--rose-800);
  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);
  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-800);
  box-shadow: 0 4px 0 0 var(--rose-800);
}

.btn-rose:hover {
  color: var(--ink-on-rose);
  box-shadow: 0 6px 0 0 var(--rose-800);
}

.btn-rose:active {
  box-shadow: 0 1px 0 0 var(--rose-800);
}

.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;
  /* 44px tap area around a 22px icon; the negative margin keeps the visual spacing */
  padding: 11px;
  margin: -11px -5px;
}

.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: 44px;
  height: 44px;
  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(--field-blush);
  color: var(--ink);
  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;
}

.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-what {
  margin-top: -12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-align: center;
}

/* On narrow screens the two halves stack instead of breaking at a dot. */
@media (max-width: 480px) {
  .hero-what span:not(.hero-what-sep) {
    display: block;
  }

  .hero-what-sep {
    display: none;
  }
}

.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(--rose-800);
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 4px;
}

.hero-follow:hover {
  color: var(--rose-600);
}

.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(--rose-800);
  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-800);
  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(--rose-800);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.rail-more:hover {
  color: var(--rose-600);
}

/* ---------- 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 {
  align-self: flex-start;
  position: relative;
  background: var(--paper-alt);
  /* top padding leaves room for the badge and its googly eyes */
  padding: 104px 40px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-media img {
  width: 100%;
  max-width: 380px;
}

.spotlight-badge {
  position: absolute;
  top: 46px;
  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 h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  color: var(--rose-800);
  margin-bottom: 18px;
}

.spotlight-content .spotlight-lead {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 14px;
}

.spotlight-content p {
  color: var(--ink-muted);
  margin-bottom: 26px;
}

/* Googly eyes peeking over the "Now hatching" badge; js/main.js points
   the pupils at the visitor's pointer. */
.googly {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 7px);
  translate: -50% 0;
  display: flex;
  gap: 1px;
  pointer-events: none;
}

.googly-eye {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper-alt);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 6px -3px rgba(61, 36, 42, 0.5);
}

.googly-pupil {
  position: absolute;
  top: calc(50% - 5.5px);
  left: calc(50% - 5.5px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.18s var(--ease-out-expo);
}

/* "The first bird has hatched" link to Cheeky Chicken */
.hatched {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 380px;
  margin-bottom: 26px;
  padding: 10px 18px 10px 10px;
  background: var(--rose-100);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.hatched-thumb {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: clip;
}

.hatched-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hatched-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hatched-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.hatched-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--rose-800);
}

@media (hover: hover) {
  .hatched:hover {
    transform: translateY(-3px);
  }
}

/* Collection membership on cards and design pages */
.collection-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  background: var(--rose-600);
  color: var(--ink-on-rose);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.collection-link {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  background: var(--rose-100);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--rose-800);
  text-decoration: none;
}

.collection-link:hover {
  background: var(--rose-300);
  color: var(--rose-800);
}

/* ---------- 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-800);
}

.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-800);
  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-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--rose-100);
  overflow: clip;
}

.design-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

a.design-photo:hover img {
  transform: scale(1.04);
}

.design-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.design-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.design-meta {
  margin-top: -8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.design-title a {
  color: inherit;
  text-decoration: none;
}

.design-title a:hover {
  color: var(--rose-600);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .btn {
  flex: 1 1 0;
  justify-content: center;
}

.btn-xs {
  padding: 0.45em 0.6em;
  font-size: 0.85rem;
  border-width: 2px;
}

.btn-xs::after {
  display: none;
}

/* ---------- Design detail page ---------- */

.pattern {
  padding: 40px 0 100px;
}

.back-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.pattern-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-top: 24px;
}

.pattern-gallery {
  position: sticky;
  top: 96px;
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: 0 30px 60px -30px rgba(126, 37, 71, 0.4);
}

.pattern-summary h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--ink);
}

.pattern-buy {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.pattern-heading {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--rose-800);
  margin: 48px 0 18px;
  padding-top: 32px;
  border-top: 1px solid rgba(126, 37, 71, 0.12);
}

.pattern-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  margin: 0;
}

.pattern-facts dt,
.pattern-block h3,
.yarn-table th {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.pattern-facts dt {
  padding-top: 0.2em;
}

.pattern-facts dd {
  margin: 0;
}

.pattern-block {
  margin-top: 36px;
}

.pattern-block h3 {
  color: var(--ink);
  margin-bottom: 12px;
}

.pattern-block ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.pattern-block li::marker {
  color: var(--rose-600);
}

/* Unfilled pattern details stay out of sight until Nikkie fills them in:
   an empty <dd>, a yarn table without rows, or a list without items
   hides its heading too. */
.pattern-facts dt:has(+ dd:empty),
.pattern-facts dd:empty,
.pattern-facts:not(:has(dd:not(:empty))),
.pattern-block:has(tbody):not(:has(tbody tr)),
.pattern-block:has(ul):not(:has(li)) {
  display: none;
}

/* Shown only while both the yarn table and the materials list are still empty. */
.pattern-fallback {
  display: none;
  margin-top: 28px;
  color: var(--ink-muted);
}

.pattern-summary:not(:has(.pattern-block-yarn tbody tr)):not(:has(.pattern-block-materials li)) .pattern-fallback {
  display: block;
}

.pattern-buy-note {
  flex-basis: 100%;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.pattern-buy-end {
  margin-top: 40px;
}

.yarn-table {
  width: 100%;
  border-collapse: collapse;
}

.yarn-table th {
  text-align: left;
  padding: 0 12px 10px 0;
}

.yarn-table td {
  padding: 12px 12px 12px 0;
  border-top: 1px solid rgba(126, 37, 71, 0.12);
}

.yarn-table td:nth-child(2) {
  font-weight: 700;
}

.yarn-table th:first-child,
.yarn-table td:first-child {
  width: 40px;
}

.yarn-swatch {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1.5px solid rgba(61, 36, 42, 0.18);
}

.pattern-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(126, 37, 71, 0.12);
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.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 {
  align-self: flex-start;
  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;
}

.about-copy h2 {
  margin-bottom: 18px;
}

.about-copy .about-motto {
  margin-top: 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--rose-800);
}

.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(--field-blush);
  color: var(--ink);
  text-align: center;
}

.links h2 {
  color: var(--rose-800);
  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: 100px 32px 8px;
  }

  .spotlight-badge {
    left: 50%;
    transform: translateX(-50%);
  }

  .hatched {
    margin-inline: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .about-badge {
    width: 200px;
  }

  .pattern-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pattern-gallery {
    position: relative;
    top: auto;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
}

@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: 14px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav a:not(.btn) {
    font-size: 0.92rem;
  }
}

/* Two nav links fit next to the logo on phones; only the narrowest
   screens fold them into the menu button. */
@media (max-width: 359px) {
  .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 .nav-links a {
    padding: 10px 0;
    margin-block: 0;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .header-inner {
    gap: 8px;
  }

  .brand-frame {
    padding: 4px 8px;
  }

  .brand-mark {
    max-height: 26px;
  }

  .nav {
    gap: 8px;
  }
}

/* ---------- Touch ---------- */

/* Finger-sized targets (44px) wherever the primary pointer is coarse. */
@media (pointer: coarse) {
  .nav-links a,
  .back-link,
  .hero-follow,
  .rail-more {
    padding-block: 10px;
    margin-block: -10px;
  }

  .back-link,
  .rail-more,
  .nav-links a {
    display: inline-block;
    min-width: 44px;
    text-align: center;
  }

  .gallery-nav {
    width: 44px;
    height: 44px;
  }

  .gallery-dot {
    width: 32px;
    height: 32px;
  }

  .btn-xs {
    padding-block: 0.75em;
  }

  .collection-link {
    padding-block: 11px;
  }
}

/* Touch screens keep a tapped element "hovered"; only lift on real hover. */
@media (hover: none) {
  .btn:hover,
  .design-card:hover,
  .rail-card:hover,
  a.design-photo:hover img {
    transform: none;
  }
}

/* Landscape phones: keep a portrait gallery photo within the screen height. */
@media (max-width: 860px) and (orientation: landscape) {
  .pattern-gallery {
    max-width: min(520px, 62svh);
  }
}
