/* Turtles Lab — warm, handcrafted small-town tech */

:root {
  --green-900: oklch(0.28 0.05 155);
  --green-800: oklch(0.36 0.06 155);
  --green-700: oklch(0.44 0.07 155);
  --green-600: oklch(0.55 0.08 155);
  --green-100: oklch(0.93 0.02 155);
  --green-50:  oklch(0.97 0.012 155);

  --cream:     oklch(0.972 0.014 85);
  --cream-2:   oklch(0.95 0.018 85);
  --cream-3:   oklch(0.92 0.022 85);

  --terra:     oklch(0.62 0.13 45);
  --terra-2:   oklch(0.55 0.13 42);
  --terra-soft:oklch(0.88 0.05 50);

  --ink:       oklch(0.22 0.02 80);
  --ink-2:     oklch(0.36 0.02 80);
  --ink-3:     oklch(0.52 0.015 80);

  --rule:      oklch(0.85 0.02 80);
  --rule-soft: oklch(0.90 0.018 80);

  --accent: var(--terra);

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --maxw: 1200px;
  --pad: clamp(20px, 4vw, 56px);

  --radius: 4px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(oklch(0.5 0.03 80 / 0.025) 1px, transparent 1px),
    radial-gradient(oklch(0.5 0.03 80 / 0.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
}

a { color: var(--green-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.022em; font-weight: 450; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.018em; }
h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; }
h4 { font-size: 17px; font-family: var(--sans); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); }

p { margin: 0 0 1em; text-wrap: pretty; max-width: 64ch; }
.lede { font-size: clamp(18px, 1.4vw, 21px); color: var(--ink-2); line-height: 1.55; max-width: 60ch; }

/* Layout primitives */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }
.section { padding: clamp(56px, 7vw, 96px) 0; position: relative; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--cream2 { background: var(--cream-2); }
.section--green { background: var(--green-800); color: var(--cream); }
.section--green h1, .section--green h2, .section--green h3, .section--green h4 { color: var(--cream); }
.section--green a { color: var(--cream); }

.divider { height: 1px; background: var(--rule); border: 0; }
.divider-dashed { border: 0; border-top: 1px dashed var(--rule); margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--terra-2);
}

.section--green .eyebrow { color: var(--terra-soft); }
.section--green .eyebrow::before { background: var(--terra-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--green-800); color: var(--cream); }
.btn--primary:hover { background: var(--green-900); color: var(--cream); }
.btn--accent { background: var(--terra); color: var(--cream); }
.btn--accent:hover { background: var(--terra-2); color: var(--cream); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--ghost-cream { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost-cream:hover { background: var(--cream); color: var(--green-900); }
.btn--text { padding: 0; background: transparent; color: var(--green-800); border: 0; font-weight: 500; }
.btn--text:hover { color: var(--terra); transform: none; }
.btn--text .arrow { transition: transform .2s ease; }
.btn--text:hover .arrow { transform: translateX(4px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--cream) l c h / 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand .logo {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--green-800);
  color: var(--cream);
  border-radius: 50%;
  font-size: 18px;
}
.brand .name small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: -2px;
}

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.nav-links a:hover { color: var(--ink); background: var(--cream-2); }
.nav-links a.is-active { color: var(--green-800); background: var(--green-50); }

.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-phone {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}
.nav-phone:hover { color: var(--terra); }

.hamburger {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.hamburger span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  position: relative;
}
.hamburger span::before, .hamburger span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink);
}
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }

@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: inline-flex; }
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--cream);
  padding: 12px var(--pad) 20px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-family: var(--serif);
}
.mobile-menu .phone-row {
  display: flex; gap: 10px; margin-top: 16px;
}

/* Footer */
.site-footer {
  background: var(--green-900);
  color: var(--cream);
  padding: 64px 0 32px;
  position: relative;
  z-index: 1;
}
.site-footer h4 { color: var(--cream); opacity: 0.7; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--terra-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid oklch(from var(--cream) l c h / 0.15);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col ul { list-style: none; padding: 0; margin: 12px 0 0; }
.footer-col li { padding: 6px 0; font-size: 14.5px; }
.footer-mission { font-family: var(--serif); font-size: 19px; line-height: 1.4; max-width: 32ch; opacity: 0.92; margin-top: 12px; }
.footer-james {
  display: flex; gap: 14px; align-items: center;
  margin-top: 20px;
}
.footer-james-photo {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green-700); flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; color: var(--cream);
  overflow: hidden;
}
.footer-james-meta { font-size: 14px; line-height: 1.4; }
.footer-james-meta strong { display: block; font-weight: 500; font-family: var(--serif); font-size: 17px; }
.footer-james-meta a { color: var(--terra-soft); font-family: var(--mono); font-size: 13px; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: oklch(from var(--cream) l c h / 0.6);
  font-family: var(--mono);
  flex-wrap: wrap; gap: 12px;
}

/* Cards */
.card {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card--cream2 { background: var(--cream-2); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

/* Pill / badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cream-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
}
.pill--green { background: var(--green-50); color: var(--green-800); border-color: var(--green-100); }
.pill--terra { background: var(--terra-soft); color: var(--terra-2); border-color: oklch(from var(--terra) l c h / 0.3); }
.pill--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Striped placeholder */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--cream-2) 0 14px,
      var(--cream-3) 14px 28px
    );
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow: hidden;
}
.placeholder--green {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.32 0.06 155) 0 14px,
      oklch(0.30 0.06 155) 14px 28px
    );
  border-color: oklch(0.42 0.06 155);
  color: oklch(from var(--cream) l c h / 0.6);
}
.placeholder span {
  background: var(--cream);
  padding: 6px 12px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  max-width: 80%;
}
.placeholder--green span { background: var(--green-900); border-color: var(--green-700); color: var(--cream); }

/* Headline tag */
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
}

/* Tag list */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Form elements */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--cream);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 15px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--green-700);
  outline-offset: -1px;
  border-color: var(--green-700);
}
.field textarea { min-height: 120px; resize: vertical; }
.field-hint { font-size: 12.5px; color: var(--ink-3); }

/* Decorative turtle mark */
.turtle-mark {
  width: 100%;
  display: block;
}

/* Wave / scallop divider */
.scallop {
  height: 16px;
  background:
    radial-gradient(circle at 10px 0, transparent 10px, var(--cream) 10.5px) 0 0/20px 16px repeat-x;
}
.scallop--green {
  background:
    radial-gradient(circle at 10px 0, transparent 10px, var(--green-800) 10.5px) 0 0/20px 16px repeat-x;
}

/* Utility */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stack-sm > * + * { margin-top: 8px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3.keep-2-mobile { grid-template-columns: 1fr 1fr; }
}

/* Page transitions */
.page { animation: pageIn .35s ease; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Hero / type accents */
.hand-underline {
  background-image: linear-gradient(transparent 64%, oklch(from var(--terra) l c h / 0.35) 64%, oklch(from var(--terra) l c h / 0.35) 86%, transparent 86%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 0 4px;
}

/* Keep small-screen mobile menu visible above content */
@media (max-width: 980px) {
  .site-header.menu-open { background: var(--cream); }
}
