*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--blush);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b08e75;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--blush) var(--cream);
}

:root {
  --cream: #FAF7F2;
  --warm-white: #FFFDF9;
  --stone: #D6CFC4;
  --muted: #9A9186;
  --ink: #2C2620;
  --ink-light: #5C5248;
  --blush: #C9A98E;
  --blush-light: #E8D9CC;
  --gold: #B8934A;
  --gold-light: #EAD9B8;
  --sage: #7A8C72;
  --paw: #C9A98E;
  --max-width: 1250px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;  /* ADD THIS */
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;  /* ADD THIS */
}
/* ── HEADER ── */
header {
  background: var(--warm-white);
  border-bottom: 1px solid var(--stone);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 600px) {
  header {
    padding: 0 1rem;
  }

  .logo {
    font-size: 20px;
  }
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--blush);
}

.desktop-nav {
  display: flex;
  gap: 24px;
}

.desktop-nav a,
.mobile-nav a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--ink);
}

/* ── MOBILE TOGGLE ── */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  transition: all 0.3s ease;
  transform-origin: center;
}

body.menu-open .mobile-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.menu-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .mobile-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── OFFCANVAS ── */
.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 38, 32, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.offcanvas-panel {
  position: fixed;
  top: 0;
  right: 0;                          /* changed from -320px */
  width: 320px;
  height: 100%;
  background: var(--warm-white);
  z-index: 1001;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  transform: translateX(100%);       /* ADD — hides it off-screen instead */
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);  /* updated */
}

body.menu-open .offcanvas-panel {
  transform: translateX(0);          /* changed from right: 0 */
}

@media (max-width: 360px) {
  .offcanvas-panel {
    width: 280px;
    padding: 30px 20px;
  }
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .offcanvas-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open .offcanvas-panel {
  right: 0;
}

.offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.close-offcanvas {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.mobile-nav a {
  font-size: 18px;
  font-family: 'Cormorant Garamond', serif;
  color: var(--ink);
  border-bottom: 1px solid var(--stone);
  padding-bottom: 12px;
}

.offcanvas-footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }
}

/* ── HERO ── */
.hero {
  background: var(--warm-white);
  text-align: center;
  padding: 80px 1.5rem 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, 100vw);  /* was: 500px */
  height: 500px;
  background: radial-gradient(circle, rgba(201, 169, 142, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.paw-icon {
  font-size: 40px;
  margin-bottom: 20px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  .hero {
    padding: 60px 2rem 40px;
  }

  .hero p {
    font-size: 14px;
    margin-bottom: 24px;
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 42px);
  }
}

.hero h1 em {
  font-style: italic;
  color: var(--blush);
}

.hero p {
  font-size: 16px;
  color: var(--ink-light);
  max-width: 520px;
  margin: 0 auto 32px;
  font-weight: 300;
  line-height: 1.7;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scroll-cue svg {
  width: 14px;
  height: 14px;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(4px)
  }
}

/* ── MAIN LAYOUT ── */
.app-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  width: 100%;          /* ADD THIS */
  box-sizing: border-box; /* ADD THIS */
}

@media (max-width: 768px) {
  .app-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 1.5rem;
    justify-items: center;
  }

  .form-panel,
  .letter-panel {
    width: 100%;
    max-width: 100%;
    /* Allow it to be full width within the padding */
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .app-wrapper {
    padding: 30px 1.25rem;
  }
}

/* ── FORM PANEL ── */
.form-panel {
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: 16px;
  padding: 36px;
  position: relative;
  width: 100%;
  overflow-x: hidden;
  height: 100%;
}

@media (max-width: 850px) {
  .form-panel {
    padding: 30px 24px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .tone-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .form-panel {
    padding: 24px 16px;
  }

  .tone-grid {
    grid-template-columns: 1fr;
  }
}

.panel-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}

.panel-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  font-weight: 300;
}

/* ── STEP INDICATOR ── */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--stone);
  z-index: 0;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.3s;
}

.step.active .step-dot {
  background: var(--blush);
  border-color: var(--blush);
  color: white;
}

