/* ═══════════════════════════════════════════════════════════════
   SCRIPTORIUM — PAGES.CSS
   Shared styles for: 404, placeholder, contact, feedback, help
   Uses the same design tokens as landing.css / auth.css
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ───────────────────────────────────────────────── */
:root {
  --cream:      #faf7f2;
  --cream-2:    #f2ece2;
  --cream-3:    #e4dbd0;
  --ink:        #1c1814;
  --ink-2:      #3a3228;
  --ink-3:      #7a6e62;
  --ink-4:      #b0a494;

  --teal:       #3d8c80;
  --teal-l:     #c2e0db;
  --teal-p:     #eaf5f3;
  --amber:      #bf7a30;
  --amber-p:    #fdf3e4;
  --lavender:   #7a68c0;
  --lavender-p: #f0eefa;
  --rose:       #c05868;
  --rose-p:     #fdf0f2;

  --font-clash:  'Clash Display', 'Helvetica Neue', Arial, sans-serif;
  --font-caveat: 'Caveat', cursive;
  --font-body:   'DM Sans', system-ui, sans-serif;

  --expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --sh-card:  0 2px 4px rgba(28,24,20,0.06), 0 8px 24px rgba(28,24,20,0.07);
  --sh-hover: 0 4px 8px rgba(28,24,20,0.10), 0 20px 56px rgba(28,24,20,0.12);
}

/* ── 2. RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body.page-body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100svh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }
input, textarea, select { font: inherit; }
img, svg { display: block; }

/* ── 3. GRAIN ────────────────────────────────────────────────── */
.grain {
  position: fixed; inset: -60%;
  width: 220%; height: 220%;
  z-index: 1000; pointer-events: none; opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)}   12%{transform:translate(-2%,-2%)}
  25%{transform:translate(2%,-1%)}    37%{transform:translate(-1%,2%)}
  50%{transform:translate(1%,-2%)}    62%{transform:translate(-2%,1%)}
  75%{transform:translate(2%,2%)}     87%{transform:translate(-1%,-1%)}
}

/* ── 4. AMBIENT ORBS ─────────────────────────────────────────── */
.page-orb {
  position: fixed; border-radius: 50%;
  filter: blur(88px); pointer-events: none; z-index: 0;
}
.page-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(61,140,128,0.10), transparent 68%);
  top: -10%; left: -15%;
  animation: orbA 22s ease-in-out infinite alternate;
}
.page-orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(191,122,48,0.07), transparent 65%);
  bottom: 5%; right: -8%;
  animation: orbB 26s ease-in-out infinite alternate;
}
@keyframes orbA { from{transform:translate(0,0)} to{transform:translate(40px,28px)} }
@keyframes orbB { from{transform:translate(0,0)} to{transform:translate(-28px,-36px)} }

/* ── 5. PAGE WRAPPER ─────────────────────────────────────────── */
.page-main {
  position: relative; z-index: 10;
  max-width: 1100px; margin: 0 auto;
  padding: 7rem clamp(1.5rem, 5vw, 3rem) 6rem;
}

.page-main--narrow {
  max-width: 680px;
}

.page-main--wide {
  max-width: 1200px;
}

/* ── 6. PAGE HEADER ──────────────────────────────────────────── */
.page-eyebrow {
  font-family: var(--font-clash);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.page-eyebrow::before {
  content: '';
  display: block; width: 18px; height: 1.5px;
  background: var(--teal); border-radius: 2px;
}

.page-h1 {
  font-family: var(--font-clash);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.06;
  color: var(--ink); margin-bottom: 0.6rem;
}

.page-h1 .caveat {
  font-family: var(--font-caveat);
  font-size: 1.2em; font-weight: 700;
  color: var(--teal); display: inline-block;
  transform: rotate(-1.5deg); transform-origin: left;
}

.page-sub {
  font-size: 1rem; color: var(--ink-3);
  line-height: 1.65; max-width: 520px;
}

/* ── 7. BACK BUTTON ──────────────────────────────────────────── */
.btn-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.1rem; border-radius: 100px;
  border: 1.5px solid var(--cream-3); background: #fff;
  color: var(--ink-3); font-family: var(--font-clash);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em;
  transition: border-color 0.22s, color 0.22s, box-shadow 0.22s, transform 0.25s var(--spring);
  margin-bottom: 2.5rem;
}
.btn-back svg { width: 14px; height: 14px; transition: transform 0.25s var(--spring); }
.btn-back:hover {
  border-color: var(--teal-l); color: var(--teal);
  box-shadow: 0 4px 14px rgba(61,140,128,0.12); transform: translateX(-2px);
}
.btn-back:hover svg { transform: translateX(-3px); }

