/* Pass the Shell — "sea glass" ocean theme
   Deep-water header, sunlit aqua accents, sandy paper, wave dividers. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --abyss: #0b2e4f;        /* deep water */
  --deep: #14497b;         /* header gradient end */
  --sea: #1273a3;          /* primary action */
  --sea-dark: #0c5a82;
  --aqua: #35b6c9;         /* sunlit accent */
  --foam: #dff3f5;         /* pale seafoam fills */
  --foam-edge: #bfe4e8;
  --sand: #f8f4ea;         /* page background */
  --shell: #ffffff;        /* cards */
  --kelp: #6b7f8c;         /* muted text, blue-gray */
  --ink: #16324a;          /* body text, deep blue-gray */
  --urchin: #c14953;       /* danger */
  --urchin-dark: #9d3a43;
  --urchin-light: #fbeaec;
  --border: #e2ded2;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(53, 182, 201, 0.10), transparent 70%),
    var(--sand);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0.005em;
}

h1 {
  font-weight: 800;
  color: var(--abyss);
}

h2 {
  font-weight: 700;
  color: var(--abyss);
}

a {
  color: var(--sea-dark);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- Header: deep water with a wave crest ---------- */

header.site-header {
  background:
    radial-gradient(900px 300px at 20% -120px, rgba(53, 182, 201, 0.35), transparent 60%),
    linear-gradient(160deg, var(--abyss) 0%, var(--deep) 75%, #175a8f 100%);
  color: white;
  padding: 22px 16px 34px;
  position: relative;
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
}

header.site-header a {
  color: white;
  text-decoration: none;
}

.wave-divider {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 26px;
}

.wave-divider path {
  fill: var(--sand);
}

.brand {
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .emoji {
  font-size: 1.7rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

nav.site-nav a {
  font-size: 0.92rem;
  opacity: 0.85;
  margin-left: 12px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
  padding-bottom: 1px;
}

nav.site-nav a:hover {
  opacity: 1;
}

main {
  padding-bottom: 48px;
}

/* ---------- Flash messages ---------- */

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.flash-success {
  background: var(--foam);
  color: var(--sea-dark);
  border: 1px solid var(--foam-edge);
}

.flash-error {
  background: var(--urchin-light);
  color: var(--urchin-dark);
  border: 1px solid var(--urchin);
}

/* ---------- Cards ---------- */

.card {
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(11, 46, 79, 0.06);
}

/* ---------- Turtle list ---------- */

.turtle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.turtle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.turtle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 46, 79, 0.12);
}

.turtle-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--foam);
  border: 2px solid var(--foam-edge);
  flex-shrink: 0;
}

.turtle-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.turtle-meta h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: var(--abyss);
}

.turtle-meta p {
  margin: 0;
  color: var(--kelp);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  font-family: "Nunito", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--foam);
  color: var(--sea-dark);
  border: 1px solid var(--foam-edge);
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Turtle page ---------- */

h1.turtle-title {
  font-size: 1.7rem;
  margin: 0 0 6px 0;
}

.turtle-number {
  color: var(--kelp);
  font-weight: 600;
  font-family: "Nunito", sans-serif;
}

.turtle-hero {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 8px 0;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(11, 46, 79, 0.10);
}

.retired-note {
  background: var(--foam);
  color: var(--sea-dark);
  border: 1px solid var(--foam-edge);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.9rem;
}

/* Stops as a journey line: dotted "current" running down the page */

.stop {
  position: relative;
  border-left: 2px dotted var(--aqua);
  padding-left: 18px;
  margin-bottom: 22px;
}

.stop::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px var(--foam);
}

.stop-meta {
  font-size: 0.8rem;
  color: var(--kelp);
  margin-bottom: 4px;
  font-weight: 600;
}

.stop-message {
  white-space: pre-wrap;
  margin: 0 0 8px 0;
}

.stop-photo {
  max-width: 100%;
  border-radius: 12px;
  display: block;
  margin-top: 8px;
  border: 1px solid var(--border);
}

/* ---------- Forms ---------- */

form.note-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  margin-top: 14px;
  color: var(--abyss);
}

form.note-form textarea,
form.note-form input[type="text"],
form.note-form input[type="password"],
form.note-form input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  background: #fffdf8;
}

form.note-form textarea:focus,
form.note-form input:focus {
  outline: 2px solid var(--aqua);
  outline-offset: 1px;
}

form.note-form textarea {
  min-height: 100px;
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--kelp);
  margin-top: 4px;
}

.char-count.over {
  color: var(--urchin-dark);
  font-weight: 700;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(160deg, var(--sea) 0%, var(--sea-dark) 100%);
  color: white;
  width: 100%;
  margin-top: 18px;
  box-shadow: 0 3px 10px rgba(18, 115, 163, 0.3);
}

.btn-primary:hover {
  background: var(--sea-dark);
}

.btn-secondary {
  background: var(--foam);
  color: var(--sea-dark);
  border: 1px solid var(--foam-edge);
}

.btn-location {
  background: var(--foam);
  color: var(--sea-dark);
  border: 1px solid var(--foam-edge);
  width: 100%;
  margin-top: 14px;
}

.btn-location.granted {
  background: var(--sea);
  color: white;
  border-color: var(--sea-dark);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--urchin-light);
  color: var(--urchin-dark);
  border: 1px solid #eccdd1;
}

.location-status {
  font-size: 0.85rem;
  color: var(--kelp);
  margin-top: 6px;
}

/* ---------- Admin ---------- */

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.admin-row:last-child {
  border-bottom: none;
}

.pending-photo {
  max-width: 160px;
  border-radius: 8px;
  display: block;
  margin: 8px 0;
}

.actions {
  display: flex;
  gap: 8px;
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  color: var(--kelp);
  font-size: 0.8rem;
  padding: 28px 16px 34px;
  background:
    radial-gradient(600px 160px at 50% 100%, rgba(53, 182, 201, 0.12), transparent 70%);
}

.qr-image {
  display: block;
  max-width: 280px;
  margin: 16px auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

@media (min-width: 640px) {
  .container {
    padding: 24px;
  }
}