.step.done .step-dot {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}

.step-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 400px) {
  .step-label {
    font-size: 9px;
  }
}

.step.active .step-label {
  color: var(--blush);
  font-weight: 500;
}

/* ── FORM FIELDS ── */
.field-group {
  margin-bottom: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(201, 169, 142, 0.15);
}

select {
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: var(--ink-light);
  user-select: none;
}

.check-item:hover {
  border-color: var(--blush);
}

.check-item input {
  display: none;
}

.check-item.selected {
  border-color: var(--blush);
  background: rgba(201, 169, 142, 0.1);
  color: var(--ink);
}

.tool-icon-wrapper {
  width: 56px;
  height: 56px;
  background: var(--warm-white);
  border: 1px solid var(--blush);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--blush);
  transition: all 0.3s ease;
}

.check-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.check-item.selected .check-mark {
  background: var(--blush);
  border-color: var(--blush);
}

.check-mark::after {
  content: '';
  width: 4px;
  height: 7px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity 0.15s;
}

.check-item.selected .check-mark::after {
  opacity: 1;
}

/* ── TONE SELECTOR ── */
.tone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tone-card {
  border: 1.5px solid var(--stone);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--cream);
}

.tone-card:hover {
  border-color: var(--blush);
  transform: translateY(-1px);
}

.tone-card.selected {
  border-color: var(--blush);
  background: rgba(201, 169, 142, 0.1);
}

.tone-emoji {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

.tone-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tone-card.selected .tone-name {
  color: var(--blush);
}

/* ── NAV BUTTONS ── */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--ink);
  color: white;
  flex: 1;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--ink-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--stone);
}

.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-generate {
  background: linear-gradient(135deg, var(--blush) 0%, #B8934A 100%);
  color: white;
  flex: 1;
  justify-content: center;
  font-size: 15px;
  padding: 13px 28px;
  box-shadow: 0 4px 20px rgba(201, 169, 142, 0.35);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 169, 142, 0.45);
}

.btn-generate:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

/* ── STEP PANELS ── */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── LETTER PANEL ── */
.letter-panel {
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 84px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.letter-header {
  background: var(--ink);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.letter-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.letter-actions {
  display: flex;
  gap: 8px;
}

.letter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.letter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

@media (max-width: 600px) {
  .letter-actions {
    gap: 4px;
  }

  .letter-btn {
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 4px;
  }
}

.letter-body {
  padding: 36px;
  min-height: 520px;
  background: var(--warm-white);
  position: relative;
  flex: 1;
}

@media (max-width: 600px) {
  .letter-body {
    padding: 20px 15px;
  }

  .letter-paper {
    padding: 30px 20px;
  }

  .letter-paper::before {
    left: 40px;
  }

  .letter-text {
    padding-left: 15px;
    font-size: 16px;
  }
}

.letter-paper {
  background: white;
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 36px 32px;
  min-height: 460px;
  position: relative;
  box-shadow: 0 2px 12px rgba(44, 38, 32, 0.06);
}

.letter-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 52px;
  width: 1px;
  height: 100%;
  background: rgba(201, 169, 142, 0.2);
}

.letter-watermark {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  color: var(--stone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Letter content typography */
.letter-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  font-weight: 300;
  padding-left: 24px;
  white-space: pre-wrap;
  transition: opacity 0.3s;
}

.letter-text.loading {
  opacity: 0.4;
}

.letter-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  padding-left: 24px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

/* ── PLACEHOLDER ── */
.letter-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  text-align: center;
}

.placeholder-paw {
  font-size: 48px;
  opacity: 0.25;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.2
  }

  50% {
    opacity: 0.35
  }
}

.placeholder-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
}

.placeholder-sub {
  font-size: 13px;
  color: var(--stone);
  max-width: 240px;
}

/* ── GENERATION PROGRESS ── */
.generating-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
  text-align: center;
}

.generating-state.active {
  display: flex;
}

.paw-loader {
  display: flex;
  gap: 8px;
}

.paw-loader span {
  font-size: 20px;
  animation: pawBounce 1.2s ease-in-out infinite;
}

