/* Legend Reptiles — design tokens + global base */

:root {
  /* Palette — warm & natural */
  --bone: oklch(96% 0.015 75);
  --bone-2: oklch(93% 0.02 70);
  --bone-3: oklch(88% 0.025 65);
  --cream: oklch(93% 0.035 140);
  --ink: oklch(28% 0.04 40);
  --ink-soft: oklch(42% 0.04 40);
  --ink-muted: oklch(58% 0.03 45);
  --terracotta: oklch(52% 0.09 145);
  --terracotta-deep: oklch(42% 0.08 145);
  --terracotta-soft: oklch(86% 0.06 145);
  --clay: oklch(72% 0.09 55);
  --amber: oklch(68% 0.14 65);
  --amber-soft: oklch(86% 0.08 75);
  --sand: oklch(85% 0.04 75);
  --forest: oklch(45% 0.07 95);
  --forest-deep: oklch(38% 0.06 90);
  --moss: oklch(55% 0.06 110);
  --rust: oklch(52% 0.14 40);
  --line: oklch(82% 0.025 65);
  --line-soft: oklch(89% 0.02 70);

  /* Type */
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-soft: 0 1px 2px rgba(40, 50, 40, 0.04), 0 8px 24px rgba(40, 50, 40, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.05;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Placeholder image — flat soft sage, labeled */
.ph {
  position: relative;
  background: oklch(90% 0.04 150);
  color: var(--ink-muted);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
  overflow: hidden;
  border-radius: 2px;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, oklch(0% 0 0 / 0.08));
  pointer-events: none;
}
.ph .ph-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  padding: 4px 8px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.ph.ph-dark {
  background: oklch(82% 0.05 150);
}
.ph.ph-forest {
  background: oklch(85% 0.055 145);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 150ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--terracotta-deep);
  color: var(--bone);
}
.btn-primary:hover { background: var(--terracotta); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--bone-2); border-color: var(--ink); }
.btn-amber {
  background: var(--amber);
  color: var(--ink);
}
.btn-amber:hover { background: oklch(72% 0.14 65); }

/* Badge / tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bone-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.tag-available { background: oklch(92% 0.08 140); color: oklch(35% 0.12 140); border-color: oklch(80% 0.1 140); }
.tag-hold { background: oklch(92% 0.08 75); color: oklch(45% 0.14 55); border-color: oklch(82% 0.1 70); }
.tag-sold { background: var(--bone-3); color: var(--ink-muted); }

/* Utility */
.stack > * + * { margin-top: var(--gap, 16px); }
.hairline { height: 1px; background: var(--line); }
.hairline-v { width: 1px; background: var(--line); align-self: stretch; }

/* Page container */
.page {
  width: 100%;
  min-height: 100vh;
  background: var(--bone);
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
}
.container-narrow {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 48px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bone) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  max-width: 1600px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #2f5a3a 0%, #1d3a26 70%, #16301f 100%);
  display: grid; place-items: center;
  color: #e6b422;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  border: 1.5px solid #e6b422;
  box-shadow: 0 0 0 2px rgba(230,180,34,0.18), inset 0 1px 2px rgba(255,255,255,0.12);
  letter-spacing: 0;
  position: relative;
}
.nav-brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(230,180,34,0.35);
  pointer-events: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--ink-soft);
}
.nav-links a {
  transition: color 150ms;
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Footer */
.footer {
  margin-top: 120px;
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bone-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.footer li:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 20, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade 200ms ease;
  user-select: none;
  -webkit-user-select: none;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  aspect-ratio: 3/2;
  width: 1100px;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(15,20,15,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--bone);
  display: grid; place-items: center;
  font-size: 20px;
  z-index: 110;
  transition: background 150ms;
}
.lightbox-close:hover { background: rgba(255,255,255,0.16); }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(15,20,15,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--bone);
  display: grid; place-items: center;
  font-size: 22px;
  z-index: 110;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.14); }
.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }
.lightbox-caption {
  position: absolute;
  bottom: 32px; left: 50%; transform: translateX(-50%);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  padding: 8px 14px;
  border-radius: 2px;
}

/* Inquire modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 20, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 180ms ease;
}
.modal {
  background: var(--bone);
  width: 100%;
  max-width: 560px;
  border-radius: 4px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: pop 220ms cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal-body { padding: 24px 28px; }
.modal-body label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.modal-body input, .modal-body textarea, .modal-body select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bone);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 16px;
  transition: border-color 150ms;
}
.modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus {
  outline: none;
  border-color: var(--forest);
}
.modal-body textarea { min-height: 96px; resize: vertical; }
.modal-footer {
  padding: 16px 28px;
  background: var(--bone-2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Success state */
