/* Fieldstone Health — site styles
   Palette "Slate" and type from the brand brief. Fonts are self-hosted (SIL OFL). */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  /* Brand palette */
  --ink: #1e2b38;
  --slate: #3d5a73;
  --fog: #7d8a97;
  --mist: #e1e7ec;
  --cloud: #f9fafb;

  /* Derived tones */
  --white: #ffffff;
  --slate-deep: #2f475c; /* button hover */
  --muted: #52606d; /* Ink/Fog blend; readable small text on Cloud and Mist */
  --line: #d3dbe2;
  --on-ink-muted: #b4c0cb;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--slate);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--cloud);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: var(--cloud);
}

/* ---------- Logo (brand kit SVG, 645x121) ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.logo img {
  width: auto;
  height: 38px;
}

.site-footer .logo img {
  height: 32px;
}

@media (max-width: 640px) {
  .logo img {
    height: 32px;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 250, 251, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  min-height: 76px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9688rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--slate);
}

.site-nav .nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  color: var(--slate);
}

.site-nav .nav-cta:hover {
  background: var(--slate);
  color: var(--cloud);
}

@media (max-width: 640px) {
  .header-inner {
    padding-top: 14px;
    padding-bottom: 12px;
    min-height: 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px 16px;
  }

  .site-nav a {
    font-size: 0.9375rem;
  }

  .site-nav .nav-cta {
    padding: 6px 12px;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: var(--slate);
  color: var(--cloud);
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--slate-deep);
  border-color: var(--slate-deep);
  color: var(--cloud);
}

.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-quiet:hover {
  background: var(--white);
  border-color: var(--fog);
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link .arrow {
  transition: transform 0.15s ease;
}

.text-link:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Shared section bits ---------- */

.section {
  padding: var(--section) 0;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.625rem);
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(48px, 9vw, 112px) 0 clamp(72px, 10vw, 128px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.hero h1 {
  font-size: clamp(2.625rem, 6.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 600px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: var(--mist);
  overflow: hidden;
}

.hero-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    aspect-ratio: 16 / 9;
    max-height: 280px;
    width: 100%;
  }
}

/* ---------- Values ---------- */

.values {
  border-top: 1px solid var(--line);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--mist);
  color: var(--slate);
}

.value-icon svg {
  width: 24px;
  height: 24px;
}

.value-grid h3 {
  font-size: 1.375rem;
}

.value-grid p {
  margin-top: 10px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .value-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Products ---------- */

.products {
  background: var(--mist);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 16px;
  background: var(--cloud);
}

.product-tag {
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.product-card > p {
  margin-top: 12px;
  color: var(--muted);
}

.product-points {
  margin: 24px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  display: grid;
  gap: 10px;
}

.product-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9688rem;
}

.product-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 6px;
  border-radius: 50%;
  background: var(--fog);
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Security band (homepage) ---------- */

.security-band {
  background: var(--ink);
  color: var(--mist);
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.security-band .eyebrow {
  color: var(--on-ink-muted);
}

.security-band h2 {
  color: var(--cloud);
  font-size: clamp(1.875rem, 3.6vw, 2.625rem);
}

.security-band .lead {
  margin-top: 20px;
  color: var(--on-ink-muted);
  font-size: 1.125rem;
}

.security-band .text-link {
  margin-top: 28px;
  color: var(--cloud);
}

.security-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.security-list li {
  padding: 22px 0;
  border-top: 1px solid rgba(225, 231, 236, 0.16);
}

.security-list li:last-child {
  border-bottom: 1px solid rgba(225, 231, 236, 0.16);
}

.security-list strong {
  display: block;
  color: var(--cloud);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.security-list span {
  display: block;
  margin-top: 4px;
  color: var(--on-ink-muted);
}

@media (max-width: 860px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.625rem);
}

.contact-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
}

.contact-copy .fine {
  margin-top: 24px;
  font-size: 0.9375rem;
}

.form-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.field .optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%233D5A73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--fog);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--slate);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(61, 90, 115, 0.18);
}

.form-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.form-status {
  font-size: 0.9375rem;
  color: var(--slate);
}

.form-status:empty {
  display: none;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions .btn {
    width: 100%;
  }
}

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

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 48px;
}

.footer-brand p {
  margin-top: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--slate);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

/* ---------- Inner pages (security, 404) ---------- */

.page-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(2.375rem, 5.2vw, 3.5rem);
  letter-spacing: -0.02em;
}

.page-hero .lead {
  max-width: 680px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
}

.prose-sections {
  display: grid;
}

.prose-block {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: 16px clamp(32px, 6vw, 96px);
  padding: clamp(36px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.prose-block:first-child {
  padding-top: 0;
}

.prose-block:last-child {
  border-bottom: 0;
}

.prose-block h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.prose-block .body {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.prose-block .body p {
  color: var(--muted);
}

.prose-block .body ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

@media (max-width: 760px) {
  .prose-block {
    grid-template-columns: 1fr;
  }
}

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 16px;
  background: var(--mist);
}

.cta-panel h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.cta-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.message-page {
  padding: clamp(80px, 14vw, 160px) 0;
  text-align: center;
}

.message-page img {
  width: 72px;
  height: 72px;
  margin: 0 auto 32px;
}

.message-page h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.message-page p {
  margin: 16px auto 32px;
  max-width: 460px;
  color: var(--muted);
}