.paw-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.paw-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pawBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4
  }

  50% {
    transform: translateY(-8px);
    opacity: 1
  }
}

.gen-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--ink-light);
  font-style: italic;
}

.gen-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ── MEMORIES LIST ── */
.memories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.memory-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-4px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.memory-del {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}

.memory-del:hover {
  color: #c0392b;
}

.add-memory {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.add-memory input {
  flex: 1;
}

.btn-add {
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-light);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add:hover {
  border-color: var(--blush);
  color: var(--blush);
}

/* ── ARCH BADGE ── */
.arch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(44, 38, 32, 0.06);
  border: 1px solid var(--stone);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.arch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

/* ── SAVED LETTERS ── */
.saved-strip {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 2rem;
}

.saved-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 20px;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.saved-card {
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.saved-card:hover {
  border-color: var(--blush);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(44, 38, 32, 0.08);
}

.saved-pet {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
}

.saved-type {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.saved-preview {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.saved-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(214, 207, 196, 0.5);
}

.saved-date {
  font-size: 11px;
  color: var(--muted);
}

.del-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.del-btn:hover {
  color: #c0392b;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(250, 247, 242, 0.6);
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

footer a {
  color: var(--blush);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--cream);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--cream);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  max-width: 320px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── INFO BOX ── */
.info-box {
  background: rgba(122, 140, 114, 0.08);
  border: 1px solid rgba(122, 140, 114, 0.25);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.7;
}

.info-box strong {
  color: var(--sage);
  font-weight: 500;
}

.info-box code {
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

/* ── CONTENT PAGES ── */
.content-page {
  max-width: var(--max-width);
  margin: 60px auto 100px;
  padding: 0 1.5rem;
}

.content-header {
  margin-bottom: 48px;
  text-align: center;
}

.content-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 12px;
}

.content-header p {
  color: var(--muted);
  font-size: clamp(14px, 2vw, 16px);
}

.text-block {
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: 16px;
  padding: 48px;
  margin-bottom: 32px;
}

.text-block h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--stone);
  padding-bottom: 12px;
}

.text-block h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin: 24px 0 12px;
}

.text-block p {
  margin-bottom: 16px;
  color: var(--ink-light);
  line-height: 1.8;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 600px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .text-block {
    padding: 32px 24px;
  }
}

.resource-card {
  border: 1px solid var(--stone);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  background: var(--warm-white);
}

@media (max-width: 600px) {
  .resource-card {
    padding: 20px;
  }

  .resource-card h4 {
    font-size: 18px;
  }
}

.resource-card:hover {
  border-color: var(--blush);
  background: rgba(201, 169, 142, 0.05);
}

.resource-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.resource-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

