/* Colorknot — paper gouache, palette nav, ring hero, chain gallery */

:root {
  --paper: #f7f2ea;
  --paper-deep: #ebe3d6;
  --ink: #1e2a44;
  --ink-soft: rgba(30, 42, 68, 0.72);
  --sage: #9cb89a;
  --rose: #e8a4a4;
  --lavender: #c4b5e8;
  --teal: #7eb8b0;
  --coral: #e8927a;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(30, 42, 68, 0.1);
  --radius: 20px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Quicksand", system-ui, sans-serif;
}

*,
*::before,
*::after {
  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;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(156, 184, 154, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(196, 181, 232, 0.18) 0%, transparent 42%),
    linear-gradient(180deg, var(--paper) 0%, #faf6ef 100%);
  opacity: 0.95;
}

/* Palette nav */
.palette-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.55rem 1rem;
}

.palette-nav.is-scrolled .palette-nav__bar {
  box-shadow: var(--shadow);
}

.palette-nav__bar {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 3px solid var(--ink);
  border-radius: calc(var(--radius) + 4px);
  transition: box-shadow 0.25s ease;
}

.palette-nav__swatches {
  display: none;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--paper-deep);
}

.palette-nav__swatches i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.palette-nav__swatches i:nth-child(1) {
  background: var(--sage);
}
.palette-nav__swatches i:nth-child(2) {
  background: var(--rose);
}
.palette-nav__swatches i:nth-child(3) {
  background: var(--lavender);
}
.palette-nav__swatches i:nth-child(4) {
  background: var(--teal);
}
.palette-nav__swatches i:nth-child(5) {
  background: var(--coral);
}

@media (min-width: 900px) {
  .palette-nav__swatches {
    display: flex;
  }
}

.palette-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.palette-nav__brand img {
  border-radius: 11px;
  border: 2px solid var(--ink);
}

.palette-nav__brand:hover {
  text-decoration: none;
}

.palette-nav__links {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 1.5rem;
}

.palette-nav__links a {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
}

.palette-nav__links a:hover {
  color: var(--ink);
}

.palette-nav__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.palette-nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper-deep);
  border-radius: 12px;
  cursor: pointer;
}

.palette-nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
}

@media (min-width: 880px) {
  .palette-nav__links {
    display: flex;
  }
  .palette-nav__burger {
    display: none;
  }
}

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 99;
  padding: 5.5rem 1.5rem 2rem;
  background: rgba(30, 42, 68, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-sheet[hidden] {
  display: none !important;
}

.nav-sheet a {
  padding: 1rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 0.85rem 1.35rem;
  font-size: 1rem;
}

.btn--xl {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn--ink {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 6px 0 #0f1524;
}

.btn--ink:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #0f1524;
}

.btn--paper {
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
}

/* Hero */
.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 3rem;
}

.hero__banner {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.hero__banner img {
  width: 100%;
  object-fit: cover;
}

.hero__knot {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__knot {
    grid-template-columns: 1fr minmax(240px, 280px);
    gap: 2.5rem;
  }
}

.hero__kicker {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.94rem;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.hero h1 span {
  color: var(--coral);
}

.hero__lead {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.hero__phone {
  position: relative;
  margin: 0 auto;
  max-width: 270px;
}

.hero__ring {
  position: absolute;
  border: 4px solid var(--ink);
  border-radius: 50%;
  border-top-color: transparent;
  pointer-events: none;
}

.hero__ring--a {
  width: 88px;
  height: 88px;
  top: -12px;
  right: -8px;
  transform: rotate(25deg);
  border-right-color: var(--sage);
}

.hero__ring--b {
  width: 64px;
  height: 64px;
  bottom: 20%;
  left: -16px;
  transform: rotate(-40deg);
  border-right-color: var(--lavender);
}

.hero__phone img {
  width: 100%;
  max-height: min(70vh, 520px);
  object-fit: contain;
  border-radius: 28px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

/* Section head */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--coral);
  margin: 0 0 0.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  margin: 0;
}

.section-head h2 span {
  color: var(--lavender);
  filter: saturate(1.2);
}

.section-head__lead {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

/* Paper feature cards */
.room-features {
  padding: 3rem 0 4rem;
}

.room-features__grid {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .room-features__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.paper-card {
  border: 3px solid var(--ink);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.3rem 1.35rem;
  box-shadow: 6px 6px 0 var(--ink);
}

.paper-card--sage {
  background: linear-gradient(145deg, #f5faf4 0%, rgba(156, 184, 154, 0.45) 100%);
}

.paper-card--rose {
  background: linear-gradient(145deg, #fff8f8 0%, rgba(232, 164, 164, 0.45) 100%);
}

.paper-card--lavender {
  background: linear-gradient(145deg, #f9f7ff 0%, rgba(196, 181, 232, 0.5) 100%);
}

.paper-card--teal {
  background: linear-gradient(145deg, #f4faf9 0%, rgba(126, 184, 176, 0.45) 100%);
}

.paper-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.paper-card__icon svg {
  width: 24px;
  height: 24px;
}

.paper-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 0.45rem;
}

.paper-card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Chain gallery */
.chain-gallery {
  padding: 2rem 0 4rem;
  position: relative;
}

.chain-gallery__track {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.chain-gallery__arc {
  display: none;
}

@media (min-width: 900px) {
  .chain-gallery__arc {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 90%);
    height: 40px;
    border: 3px dashed rgba(30, 42, 68, 0.2);
    border-bottom: none;
    border-radius: 680px 680px 0 0;
    pointer-events: none;
  }
}

.chain-shot {
  margin: 0;
  flex: 0 0 200px;
}

.chain-shot__frame {
  box-sizing: border-box;
  width: 200px;
  height: 356px;
  padding: 10px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chain-shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 480px) {
  .chain-shot {
    flex-basis: min(46vw, 200px);
  }

  .chain-shot__frame {
    width: min(46vw, 200px);
    height: calc(min(46vw, 200px) * 16 / 9);
  }
}

/* Download */
.download {
  padding: 2rem 1.25rem 4.5rem;
}

.download__canvas {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 2.25rem 1.75rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
}

.download__icon {
  margin: 0 auto 1rem;
  border-radius: 18px;
  border: 2px solid var(--ink);
}

.download__canvas h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0 0 0.75rem;
}

.download__lead {
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

.download__canvas p {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
}

.download__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .download__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
  padding: 2rem 1.25rem;
}

.footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.footer__links a {
  color: var(--sage);
  text-decoration: none;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.65;
}

/* Modal */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 42, 68, 0.5);
}

.modal__panel {
  position: relative;
  max-width: 400px;
  width: 100%;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__ring {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 4px solid var(--ink);
  border-radius: 50%;
  border-top-color: var(--coral);
}

.modal__panel h2 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
}

.modal__panel p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}
