/* Leaf Ledger — App Store screenshot showcase (shared with index.php palette) */
:root {
  --eucalyptus:    #829079;
  --eucalyptus-dk: #6b7963;
  --cedarwood:     #A67B5B;
  --cloud-white:   #F9F9F9;
  --sage:          #4E5945;
  --sage-light:    #5c6b52;
  --border:        #c4ccb8;
  --border-light:  #dde3d7;
  --inactive:      #D1D1D1;
  --page:          #FFFFFF;
  --section:       #F5F3EE;
  --shadow-md:     0 4px 16px rgba(78,89,69,0.10), 0 2px 6px rgba(78,89,69,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--section);
  color: var(--sage);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--eucalyptus-dk); }

/* ── Top bar ── */
.topbar {
  background: var(--eucalyptus);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.topbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.topbar-brand span {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.topbar-links a:hover { color: #fff; }

/* ── Page header ── */
.page-header {
  text-align: center;
  padding: 48px 24px 32px;
  max-width: 640px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.page-header p {
  font-size: 16px;
  color: var(--sage-light);
  line-height: 1.7;
}

/* ── Phone frames (screenshot fill) ── */
.phone-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.phone-dual {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  width: auto;
  max-width: 100%;
}

.phone-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.phone-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-light);
  line-height: 1;
}

.phone-iphone {
  width: 280px;
  max-width: calc(100vw - 48px);
  padding: 11px;
  background: linear-gradient(165deg, #F4F2ED 0%, #D4D0C8 45%, #B8B4AC 100%);
  border-radius: 48px;
  box-shadow:
    0 16px 40px rgba(78, 89, 69, 0.12),
    0 4px 12px rgba(78, 89, 69, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -1px 0 rgba(0,0,0,0.06);
  position: relative;
  flex-shrink: 0;
}

.phone-iphone::before,
.phone-iphone::after {
  content: '';
  position: absolute;
  background: #C5C1B9;
  border-radius: 2px;
  z-index: 2;
}

.phone-iphone::before {
  right: -2px;
  top: 108px;
  width: 3px;
  height: 52px;
}

.phone-iphone::after {
  left: -2px;
  top: 88px;
  width: 3px;
  height: 28px;
}

.phone-iphone--lg {
  width: 320px;
}

/* ── Android frame ── */
.phone-android {
  width: 260px;
  max-width: calc(100vw - 48px);
  padding: 10px;
  background: linear-gradient(165deg, #3D3D3D 0%, #252525 50%, #1A1A1A 100%);
  border-radius: 32px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative;
  flex-shrink: 0;
}

.phone-showcase .phone-android,
.phone-dual .phone-android {
  transform: none;
  opacity: 1;
}

.phone-android--lg {
  width: 300px;
}

.phone-android .phone-inner {
  background: #111;
  border-radius: 24px;
}

.phone-inner {
  background: var(--page);
  border-radius: 40px;
  padding: 0;
  overflow: hidden;
}

.shot-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
}

.shot-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.01em;
}

.shot-desc {
  font-size: 14px;
  color: var(--sage-light);
  text-align: center;
  max-width: 520px;
  line-height: 1.65;
}

/* ── Catalog layout (screenshots index) ── */
.page-header--catalog {
  max-width: 720px;
  padding-bottom: 24px;
}

.catalog-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.catalog-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.catalog-platform {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--page);
  border-radius: 100px;
  box-shadow: var(--shadow-md);
}

.catalog-pf-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.catalog-pf-label {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-light);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.catalog-pf-input:checked + .catalog-pf-label {
  background: var(--eucalyptus);
  color: #fff;
}

.catalog-wrap:has(#pf-iphone:checked) .phone-slot--android {
  display: none;
}

.catalog-wrap:has(#pf-android:checked) .phone-slot--iphone {
  display: none;
}

.catalog {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px 40px;
  align-items: start;
}

.catalog-nav {
  position: sticky;
  top: 24px;
  background: var(--page);
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: var(--shadow-md);
}

.catalog-nav-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 12px;
  padding: 0 8px;
}

.catalog-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-nav-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.catalog-nav-list a:hover {
  background: var(--cloud-white);
}

.catalog-nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eucalyptus-dk);
}

.catalog-nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  line-height: 1.25;
}

.catalog-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 24px 36px;
  align-items: center;
  background: var(--page);
  border-radius: 20px;
  padding: 28px 28px 28px 32px;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 24px;
}

.catalog-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.catalog-row-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--sage);
}

.catalog-row-desc {
  font-size: 14px;
  color: var(--sage-light);
  line-height: 1.65;
  margin-bottom: 4px;
}

.catalog-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--cedarwood);
  transition: background 0.2s ease;
}

.catalog-cta:hover {
  background: #8d6649;
}

.catalog-preview {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 4px 20px;
  -webkit-overflow-scrolling: touch;
}

.catalog-preview .phone-showcase {
  width: auto;
}

.catalog-preview .phone-dual {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 22px;
  justify-content: center;
}

.catalog-wrap:has(#pf-iphone:checked) .catalog-preview .phone-dual,
.catalog-wrap:has(#pf-android:checked) .catalog-preview .phone-dual {
  justify-content: center;
}

/* ── Single screenshot page ── */
.single-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: start;
  gap: 40px 56px;
  padding: 48px 40px 80px;
  max-width: 1320px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.single-page .phone-showcase {
  gap: 24px;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.single-page .phone-dual {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}

.single-page .phone-slot {
  flex-shrink: 0;
}

.single-meta {
  text-align: left;
  max-width: 380px;
  justify-self: start;
  align-self: center;
}

.single-meta h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.single-meta p {
  font-size: 16px;
  color: var(--sage-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.single-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-primary {
  background: var(--cedarwood);
  color: #fff;
}

.btn-primary:hover { background: #8d6649; }

.btn-secondary {
  background: var(--page);
  color: var(--sage);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--eucalyptus);
  color: var(--eucalyptus-dk);
}

/* ── Export strip (full-bleed background for captures) ── */
.export-stage {
  background: radial-gradient(ellipse at 50% 30%, rgba(130,144,121,0.12) 0%, transparent 55%),
              var(--section);
}

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

  .catalog-nav {
    position: static;
  }

  .catalog-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .catalog-nav-list a {
    padding: 8px 12px;
    background: var(--cloud-white);
  }

  .catalog-nav-label {
    display: none;
  }

  .catalog-row {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    text-align: center;
  }

  .catalog-copy {
    align-items: center;
  }

  .catalog-preview .phone-dual {
    justify-content: center;
  }

  .single-page {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 24px 64px;
    text-align: center;
  }

  .single-meta {
    text-align: center;
    justify-self: center;
    align-self: auto;
    order: -1;
    max-width: 520px;
  }

  .single-nav {
    justify-content: center;
  }

  .single-page .phone-showcase {
    justify-self: center;
    overflow-x: visible;
  }

  .single-page .phone-dual {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 32px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .single-page {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .single-meta {
    order: -1;
    justify-self: center;
    text-align: center;
    align-self: auto;
  }

  .single-nav {
    justify-content: center;
  }

  .single-page .phone-dual {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 20px; }
  .catalog-wrap { padding: 0 16px 48px; }
  .catalog-preview .phone-dual {
    flex-wrap: wrap;
    justify-content: center;
  }

  .single-page {
    padding: 24px 16px 48px;
  }

  .single-page .phone-iphone--lg,
  .single-page .phone-android--lg {
    width: min(280px, calc(100vw - 48px));
  }
}
