:root {
  --cream: oklch(97% 0.015 85);
  --card: oklch(99% 0.008 85);
  --ink: oklch(30% 0.045 55);
  --wood: oklch(35% 0.055 50);
  --green: oklch(58% 0.11 145);
  --terracotta: oklch(64% 0.13 40);
  --border: oklch(88% 0.025 70);
  --chip-bg: oklch(90% 0.05 145 / 0.5);
  --chip-text: oklch(35% 0.08 145);
  --shadow-card: 0 6px 18px oklch(20% 0.03 50 / 0.12);
  --shadow-elevated: 0 10px 30px oklch(20% 0.03 50 / 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection { background: oklch(80% 0.09 145 / 0.4); }

a { text-decoration: none; color: inherit; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: var(--wood);
  box-shadow: 0 2px 12px oklch(20% 0.03 50 / 0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.nav-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--terracotta);
  border: 3px solid var(--cream);
  flex-shrink: 0;
  display: block;
}

.nav-title {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0.3px;
}

.nav-links { display: flex; gap: 8px; }

.nav-link {
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cream);
  background: transparent;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.nav-link:hover { opacity: 0.85; }

.nav-link.active {
  color: var(--wood);
  background: var(--cream);
}

#app { flex: 1; }

/* Footer */
.footer {
  background: var(--wood);
  color: oklch(97% 0.015 85 / 0.8);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

/* Buttons */
.btn {
  cursor: pointer;
  border: none;
  font-family: 'Nunito', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.05); opacity: 0.92; }

.btn-fill-green {
  padding: 15px 28px;
  background: var(--green);
  color: var(--card);
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 14px oklch(58% 0.11 145 / 0.35);
}

.btn-outline {
  padding: 15px 28px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
}

.btn-block-green {
  width: 100%;
  padding: 16px;
  background: var(--green);
  color: var(--card);
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
}

.btn-block-green:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

/* Placeholder photo tile (used until a real photo exists) */
.photo-tile {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, oklch(90% 0.05 145 / 0.55), oklch(90% 0.05 40 / 0.4));
  color: oklch(35% 0.06 100 / 0.6);
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  overflow: hidden;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Home ---------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 48px 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--terracotta);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: 'Lora', serif;
  font-size: 52px;
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 700;
}

.motto {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  color: var(--green);
  margin: 0 0 20px;
  font-weight: 700;
}

.hero-body {
  font-size: 18px;
  line-height: 1.65;
  color: oklch(30% 0.045 55 / 0.85);
  max-width: 480px;
  margin: 0 0 32px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-photo-wrap { position: relative; }

.washi { position: absolute; z-index: 2; background: oklch(90% 0.03 85 / 0.85); box-shadow: 0 2px 4px oklch(20% 0.02 50 / 0.2); }
.washi-left { top: -14px; left: 40px; width: 90px; height: 30px; transform: rotate(-6deg); }
.washi-right { top: -10px; right: 30px; width: 90px; height: 30px; transform: rotate(5deg); }

.hero-photo {
  transform: rotate(-2deg);
  box-shadow: 0 12px 30px oklch(20% 0.03 50 / 0.25);
  border-radius: 18px;
  overflow: hidden;
  border: 6px solid var(--card);
}
.hero-photo .photo-tile { height: 420px; }

.steps-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 48px 72px;
}
.steps-section > h2 {
  font-family: 'Lora', serif;
  font-size: 30px;
  text-align: center;
  margin: 0 0 40px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step { text-align: center; padding: 0 12px; }
.step-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 22px;
  margin: 0 auto 16px;
}
.step-badge.green { background: var(--green); }
.step-badge.terracotta { background: var(--terracotta); }
.step h3 { font-family: 'Lora', serif; font-size: 19px; margin: 0 0 8px; }
.step p { font-size: 15px; line-height: 1.6; color: oklch(30% 0.045 55 / 0.75); margin: 0; }