/* ── 8. CARD ─────────────────────────────────────────────────── */
.page-card {
  background: #fff;
  border: 1.5px solid var(--cream-3);
  border-radius: 24px;
  padding: 2rem 2.25rem;
  box-shadow: var(--sh-card);
}

/* ── 9. DIVIDER ──────────────────────────────────────────────── */
.page-divider {
  height: 1px; background: var(--cream-3); margin: 2rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════════════════════ */
.not-found {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 14rem);
}

.not-found-number {
  font-family: var(--font-caveat);
  font-size: clamp(8rem, 20vw, 16rem);
  font-weight: 700;
  line-height: 0.9;
  color: var(--ink);
  position: relative;
  display: inline-block;
}
.not-found-number .zero {
  color: var(--teal);
  display: inline-block;
  animation: zero-wobble 3s ease-in-out infinite;
}
@keyframes zero-wobble {
  0%,100%{transform:rotate(0deg) scale(1)}
  30%{transform:rotate(-6deg) scale(1.05)}
  60%{transform:rotate(4deg) scale(0.98)}
}

.not-found-tagline {
  font-family: var(--font-clash);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 0.75rem; line-height: 1.2;
}

.not-found-body {
  font-size: 0.95rem; color: var(--ink-3);
  line-height: 1.65; margin-bottom: 2rem; max-width: 380px;
}

.not-found-img {
  display: flex; align-items: center; justify-content: center;
}
.not-found-img img {
  width: clamp(180px, 30vw, 320px);
  animation: float-404 5s ease-in-out infinite;
  filter: drop-shadow(0 16px 40px rgba(28,24,20,0.12));
}
@keyframes float-404 {
  0%,100%{transform:translateY(0) rotate(0deg)}
  40%{transform:translateY(-20px) rotate(2deg)}
  70%{transform:translateY(-8px) rotate(-1.5deg)}
}

/* ═══════════════════════════════════════════════════════════════
   PLACEHOLDER PAGE
   ═══════════════════════════════════════════════════════════════ */
.placeholder-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 14rem);
}

.placeholder-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--amber-p); border: 1.5px solid rgba(191,122,48,0.3);
  color: var(--amber);
  font-family: var(--font-clash); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.35rem 1rem; border-radius: 100px; margin-bottom: 1.5rem;
}
.placeholder-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.placeholder-img {
  display: flex; align-items: center; justify-content: center;
}
.placeholder-img img {
  width: clamp(160px, 28vw, 300px);
  animation: rocket-launch 4s ease-in-out infinite;
  filter: drop-shadow(0 16px 40px rgba(28,24,20,0.12));
}
@keyframes rocket-launch {
  0%,100%{transform:translateY(0) rotate(0deg)}
  25%{transform:translateY(-22px) rotate(-3deg)}
  65%{transform:translateY(-10px) rotate(2deg)}
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════════════════════════ */
.contact-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-bottom: 6rem;
}

.contact-links { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 2rem; }

.contact-link {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.1rem 1.4rem;
  background: #fff; border: 1.5px solid var(--cream-3);
  border-radius: 20px; box-shadow: var(--sh-card);
  transition: transform 0.3s var(--spring), box-shadow 0.3s, border-color 0.25s;
}
.contact-link:hover {
  transform: translateX(6px);
  box-shadow: var(--sh-hover); border-color: var(--teal-l);
}

.contact-link-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-link-icon--teal { background: var(--teal-p); }
.contact-link-icon--ink  { background: var(--cream-2); }
.contact-link-icon--lavender { background: var(--lavender-p); }
.contact-link-icon svg { width: 22px; height: 22px; }
.contact-link-icon--teal svg { color: var(--teal); }
.contact-link-icon--ink  svg { color: var(--ink-2); }
.contact-link-icon--lavender svg { color: var(--lavender); }

