/*
  Garrison Ridge — shared tokens + component primitives.
  Tokens follow shadcn/ui naming so components read the same as shadcn's.
  Palette is carried over from the original site:
    navy #062f4f · teal #71afb5 · mist #f5f3fd
  Compiled by @tailwindcss/vite; component rules sit in the `components` layer
  so utility classes in the HTML can still override them.
*/

@import "tailwindcss";

@theme {
  --font-sans: "Lato", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Source Serif 4", ui-serif, Georgia, serif;
  --color-navy: #062f4f;
  --color-navy-deep: #041f35;
  --color-teal: #71afb5;
  --color-teal-ink: #2f6b72;
  --color-mist: #f5f3fd;
  --color-ink: #0b1b28;
  --color-line: #dad8e4;
  --color-subtle: #55606b;
}

:root {
  --background: #f5f3fd;
  --foreground: #0b1b28;
  --muted: #ebe9f3;
  --muted-foreground: #55606b;
  --card: #ffffff;
  --border: #dad8e4;
  --input: #cfcddb;
  --primary: #062f4f;
  --primary-foreground: #f5f3fd;
  --accent: #71afb5;
  --accent-ink: #2f6b72; /* teal dark enough for text on mist */
  --ring: #71afb5;
  --radius: 0.375rem;
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
  body {
    background: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  ::selection { background: var(--accent); color: var(--primary); }
}

@layer components {
/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.75rem; padding: 0 1.25rem;
  border-radius: var(--radius);
  font-size: .9375rem; font-weight: 500; line-height: 1;
  white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.btn svg { width: 1rem; height: 1rem; transition: transform .2s; }
.btn:hover svg { transform: translateX(2px); }

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: #0b3f68; }

.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: #86bdc2; }

.btn-outline { border: 1px solid var(--input); background: transparent; color: var(--foreground); }
.btn-outline:hover { border-color: var(--primary); }

.btn-ghost-light { color: var(--primary-foreground); border: 1px solid rgb(245 243 253 / .3); }
.btn-ghost-light:hover { border-color: rgb(245 243 253 / .8); }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center;
  height: 1.5rem; padding: 0 .5rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: .75rem; color: var(--muted-foreground);
  background: var(--card);
}

/* ---------- Form controls ---------- */
.label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--input); border-radius: var(--radius);
  background: var(--card); color: var(--foreground);
  font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 2.75rem; padding: 0 .75rem; }
.textarea { padding: .625rem .75rem; min-height: 9rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8b93a0; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(113 175 181 / .35);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355606b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem;
  padding-right: 2.25rem;
}

/* Segmented radio group */
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .375rem; }
.segmented label {
  display: flex; align-items: center; justify-content: center;
  height: 2.5rem; padding: 0 .75rem;
  border: 1px solid var(--input); border-radius: var(--radius);
  background: var(--card); font-size: .875rem; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + label { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.segmented input:focus-visible + label { box-shadow: 0 0 0 3px rgb(113 175 181 / .45); }

/* ---------- Accordion (native <details>) ---------- */
.accordion details { border-bottom: 1px solid var(--border); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 500;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 2px; }
.accordion summary .chev { flex: none; width: 1.125rem; height: 1.125rem; color: var(--muted-foreground); transition: transform .2s; }
.accordion details[open] summary .chev { transform: rotate(45deg); }
.accordion .content { padding: 0 3rem 1.5rem 0; color: var(--muted-foreground); line-height: 1.7; }

/* ---------- Site chrome ---------- */
.site-header { transition: border-color .2s, background-color .2s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { border-color: var(--border); background: rgb(245 243 253 / .92); backdrop-filter: saturate(1.4) blur(8px); }

.nav-link { position: relative; color: var(--muted-foreground); transition: color .15s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--foreground); }

/* Small section labels */
.eyebrow { font-size: .75rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.step-num { font-family: var(--font-serif, Georgia, serif); font-size: 1.125rem; color: var(--accent-ink); }

/* Diagonal accent borrowed from the split in the GR logo */
.ridge-band { background: linear-gradient(118deg, transparent 55%, rgb(113 175 181 / .14) 55%); }

/* "What we do" rows */
.service-row {
  display: grid; grid-template-columns: 1fr auto; gap: .375rem 1.5rem; align-items: baseline;
  padding: 1.5rem .25rem; border-bottom: 1px solid rgb(245 243 253 / .15);
  transition: background-color .2s;
}
.service-row h3 { font-size: 1.125rem; font-weight: 700; }
.service-row p { grid-column: 1; color: rgb(245 243 253 / .68); line-height: 1.6; }
.service-row .arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 1.125rem; height: 1.125rem; color: var(--accent); transition: transform .2s; }
a.service-row:hover { background: rgb(113 175 181 / .08); }
a.service-row:hover .arrow { transform: translateX(4px); }
@media (min-width: 768px) {
  .service-row { grid-template-columns: 17rem 1fr auto; padding: 1.5rem .75rem; }
  .service-row p { grid-column: 2; }
  .service-row .arrow { grid-column: 3; grid-row: 1; }
}

/* Image frames: keep placeholders + real photos cropped consistently */
.frame { overflow: hidden; background: var(--muted); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.frame-hover:hover img { transform: scale(1.025); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
}
