/* ==========================================================================
   Caren Allman Creative — Portfolio
   Tokens
   ========================================================================== */
:root {
  --paper: #FBF1E4;
  --paper-deep: #F4E5D2;
  --card: #FFFCF7;
  --ink: #2B2420;
  --ink-soft: #6b5d52;
  --navy: #1E2D46;
  --navy-soft: #3d4c68;
  --clay: #C1703F;
  --clay-soft: #E3A272;
  --sage: #62805a;
  --sage-deep: #435a3d;
  --sage-pale: #E4EBDD;
  --blush: #EFC3AE;
  --line: rgba(43, 36, 32, 0.14);
  --shadow: 0 20px 45px -25px rgba(43, 36, 32, 0.35);
  --shadow-sm: 0 10px 25px -15px rgba(43, 36, 32, 0.3);

  --font-display: "Fredoka", "Segoe UI", sans-serif;
  --font-script: "Caveat", cursive;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --max-w: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--clay);
  display: inline-block;
  margin: 0 0 4px;
  transform: rotate(-2deg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}

h2.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 14px;
}

h3.sub-title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--navy);
  margin-bottom: 6px;
}

.section-intro {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--clay);
  color: #fff8f2;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: #a95f34; }

.btn-ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--paper); transform: translateY(-2px); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 241, 228, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 30px; width: auto; }
.brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--clay); }
.nav-cta { display: none; white-space: nowrap; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (min-width: 900px) {
  .nav-cta { display: inline-flex; }
}
@media (max-width: 899px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 32px 26px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 100px;
}
.hero-flourish {
  position: absolute;
  top: -60px;
  right: -80px;
  width: 480px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-flourish.left {
  top: auto;
  bottom: -80px;
  left: -120px;
  right: auto;
  width: 420px;
  transform: scaleX(-1);
  opacity: 0.3;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--clay);
  transform: rotate(-2deg);
  display: inline-block;
  margin-bottom: 6px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  line-height: 1.1;
  max-width: 18ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--clay);
}
.hero-sub {
  margin-top: 22px;
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-tags {
  margin-top: 50px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tag {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--navy-soft);
  font-weight: 500;
}

/* ==========================================================================
   Divider
   ========================================================================== */
.divider {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0 auto;
}
.divider path {
  fill: none;
  stroke: var(--sage);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1.4s ease;
}
.divider.in-view path { stroke-dashoffset: 0; }

/* ==========================================================================
   Section shell
   ========================================================================== */
section { padding: 84px 0; }
.section-alt { background: var(--paper-deep); }
.section-head { margin-bottom: 44px; }
.subsection { margin-top: 54px; }
.subsection:first-of-type { margin-top: 0; }
.subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.subsection-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 46ch;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}
.about-badge {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.about-badge img { width: 62%; height: auto; }
.about-badge::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px dashed var(--sage);
  border-radius: 50%;
  opacity: 0.55;
}
.about-copy p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 0 0 18px;
  max-width: 62ch;
}
.about-copy p:last-of-type { margin-bottom: 26px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--navy-soft);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-badge { margin: 0 auto; }
  .chip-row { justify-content: center; }
}