.contact-link-label {
  font-family: var(--font-clash); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal);
  display: block; margin-bottom: 0.2rem;
}
.contact-link-value {
  font-size: 0.92rem; font-weight: 600; color: var(--ink);
}

.contact-doll-img {
  display: flex; align-items: center; justify-content: center;
}
.contact-doll-img img {
  width: clamp(160px, 28vw, 300px);
  animation: doll-float 6s ease-in-out infinite;
  filter: drop-shadow(0 16px 40px rgba(28,24,20,0.12));
}
@keyframes doll-float {
  0%,100%{transform:translateY(0) rotate(0deg)}
  40%{transform:translateY(-16px) rotate(-2deg)}
  70%{transform:translateY(-6px) rotate(1.5deg)}
}

/* Team section */
.team-section { margin-top: 2rem; }

.team-section-title {
  font-family: var(--font-clash);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  color: var(--ink); margin-bottom: 0.5rem;
}
.team-section-sub {
  font-size: 0.9rem; color: var(--ink-3); margin-bottom: 4rem;
}

.team-member {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 3rem 0;
  border-top: 1.5px solid var(--cream-3);
}
.team-member:last-child { border-bottom: 1.5px solid var(--cream-3); }

.team-member-img {
  display: flex; justify-content: center;
}
.team-member-img img {
  width: clamp(140px, 22vw, 260px);
  transition: transform 0.5s var(--spring);
  filter: drop-shadow(0 8px 24px rgba(28,24,20,0.10));
}
.team-member-img img:hover { transform: scale(1.06) rotate(-2deg); }

.team-member-name {
  font-family: var(--font-clash);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 0.3rem;
}
.team-member-role {
  font-family: var(--font-clash); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1rem;
}
.team-member-bio {
  font-size: 0.9rem; color: var(--ink-3); line-height: 1.7;
}

/* Reverse layout for alternating rows */
.team-member--reverse .team-member-img { order: 2; }
.team-member--reverse .team-member-info { order: 1; }

/* ═══════════════════════════════════════════════════════════════
   FEEDBACK PAGE
   ═══════════════════════════════════════════════════════════════ */
.feedback-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1.5px solid var(--cream-3);
}
.feedback-header .page-eyebrow {
  justify-content: center;
}
.feedback-header .page-eyebrow::before { display: none; }

.feedback-form { display: flex; flex-direction: column; gap: 1.5rem; }

/* Form field */
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }

.form-label {
  font-family: var(--font-clash);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.form-label .optional {
  color: var(--ink-4); font-family: var(--font-body);
  font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.72rem;
}
.form-label .required { color: var(--rose); }

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: var(--cream);
  border: 1.5px solid var(--cream-3);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem; color: var(--ink);
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
  -webkit-appearance: none; appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--ink-4); }
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(61,140,128,0.12);
}

.form-textarea { resize: none; min-height: 160px; line-height: 1.65; }

.form-select-wrap { position: relative; }
.form-select-wrap::after {
  content: '';
  position: absolute; right: 1.1rem; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 6px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b0a494' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: contain;
}
.form-select { padding-right: 2.5rem; cursor: pointer; }

/* Submit button */
.btn-submit {
  width: 100%; height: 52px;
  background: var(--ink); color: var(--cream);
  font-family: var(--font-clash);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: none; cursor: pointer;
  transition: background 0.22s, transform 0.25s var(--spring), box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.btn-submit::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform 0.5s ease;
}
.btn-submit:hover::after { transform: translateX(100%); }
.btn-submit:hover { background: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(61,140,128,0.3); }
.btn-submit:disabled { opacity: 0.55; pointer-events: none; animation: btn-pulse 1.4s ease-in-out infinite; }
@keyframes btn-pulse { 0%,100%{opacity:0.55} 50%{opacity:0.35} }

/* Messages */
.form-msg {
  display: none;
  padding: 0.85rem 1.1rem 0.85rem 1.3rem;
  border-radius: 14px; font-size: 0.84rem; line-height: 1.5;
  border: 1.5px solid transparent;
  position: relative; overflow: hidden;
  animation: msg-in 0.3s var(--expo) both;
}
.form-msg::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: 4px 0 0 4px;
}
.form-msg.visible { display: block; }
.form-msg--success {
  background: var(--teal-p); border-color: rgba(61,140,128,0.3); color: var(--teal);
}
.form-msg--success::before { background: var(--teal); }
.form-msg--error {
  background: var(--rose-p); border-color: rgba(192,88,104,0.3); color: var(--rose);
}
.form-msg--error::before { background: var(--rose); }
@keyframes msg-in { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }

.form-footer-note {
  text-align: center; font-size: 0.78rem; color: var(--ink-4);
}
.form-footer-note a { color: var(--teal); border-bottom: 1px solid var(--teal-l); transition: border-color 0.2s; }
.form-footer-note a:hover { border-color: var(--teal); }

/* ═══════════════════════════════════════════════════════════════
   HELP PAGE
   ═══════════════════════════════════════════════════════════════ */
.help-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

.help-sidebar {
  position: sticky; top: 7rem;
}

.help-sidebar-title {
  font-family: var(--font-clash); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 0.75rem;
}

.help-nav { display: flex; flex-direction: column; gap: 2px; }

.help-nav-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem; border-radius: 10px;
  font-size: 0.82rem; color: var(--ink-3);
  transition: background 0.18s, color 0.18s;
}
.help-nav-link:hover { background: var(--cream-2); color: var(--ink); }
.help-nav-link.active { background: var(--teal-p); color: var(--teal); font-weight: 600; }
.help-nav-icon { font-size: 0.9rem; flex-shrink: 0; }

/* Help content */
.help-content { min-width: 0; }

.help-page-header {
  padding-bottom: 2rem;
  border-bottom: 1.5px solid var(--cream-3);
  margin-bottom: 2.5rem;
}

.help-section {
  background: #fff;
  border: 1.5px solid var(--cream-3);
  border-radius: 20px; padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  position: relative; overflow: hidden;
  transition: box-shadow 0.3s;
}
.help-section:hover { box-shadow: var(--sh-card); }

/* Left accent stripe */
.help-section::before {
  content: ''; position: absolute;
  left: 0; top: 1rem; bottom: 1rem;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--teal), transparent);
}

.help-section-header {
  display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem;
}

.help-section-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--teal-p); border: 1.5px solid var(--teal-l);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.help-section-title {
  font-family: var(--font-clash); font-size: 1rem; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em;
}

.help-body {
  font-size: 0.86rem; color: var(--ink-3); line-height: 1.75;
}
.help-body p { margin-bottom: 0.6rem; }
.help-body p:last-child { margin-bottom: 0; }
.help-body strong { color: var(--ink-2); font-weight: 600; }
.help-body .hl { color: var(--teal); font-weight: 600; }
.help-body .hl-gold { color: var(--amber); font-weight: 600; }

/* Room spots list */
.room-spots { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 1rem; }

.room-spot {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; border-radius: 12px;
  background: var(--cream); border: 1.5px solid var(--cream-3);
  font-size: 0.82rem; color: var(--ink-2);
  transition: border-color 0.2s, background 0.2s;
}
.room-spot:hover { background: var(--teal-p); border-color: var(--teal-l); }
.room-spot-icon { font-size: 1rem; flex-shrink: 0; }
.room-spot-arrow {
  margin-left: auto;
  font-family: var(--font-clash); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--teal); text-transform: uppercase;
}

/* Yarn table */
.yarn-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.yarn-table td {
  padding: 0.6rem 0; font-size: 0.82rem;
  border-bottom: 1px solid var(--cream-3);
}
.yarn-table tr:last-child td { border-bottom: none; }
.yarn-table td:first-child { color: var(--ink-3); }
.yarn-table td:last-child { text-align: right; color: var(--amber); font-weight: 700; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .not-found,
  .placeholder-wrap,
  .contact-hero { grid-template-columns: 1fr; text-align: center; }

  .not-found-img,
  .placeholder-img,
  .contact-doll-img { order: -1; }

  .not-found-body { margin-left: auto; margin-right: auto; }

  .team-member {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .team-member--reverse .team-member-img { order: -1; }
  .team-member--reverse .team-member-info { order: 1; }
  .team-member-img img { margin: 0 auto; }

  .help-layout { grid-template-columns: 1fr; }
  .help-sidebar { position: static; }
  .help-nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .page-main { padding-top: 5.5rem; }
}

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}