/* Photo Planning - Have and To Hold Photography */
:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --text: #4a3728;
  --text-soft: #7a6552;
  --gold: #b8956a;
  --gold-deep: #a07f4e;
  --line: #e8e0d4;
  --shadow: 0 2px 12px rgba(74, 55, 40, 0.08);
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 92px; /* space for bottom nav */
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.25;
}

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

/* Header */
.app-header {
  text-align: center;
  padding: 28px 20px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.app-header h1 {
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}
.app-sub {
  color: var(--gold-deep);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Views */
.view { display: none; padding: 20px 18px 30px; max-width: 640px; margin: 0 auto; }
.view.active { display: block; }
.view h2 { font-size: 1.6rem; margin-bottom: 8px; }
.lede { color: var(--text-soft); margin-bottom: 20px; font-size: 0.95rem; }

/* Home */
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.home-copy { text-align: center; margin-bottom: 26px; }
.home-copy h2 { font-size: 2rem; margin-bottom: 12px; }
.home-copy p { color: var(--text-soft); margin-bottom: 12px; }
.home-copy .btn-primary { margin-top: 14px; }

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--text);
  color: #fffdf9;
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: #5a4636; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #c9bda9; cursor: not-allowed; }

.btn-ghost {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 10px;
}
.btn-ghost:hover { border-color: var(--gold); }

.results-actions { margin-top: 18px; }

/* Quiz */
.quiz-progress {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.quiz-question { font-size: 1.5rem; text-align: center; margin-bottom: 4px; }
.quiz-sub { text-align: center; color: var(--text-soft); margin-bottom: 18px; font-size: 0.95rem; }

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.style-choice {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.style-choice.selected { border-color: var(--gold); }
.style-choice img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.style-label {
  padding: 10px 8px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}
.heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 253, 249, 0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}
.heart-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; }
.style-choice.selected .heart-btn svg { fill: #c0392b; stroke: #c0392b; }

.quiz-nav {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.quiz-nav .btn-ghost { margin-top: 0; flex: 1; }
.quiz-nav .btn-primary { flex: 2; }

/* Choice cards (Q5-Q7) */
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.choice-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s;
}
.choice-card.selected { border-color: var(--gold); }
.choice-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.choice-card .choice-name { padding: 12px 8px; font-weight: 500; }
.choice-card .choice-desc { padding: 0 10px 12px; font-size: 0.82rem; color: var(--text-soft); }

.single-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.single-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.yesno-row { display: flex; gap: 12px; margin-bottom: 16px; }
.yesno-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}
.yesno-btn.selected { border-color: var(--gold); background: #faf6ee; font-weight: 600; }

/* Fields */
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-soft);
}
.field input[type="text"],
.field input[type="date"],
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { resize: vertical; }

/* Results */
.results-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.result-line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.result-line:last-child { border-bottom: none; }
.result-line .r-label { font-size: 0.8rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.result-line .r-value { font-weight: 500; margin-top: 2px; }

/* Groupings */
.grouping {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.grouping-head { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.grouping-head input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--gold-deep);
  flex-shrink: 0;
  cursor: pointer;
}
.grouping-head .g-label { font-weight: 500; font-size: 0.95rem; }
.grouping-names { margin-top: 10px; display: none; }
.grouping.checked .grouping-names { display: block; }
.grouping-names input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: rgba(255, 253, 249, 0.97);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.nav-btn {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-soft);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px 0;
}
.nav-btn svg { width: 24px; height: 24px; }
.nav-btn.active { color: var(--gold-deep); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.94);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox-inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
}
.lightbox-inner img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-inner h3 {
  color: #f5efe4;
  margin-top: 14px;
  font-size: 1.3rem;
}
.lightbox-inner p {
  color: #cbbfae;
  font-size: 0.92rem;
  margin-top: 6px;
  padding: 0 10px;
}
.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: none;
  color: #f5efe4;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fffdf9;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  z-index: 200;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
  max-width: 90%;
  text-align: center;
}
.toast[hidden] { display: none; }

/* Desktop */
@media (min-width: 700px) {
  .style-grid { grid-template-columns: repeat(4, 1fr); }
  .view { padding: 30px 24px 40px; }
  .app-header h1 { font-size: 2.2rem; }
}

.timeline-heading {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}
.timeline-section {
  background: #fdf8f0;
  border: 1px solid #e8ddd0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.timeline-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.05rem;
}
.timeline-row {
  display: flex;
  gap: 0.75rem;
}
.timeline-row .field.half {
  flex: 1;
  min-width: 0;
}