/* ==========================================================================
   Logo grid
   ========================================================================== */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.logo-card {
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.logo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.logo-card figure {
  margin: 0;
  padding: 40px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
}
.logo-card figure img { max-height: 100px; width: auto; max-width: 100%; }
.logo-card .swatch-navy { background: #eef1f5; }
.logo-card .swatch-clay { background: #fbeee3; }
.logo-card .swatch-sage { background: var(--sage-pale); }
.logo-card .swatch-blush { background: #fbeae3; }
.logo-card .swatch-cream { background: #f6efe1; }
.logo-card .swatch-teal { background: #e7f3f2; }
.logo-card .swatch-red { background: #fdeceb; }
.logo-card-body {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
}
.logo-card-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.logo-card-body p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }
.logo-card.featured { grid-column: span 2; }
.logo-card.featured figure { min-height: 190px; }
@media (max-width: 620px) {
  .logo-card.featured { grid-column: span 1; }
}

/* ==========================================================================
   Business cards
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.biz-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}
.biz-card:nth-child(1) { transform: rotate(-1.5deg); }
.biz-card:nth-child(2) { transform: rotate(1deg); }
.biz-card:nth-child(3) { transform: rotate(-0.8deg); }
.biz-card:hover { transform: rotate(0deg) translateY(-4px); }
.biz-card img { border-radius: 6px; border: 1px solid var(--line); }
.biz-card-caption { padding: 14px 4px 2px; text-align: center; }
.biz-card-caption h3 { font-size: 1rem; margin-bottom: 3px; }
.biz-card-caption p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }

/* ==========================================================================
   Print / gallery grid (generic item card)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}
.gallery-item {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-item .img-wrap {
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: 160px;
}
.gallery-item img { border-radius: 4px; }
.gallery-item-body { padding: 16px 20px 20px; }
.gallery-item-body h3 { font-size: 1rem; margin-bottom: 4px; }
.gallery-item-body p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* Featured print pieces (invitations) */
.print-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  gap: 30px;
  align-items: start;
}
.print-piece {
  background: var(--card);
  border-radius: 4px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}
.print-piece:nth-child(1) { transform: rotate(-2deg); }
.print-piece:nth-child(2) { transform: rotate(1.5deg); }
.print-piece:nth-child(3) { transform: rotate(-1deg); }
.print-piece:hover { transform: rotate(0deg) translateY(-4px); }
.print-piece img { border: 1px solid var(--line); }
.print-caption { padding: 16px 6px 4px; text-align: center; }
.print-caption h3 { font-size: 1.05rem; margin-bottom: 4px; }
.print-caption p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.print-piece.motif {
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.print-piece.motif img { border: none; opacity: 0.9; }

@media (max-width: 900px) {
  .print-grid { grid-template-columns: 1fr; }
  .print-piece { transform: none !important; max-width: 420px; margin: 0 auto; }
}

/* ==========================================================================
   Digital section
   ========================================================================== */
.digital-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 860px) {
  .digital-grid { grid-template-columns: 1fr; }
}
.digital-panel {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 10px;
  overflow: hidden;
}
.browser-chrome {
  background: var(--paper-deep);
  border-radius: 12px 12px 0 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blush); }
.browser-chrome .dot:nth-child(2) { background: var(--clay-soft); }
.browser-chrome .dot:nth-child(3) { background: var(--sage); }
.browser-chrome .bar { margin-left: 14px; flex: 1; height: 22px; background: var(--card); border-radius: 6px; }
.digital-shot {
  max-height: 480px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
}
.digital-caption { padding: 20px 22px 6px; }
.digital-caption h3 { font-size: 1.15rem; margin-bottom: 6px; }
.digital-caption p { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.94rem; }

.digital-note {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 34px;
  text-align: center;
  margin-top: 30px;
}
.digital-note p { color: var(--ink-soft); max-width: 50ch; margin: 8px auto 20px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; }
.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--ink-soft); max-width: 42ch; margin-bottom: 26px; }
.contact-direct { display: inline-flex; flex-direction: column; gap: 4px; margin-bottom: 30px; }
.contact-direct a { font-family: var(--font-display); font-size: 1.3rem; color: var(--clay); text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }
.contact-direct span { font-size: 0.85rem; color: var(--ink-soft); }

.form-card { background: var(--card); border-radius: 22px; padding: 36px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--sage); outline: none; }
.form-note { margin-top: 14px; font-size: 0.82rem; color: var(--ink-soft); }
.form-status { margin-top: 14px; font-size: 0.92rem; color: var(--sage-deep); font-weight: 600; display: none; }
.form-status.show { display: block; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Footer
   ========================================================================== */
footer { background: var(--navy); color: #e9e2d6; padding: 50px 0 30px; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
  padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.14); margin-bottom: 22px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; filter: grayscale(1) invert(1) brightness(2.2); }
.footer-brand span { font-family: var(--font-display); font-weight: 600; }
.footer-nav { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; color: #cfc6b6; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: #a99f8f; }

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  section { padding: 60px 0; }
  .hero { padding: 66px 0 76px; }
}

/* ==========================================================================
   Mobile pagination — one .page at a time, matches the nav's 899px breakpoint
   ========================================================================== */
.pager { display: none; }

@media (max-width: 899px) {
  .page { display: none; }
  .page.page-active { display: block; }

  /* Decorative wave dividers are for continuous scroll; skip them between paged sections */
  .divider { display: none; }

  body.has-pager { padding-bottom: 76px; }

  .pager {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 18px;
    background: rgba(251, 241, 228, 0.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .pager-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card);
    border: 1.5px solid var(--line);
    color: var(--navy);
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .pager-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
  .pager-btn:disabled { opacity: 0.3; cursor: default; }
  .pager-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.25;
  }
  .pager-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
  }
  .pager-count {
    font-size: 0.74rem;
    color: var(--ink-soft);
  }
}