.inquire-sent {
  padding: 48px 28px;
  text-align: center;
}
.inquire-sent-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: oklch(92% 0.08 140);
  color: oklch(35% 0.12 140);
  display: grid; place-items: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

/* Specimen wall (home quote section) */
.specimen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}
.specimen-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(230,180,34,0.28);
  background: #0c0f0a;
}
.specimen-tile.tall { grid-row: span 2; }
.specimen-tile.wide { grid-column: span 2; }
.specimen-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.04);
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 400ms;
}
.specimen-tile:hover img { transform: scale(1.07); filter: saturate(1.18) contrast(1.08); }
.specimen-tile::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), inset 0 -60px 50px -30px rgba(10,12,8,0.85);
  pointer-events: none;
}
.specimen-tile figcaption {
  position: absolute; left: 10px; bottom: 9px;
  font-size: 10.5px; letter-spacing: 0.14em;
  color: #f0e7cf;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  z-index: 2;
  opacity: 0.85;
  transition: opacity 300ms, color 300ms;
}
.specimen-tile:hover figcaption { opacity: 1; color: #e6b422; }
.specimen-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(230,180,34,0.7), transparent);
  opacity: 0; transform: translateY(0);
  z-index: 2; pointer-events: none;
}
.specimen-tile:hover .specimen-scan {
  opacity: 1;
  animation: specimen-scan-move 1.6s linear infinite;
}
@keyframes specimen-scan-move {
  0% { transform: translateY(0); }
  100% { transform: translateY(200px); }
}
@media (max-width: 760px) {
  .specimen-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .specimen-tile.wide { grid-column: span 2; }
}

/* Specimen archive collage (home) */
.collage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 168px;
  grid-auto-flow: dense;
  gap: 10px;
}
.collage-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(230,180,34,0.22);
  background: #0c0f0a;
}
.collage-tile.cwide { grid-column: span 2; }
.collage-tile.csmall { grid-column: span 1 !important; grid-row: span 1 !important; }
.collage-tile:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
.collage-tile:nth-child(5n+3) { grid-row: span 2; }
.collage-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 400ms;
}
.collage-tile:hover img { transform: scale(1.06); filter: saturate(1.18); }
.collage-tile::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  pointer-events: none;
}
.collage-tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 8px 7px;
  font-size: 10px; letter-spacing: 0.12em;
  color: #fff; opacity: 1; z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
  background: linear-gradient(transparent, rgba(8,10,6,0.82));
  transition: color 300ms;
}
.collage-tile:hover figcaption { opacity: 1; }
@media (max-width: 760px) {
  .collage-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .collage-tile:nth-child(7n+1) { grid-column: span 2; grid-row: span 1; }
  .collage-tile:nth-child(5n+3) { grid-row: span 1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  * { max-width: 100%; }
  .nav-inner { padding: 12px 16px !important; flex-wrap: wrap; gap: 8px; }
  .nav-brand span { font-size: 1.05rem !important; }
  .nav-links { gap: 12px !important; font-size: 11px !important; flex-wrap: wrap; }
  .container { padding-left: 18px !important; padding-right: 18px !important; }
  div[style*="repeat(2"], div[style*="repeat(3"], div[style*="repeat(4"],
  div[style*="repeat(5"], div[style*="repeat(6"], div[style*="auto-fit"],
  div[style*="auto-fill"] { grid-template-columns: 1fr !important; }
  div[style*="flex: 1 1 4"], div[style*="flex: 1 1 3"] { flex: 1 1 100% !important; min-width: 0 !important; }
  div[style*="min-width"] { min-width: 0 !important; }
}
@media (max-width: 760px) {
  h1 { font-size: 44px !important; line-height: 1.05 !important; }
  h2 { font-size: 38px !important; }
  div[style*="1fr 1fr"],
  div[style*="1fr 1.2fr"], div[style*="1.2fr 1fr"],
  div[style*="1fr 1.1fr"], div[style*="1.1fr 1fr"],
  div[style*="1.4fr 1fr"], div[style*="1fr 1.4fr"],
  div[style*="60px 1fr"], div[style*="120px 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