@media print {

  header,
  footer,
  .hero,
  .form-panel,
  .saved-strip,
  .letter-header,
  .scroll-cue {
    display: none !important;
  }

  body {
    background: white;
  }

  .app-wrapper {
    display: block;
    padding: 0;
    margin: 0;
  }

  .letter-panel {
    position: static;
    border: none;
    box-shadow: none;
  }

  .letter-body {
    padding: 0;
  }

  .letter-paper {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

/* ── UTILITIES ── */
.responsive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 850px) {
  .responsive-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.sidebar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.sidebar-layout-right {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {

  .sidebar-layout,
  .sidebar-layout-right {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sidebar-layout aside,
  .sidebar-layout-right aside {
    border-top: 1px solid var(--stone);
    padding-top: 24px;
    border-bottom: none;
  }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

@media (max-width: 1050px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── BOOTSTRAP 5 UTILITY EXTENSIONS ── */

/* Background Colors */
.bg-cream { background-color: var(--cream) !important; }
.bg-warm-white { background-color: var(--warm-white) !important; }
.bg-blush { background-color: var(--blush) !important; }
.bg-blush-light { background-color: var(--blush-light) !important; }
.bg-sage { background-color: var(--sage) !important; }
.bg-ink { background-color: var(--ink) !important; }
.bg-stone { background-color: var(--stone) !important; }
.bg-gold { background-color: var(--gold) !important; }

/* Text Colors */
.text-blush { color: var(--blush) !important; }
.text-sage { color: var(--sage) !important; }
.text-ink { color: var(--ink) !important; }
.text-ink-light { color: var(--ink-light) !important; }
.text-muted-custom { color: var(--muted) !important; }
.text-stone { color: var(--stone) !important; }
.text-gold { color: var(--gold) !important; }

/* Border Colors */
.border-blush { border-color: var(--blush) !important; }
.border-sage { border-color: var(--sage) !important; }
.border-stone { border-color: var(--stone) !important; }
.border-ink { border-color: var(--ink) !important; }

/* Font Utilities */
.font-serif { font-family: 'Cormorant Garamond', serif !important; }
.font-sans { font-family: 'DM Sans', sans-serif !important; }

/* Transition Utilities */
.transition-all { transition: all 0.2s ease !important; }
.transition-transform { transition: transform 0.2s ease !important; }
.transition-shadow { transition: box-shadow 0.3s ease !important; }

/* Hover Effects */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.hover-opacity:hover {
  opacity: 0.85 !important;
}

/* Section Padding Utilities */
.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (min-width: 992px) {
  .section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

.section-padding-sm {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Container Max Width */
.container-custom {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.container-narrow {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Letter Spacing */
.tracking-wide { letter-spacing: 0.05em !important; }
.tracking-wider { letter-spacing: 0.1em !important; }

/* Backdrop Filter Support */
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* Button Blush (Custom) */
.btn-blush {
  background-color: var(--blush) !important;
  border-color: var(--blush) !important;
  color: white !important;
}

.btn-blush:hover, .btn-blush:focus {
  background-color: #b08e75 !important;
  border-color: #b08e75 !important;
  color: white !important;
}

.btn-outline-blush {
  background-color: transparent !important;
  border-color: var(--blush) !important;
  color: var(--blush) !important;
}

.btn-outline-blush:hover, .btn-outline-blush:focus {
  background-color: var(--blush) !important;
  color: white !important;
}

/* Card Hover Effect */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  border-color: var(--blush) !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(44, 38, 32, 0.08) !important;
}

/* Section Label */
.section-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.section-label-blush { color: var(--blush); }
.section-label-sage { color: var(--sage); }

/* Feature Icon Container */
.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--blush);
  background-color: var(--warm-white);
  color: var(--blush);
  font-size: 1.125rem;
}

/* Responsive Typography */
.display-responsive {
  font-size: clamp(1.75rem, 5vw, 3.875rem);
}

.h2-responsive {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* Dashed Border Utility */
.border-dashed { border-style: dashed !important; }

/* Navbar Custom Styles */
#main-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#main-header .nav-link {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  font-weight: 400;
  transition: color 0.2s ease;
}

#main-header .nav-link:hover,
#main-header .nav-link.active {
  color: var(--ink);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 38, 32, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Offcanvas Custom */
.offcanvas {
  background-color: var(--warm-white);
}

/* Mobile Nav Links */
.nav-link-mobile {
    color: var(--ink) !important;
    display: block;
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 1.5rem;  /* <-- left padding added */
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--stone);
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.nav-link-mobile:hover {
    color: var(--blush) !important;
    background-color: rgba(201, 169, 142, 0.06);
}

.nav-link-mobile:last-child {
    border-bottom: none;
}

/* Offcanvas Body - remove all padding */
.offcanvas-body {
    padding: 0.5rem 0 !important;  /* small vertical padding, zero horizontal */
}

.offcanvas-body .nav {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: block !important;
}

/* Offcanvas Header — matches main navbar height (~64px) */
.offcanvas-header {
  padding: 0 1rem !important;
  margin: 0 !important;
  min-height: 64px !important;
  height: 64px !important;
}


/* Remove gap from nav flex-column */
.nav.flex-column {
  gap: 0 !important;
  display: block !important;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .paw-icon {
    animation: none !important;
  }
  
  .scroll-cue svg {
    animation: none !important;
  }
}