/* ============================================================
   ANNIE WILSON HOMECARE — "The Album"
   Old family photo album. Cream pages, polaroids, handwritten
   captions, corner tapes. Lora + Caveat + Lato.
   Nostalgic, warm, human. WCAG AA.
   ============================================================ */

:root {
  --album-bg:   #5C4A35;
  --page-cream: #F7F1E6;
  --page-lt:    #FBF7F0;
  --tape-color: rgba(255,240,190,0.85);
  --ink:        #1E1811;
  --ink-soft:   #4A3E30;
  --rust:       #8B3A1E;
  --rust-lt:    #C4785A;
  --gold:       #9A7A3A;
  --line:       #D4C4A8;
  --shadow:     rgba(60,40,20,0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', system-ui, sans-serif;
  background: var(--album-bg);
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 1px, transparent 1px, transparent 8px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 1px, transparent 1px, transparent 8px);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding: clamp(20px, 4vw, 48px);
}
a { color: inherit; text-decoration: none; }
h2 { font-family: 'Lora', serif; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }

.skip-link { position: fixed; top: -100%; left: 0; background: var(--ink); color: #fff; padding: 12px 18px; z-index: 999; }
.skip-link:focus { top: 0; }
*:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.handwritten { font-family: 'Caveat', cursive !important; }

/* ── REVEAL ── */
.rise { opacity: 0; transform: translateY(20px); transition: opacity 0.85s ease, transform 0.85s ease; }
.rise.in { opacity: 1; transform: none; }

/* ── COVER ── */
.album-cover {
  max-width: 880px; margin: 0 auto clamp(24px, 4vw, 40px);
  background: #2C1F0E;
  background-image: linear-gradient(135deg, #3A2810 0%, #1E1208 50%, #2C1F0E 100%);
  border: 3px solid rgba(180,140,80,0.4);
  padding: clamp(48px, 8vw, 80px) clamp(40px, 7vw, 72px);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 0 60px rgba(0,0,0,0.3);
}
.cover-texture {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4; pointer-events: none;
}
.cover-inner { text-align: center; position: relative; z-index: 1; }
.cover-label-top {
  font-family: 'Caveat', cursive; font-size: 1.3rem;
  color: rgba(180,140,80,0.7); margin-bottom: 32px; letter-spacing: 0.05em;
}
.cover-emboss {
  position: relative; width: 180px; height: 180px;
  margin: 0 auto 32px; display: flex; align-items: center; justify-content: center;
}
.emboss-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(180,140,80,0.35);
}
.emboss-ring.outer { inset: 0; }
.emboss-ring.inner { inset: 14px; }
.emboss-center {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.emboss-name {
  font-family: 'Lora', serif; font-size: 1rem; font-weight: 600;
  color: rgba(220,190,130,0.9); letter-spacing: 0.05em;
}
.emboss-sub {
  font-family: 'Lato', sans-serif; font-size: 0.62rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(180,140,80,0.65);
}
.emboss-year {
  font-family: 'Lora', serif; font-style: italic; font-size: 0.85rem;
  color: rgba(180,140,80,0.7); margin-top: 4px;
}
.cover-desc {
  font-family: 'Lato', sans-serif; font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(180,140,80,0.5); margin-bottom: 32px;
}
.cover-open {
  display: inline-block; font-family: 'Caveat', cursive;
  font-size: 1.2rem; color: rgba(220,190,130,0.85);
  border-bottom: 1px solid rgba(180,140,80,0.4);
  padding-bottom: 4px; transition: color 0.2s;
}
.cover-open:hover { color: rgba(220,190,130,1); }

/* ── ALBUM PAGES ── */
.album { max-width: 880px; margin: 0 auto; }

.album-page {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: clamp(16px, 3vw, 32px);
  box-shadow: 0 4px 24px var(--shadow), 0 12px 48px rgba(0,0,0,0.2);
}

.page-bg {
  background: var(--page-cream); padding: clamp(28px, 5vw, 52px) clamp(24px, 4vw, 44px);
  position: relative; overflow: hidden; min-height: 540px;
}
.left-page {
  border-right: 1px solid var(--line);
  background: linear-gradient(to right, var(--page-cream) 95%, rgba(180,155,110,0.15));
}
.right-page {
  background: linear-gradient(to left, var(--page-cream) 95%, rgba(180,155,110,0.15));
}

/* binding shadow */
.album-page::after {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 6px; transform: translateX(-50%);
  background: linear-gradient(to right, rgba(120,90,60,0.12), rgba(180,140,80,0.06), rgba(120,90,60,0.12));
  pointer-events: none; z-index: 10;
}
.album-page { position: relative; }

/* ── CORNER TAPE ── */
.corner-tape {
  position: absolute; width: 40px; height: 14px;
  background: var(--tape-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.corner-tape.tl { top: 20px; left: 20px; transform: rotate(-45deg); transform-origin: top left; }
.corner-tape.tr { top: 20px; right: 20px; transform: rotate(45deg); transform-origin: top right; }
.corner-tape.br { bottom: 20px; right: 20px; transform: rotate(-45deg); transform-origin: bottom right; }

/* ── POLAROIDS ── */
.photo-mount { display: flex; flex-direction: column; gap: 16px; }
.photo-mount.photo-right { align-items: flex-end; }
.polaroid {
  background: #fff; padding: 10px 10px 32px;
  box-shadow: 2px 3px 12px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.1);
  display: inline-block; position: relative;
}
.polaroid img { width: 220px; height: 160px; object-fit: cover; display: block; }
.polaroid-caption {
  font-family: 'Caveat', cursive; font-size: 0.9rem;
  color: var(--ink-soft); text-align: center; margin-top: 6px;
  position: absolute; bottom: 8px; left: 10px; right: 10px;
}
.tilt-left { transform: rotate(-3deg); }
.tilt-right { transform: rotate(2.5deg); }
.overlap-up { margin-top: -20px; }

/* ── PAGE TEXT ── */
.page-number {
  position: absolute; top: clamp(16px, 3vw, 28px); right: clamp(16px, 3vw, 28px);
  font-family: 'Lora', serif; font-size: 0.75rem; color: var(--line);
  font-style: italic;
}
.page-content { display: flex; flex-direction: column; gap: 16px; }
.page-date {
  font-size: 2rem; color: var(--rust); line-height: 1;
}
.service-tag {
  font-size: 1.5rem; color: var(--rust); line-height: 1;
}
.page-title {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem); color: var(--ink); line-height: 1.15;
}
.page-body {
  font-size: 0.97rem; color: var(--ink-soft); line-height: 1.8; font-weight: 300;
}
.page-body em { font-style: italic; color: var(--ink); }
.page-body strong { font-weight: 700; color: var(--ink); }
.page-sig { font-size: 1.6rem; color: var(--rust-lt); margin-top: 8px; }

/* ── STICKY NOTE ── */
.sticky-note {
  background: #FFF9C4; border-left: 3px solid #E8CC40;
  padding: 14px 18px; margin-top: 8px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1); transform: rotate(1deg);
}
.sticky-note p { font-family: 'Caveat', cursive; font-size: 1rem; color: var(--ink); line-height: 1.7; }

/* ── QUOTE SPREAD ── */
.page-4 { grid-template-columns: 1fr; }
.page-4 .spread {
  background: var(--page-lt);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 8vw, 80px) clamp(40px, 8vw, 80px);
  min-height: 400px;
}
.quote-spread { text-align: center; max-width: 600px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.qs-rule { width: 80px; height: 1px; background: var(--gold); }
.qs-text {
  font-family: 'Lora', serif; font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  color: var(--ink); line-height: 1.6;
}
.qs-cite { font-family: 'Lato', sans-serif; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.7; }

/* ── CONTACT PAGE ── */
.contact-lines { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.contact-line {
  font-family: 'Lato', sans-serif; font-size: 0.9rem;
  color: var(--rust); font-weight: 700; line-height: 1.5;
  transition: color 0.15s;
}
.contact-line:hover { color: var(--ink); }
.contact-line.addr { color: var(--ink-soft); font-weight: 400; }
.hours-note { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.7; }

/* ── BACK COVER ── */
.back-cover-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; text-align: center;
}
.trust-stamps { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.t-stamp {
  border: 1.5px solid var(--rust); padding: 8px 16px;
  display: flex; flex-direction: column; align-items: center;
}
.ts-top { font-family: 'Lato', sans-serif; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rust); }
.ts-num { font-family: 'Lora', serif; font-size: 0.95rem; font-style: italic; color: var(--rust); }
.back-photo-mount .polaroid img { width: 200px; height: 140px; }
.album-cta {
  display: inline-block; font-family: 'Lato', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 32px; background: var(--rust); color: #fff;
  transition: background 0.2s, transform 0.2s;
}
.album-cta:hover { background: var(--ink); transform: translateY(-2px); }

/* ── FOOTER ── */
.album-footer {
  text-align: center; padding: 24px;
  font-family: 'Lato', sans-serif; font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .album-page { grid-template-columns: 1fr; }
  .album-page::after { display: none; }
  .left-page { border-right: none; border-bottom: 1px solid var(--line); }
  .page-4 { grid-template-columns: 1fr; }
  .polaroid img { width: 180px; height: 130px; }
  body { padding: 12px; }
}