.recent-section { background: oklch(93% 0.02 85); padding: 56px 48px; }
.recent-inner { max-width: 1180px; margin: 0 auto; }
.recent-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.recent-header h2 { font-family: 'Lora', serif; font-size: 28px; margin: 0; }
.recent-header a { cursor: pointer; font-weight: 700; color: var(--green); font-size: 15px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.photo-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.photo-card .photo-tile { height: 190px; }
.photo-card-body { padding: 18px 20px 22px; }
.photo-card-location {
  font-size: 13px;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 6px;
}
.photo-card-location.with-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--chip-text);
}
.photo-card-location .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.photo-card-caption {
  font-family: 'Caveat', cursive;
  font-size: 21px;
  margin: 0 0 8px;
  line-height: 1.3;
  font-weight: 700;
}
.photo-card-date { font-size: 13px; color: oklch(30% 0.045 55 / 0.5); }
.new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: var(--terracotta);
  color: var(--card);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 40px 24px; }
  .steps-grid, .card-grid { grid-template-columns: 1fr; }
  .nav { padding: 14px 20px; }
  .nav-title { display: none; }
  .steps-section, .recent-section { padding: 32px 24px; }
}

/* ---------- Journey / Album ---------- */
.journey-main {
  flex: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 80px;
  width: 100%;
}
.journey-main h1 { font-family: 'Lora', serif; font-size: 38px; margin: 0 0 6px; }
.journey-sub { font-size: 16px; color: oklch(30% 0.045 55 / 0.7); margin: 0 0 28px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip {
  padding: 8px 16px;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.featured-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  margin-bottom: 48px;
}
.featured-banner .photo-tile { height: 320px; }
.featured-copy { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.featured-location { font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.featured-caption {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  line-height: 1.35;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}
.featured-date { font-size: 14px; color: oklch(30% 0.045 55 / 0.55); margin-top: 14px; }

@media (max-width: 860px) {
  .journey-main { padding: 32px 20px 60px; }
  .featured-banner { grid-template-columns: 1fr; }
  .featured-banner .photo-tile { height: 220px; }
}

/* ---------- Upload / Send ---------- */
.send-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 56px 24px 80px;
}
.send-wrap { width: 100%; max-width: 560px; }
.send-wrap h1 { font-family: 'Lora', serif; font-size: 32px; margin: 0 0 6px; text-align: center; }
.send-sub { font-size: 16px; color: oklch(30% 0.045 55 / 0.7); text-align: center; margin: 0 0 32px; }

.send-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-elevated);
}

.camera-viewport {
  width: 100%;
  height: 320px;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: oklch(20% 0.02 50);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shutter-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.shutter-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid oklch(99% 0.008 85 / 0.9);
}
.shutter-dot {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: oklch(99% 0.008 85);
  transition: background 0.1s;
}
.shutter-btn:active .shutter-dot { background: var(--green); }

.camera-preview { width: 100%; height: 100%; position: relative; }
.camera-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.retake-btn {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 999px;
  background: oklch(20% 0.02 50 / 0.65);
  color: oklch(99% 0.008 85);
  border: none;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Nunito', sans-serif;
}
.retake-btn:hover { filter: brightness(1.1); }

.camera-status {
  text-align: center;
  padding: 32px 24px;
  color: oklch(97% 0.015 85 / 0.85);
}
.camera-status .status-icon { font-size: 36px; margin-bottom: 10px; }
.camera-status p { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.camera-status .use-location-btn {
  background: var(--green);
  color: var(--card);
  margin: 0 6px;
}

.choose-existing-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  margin-bottom: 24px;
  padding: 4px;
}
.choose-existing-btn:hover { opacity: 0.8; }

.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field-label .optional { font-weight: 400; color: oklch(30% 0.045 55 / 0.55); }

.field-row { display: flex; gap: 10px; margin-bottom: 20px; }

.text-input, .textarea-input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  font-size: 15px;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  background: var(--card);
  color: var(--ink);
}

.text-input:focus, .textarea-input:focus {
  outline: none;
  border-color: var(--green);
}

.textarea-input { resize: vertical; margin-bottom: 20px; }

.use-location-btn {
  cursor: pointer;
  padding: 13px 18px;
  border-radius: 12px;
  background: oklch(90% 0.03 85);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  border: none;
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
}
.use-location-btn:hover { filter: brightness(0.97); }

.helper-text { font-size: 13px; color: oklch(30% 0.045 55 / 0.55); margin: 0 0 24px; }

.form-error {
  font-size: 14px;
  color: oklch(50% 0.18 30);
  margin: 0 0 16px;
}

.form-status {
  font-size: 14px;
  margin: 16px 0 0;
  text-align: center;
}
.form-status.pending { color: var(--terracotta); }
.form-status.success { color: var(--green); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: oklch(30% 0.045 55 / 0.6);
  font-size: 15px;
}
