/* Velvet Observatory — Cortex Helix Field Academy */
:root {
  --navy: #0e1628;
  --navy-mid: #1a2440;
  --plum: #1a1020;
  --burgundy: #6b1c32;
  --burgundy-deep: #4a1224;
  --copper: #b87333;
  --copper-bright: #d4a574;
  --copper-dim: #8a5520;
  --ivory: #f5efe6;
  --ivory-muted: #c9c0b0;
  --smoked: rgba(245, 239, 230, 0.08);
  --glass: rgba(14, 22, 40, 0.72);
  --lacquer: #12101a;
  --velvet: #2a1420;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-meta: "IBM Plex Mono", "Courier New", monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --max: 72rem;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ivory);
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(107, 28, 50, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(184, 115, 51, 0.12), transparent 50%),
    linear-gradient(165deg, var(--navy) 0%, var(--plum) 45%, var(--lacquer) 100%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--copper-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ivory);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; }

.coord {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(184, 115, 51, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--header-h);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand span {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.58rem;
  color: var(--copper);
  letter-spacing: 0.18em;
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--copper-dim);
  color: var(--ivory);
  padding: 0.45rem 0.7rem;
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-muted);
}

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

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--navy-mid);
    border-bottom: 1px solid rgba(184, 115, 51, 0.3);
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0.85rem;
  }
}

/* Buttons — telescope controls */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  background: linear-gradient(180deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  border: 1px solid var(--copper);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    background 0.35s var(--ease);
  box-shadow:
    inset 0 1px 0 rgba(212, 165, 116, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--copper-bright);
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease);
}

.btn:hover {
  transform: translateX(4px) rotate(-0.4deg);
  color: var(--ivory);
  box-shadow:
    inset 0 1px 0 rgba(212, 165, 116, 0.5),
    0 6px 20px rgba(107, 28, 50, 0.45);
}

.btn:hover::before {
  transform: translateX(0);
}

.btn:active {
  transform: translateX(2px) rotate(0.5deg) scale(0.98);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(184, 115, 51, 0.55);
  color: var(--copper-bright);
}

.btn-ghost:hover {
  background: rgba(184, 115, 51, 0.12);
  color: var(--ivory);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: var(--space-md);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.85);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--plum) 0%, transparent 55%),
    linear-gradient(100deg, rgba(14, 22, 40, 0.75) 0%, transparent 60%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0 var(--space-lg);
  max-width: 38rem;
}

.hero-copy .coord {
  margin-bottom: var(--space-sm);
  animation: rise 0.9s var(--ease) both;
}

.hero-copy h1 {
  margin: 0 0 var(--space-sm);
  animation: rise 1s 0.1s var(--ease) both;
}

.hero-copy .lede {
  font-size: 1.15rem;
  color: var(--ivory-muted);
  animation: rise 1s 0.2s var(--ease) both;
}

.hero-copy .btn-row {
  animation: rise 1s 0.3s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: var(--space-xl) 0;
}

.section-head {
  margin-bottom: var(--space-lg);
  max-width: 40rem;
}

.section-head .coord {
  display: block;
  margin-bottom: var(--space-xs);
}

.panel {
  background: linear-gradient(145deg, rgba(42, 20, 32, 0.55), rgba(18, 16, 26, 0.7));
  border: 1px solid rgba(184, 115, 51, 0.22);
  border-radius: 2px;
  padding: var(--space-md);
  box-shadow: inset 0 1px 0 rgba(245, 239, 230, 0.04);
}

.grid-2 {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Offer / clinic cards — interaction containers */
.offer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(160deg, rgba(26, 36, 64, 0.65), rgba(26, 16, 32, 0.8));
  border: 1px solid rgba(184, 115, 51, 0.28);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.4s var(--ease);
}

.offer-card:hover {
  border-color: var(--copper);
  transform: translateY(-3px);
  color: inherit;
}

.offer-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.offer-card .body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.offer-card h3 {
  margin: 0 0 0.5rem;
  color: var(--ivory);
}

.offer-card p {
  color: var(--ivory-muted);
  font-size: 0.98rem;
  flex: 1;
}

.offer-card .meta {
  font-family: var(--font-meta);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--copper);
  margin-top: var(--space-sm);
}

/* Quote / review */
.quote {
  border-left: 2px solid var(--copper);
  padding-left: var(--space-md);
  margin: 0;
}

.quote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ivory);
}

.quote footer {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--copper);
  margin-top: var(--space-sm);
}

/* Page hero (interior) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid rgba(184, 115, 51, 0.2);
}

.page-hero.with-media {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.page-hero.with-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(184, 115, 51, 0.3);
  filter: saturate(0.9);
}

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

/* Forms */
.form {
  display: grid;
  gap: var(--space-sm);
  max-width: 36rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.form input,
.form select,
.form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  color: var(--ivory);
  background: rgba(14, 22, 40, 0.8);
  border: 1px solid rgba(184, 115, 51, 0.35);
  border-radius: 2px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--copper-bright);
  box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.2);
}

.form .error {
  color: #e8a0a8;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.form .form-status {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(184, 115, 51, 0.4);
  background: rgba(42, 20, 32, 0.6);
  font-size: 0.95rem;
}

.form .form-status.ok {
  border-color: rgba(180, 200, 140, 0.5);
  color: #d4e8b0;
}

.form .form-status.err {
  border-color: rgba(232, 160, 168, 0.5);
  color: #e8a0a8;
}

.contact-meta {
  display: grid;
  gap: var(--space-sm);
}

.contact-meta dt {
  font-family: var(--font-meta);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}

.contact-meta dd {
  margin: 0.2rem 0 0;
  color: var(--ivory);
}

/* Pricing rows */
.rate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(184, 115, 51, 0.2);
}

.rate-row:first-child {
  border-top: 1px solid rgba(184, 115, 51, 0.2);
}

.rate-row .price {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--copper-bright);
  white-space: nowrap;
}

/* Blog */
.post-list {
  display: grid;
  gap: var(--space-lg);
}

.post-item {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
  align-items: start;
}

.post-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(184, 115, 51, 0.25);
}

.post-item:hover h3 {
  color: var(--copper-bright);
}

@media (max-width: 700px) {
  .post-item { grid-template-columns: 1fr; }
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: var(--space-lg);
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
  color: var(--ivory-muted);
}

.prose li { margin-bottom: 0.4rem; }

.cover-img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  margin: var(--space-md) 0 var(--space-lg);
  border: 1px solid rgba(184, 115, 51, 0.3);
}

/* Legal */
.legal {
  max-width: 44rem;
}

.legal h2 {
  margin-top: var(--space-lg);
  font-size: 1.4rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: var(--space-md) 0;
}

.legal th,
.legal td {
  border: 1px solid rgba(184, 115, 51, 0.25);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(42, 20, 32, 0.5);
  color: var(--copper);
}

/* Annotation lab timeline */
.timeline {
  display: grid;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--copper), transparent);
}

.timeline-item {
  padding: 0 0 var(--space-md) 2rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.25);
}

/* Footer */
.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0 var(--space-md);
  border-top: 1px solid rgba(184, 115, 51, 0.25);
  background: rgba(10, 12, 20, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-lg);
}

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

.site-footer h3 {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 var(--space-sm);
}

.site-footer p,
.site-footer li {
  color: var(--ivory-muted);
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin-bottom: 0.4rem; }

.site-footer a {
  text-decoration: none;
  color: var(--ivory-muted);
}

.site-footer a:hover {
  color: var(--copper-bright);
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(184, 115, 51, 0.15);
  font-family: var(--font-meta);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ivory-muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: linear-gradient(180deg, var(--navy-mid), var(--plum));
  border-top: 1px solid var(--copper);
  padding: var(--space-md);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(110%);
  transition: transform 0.5s var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  justify-content: space-between;
}

.cookie-inner p {
  margin: 0;
  flex: 1 1 18rem;
  font-size: 0.95rem;
  color: var(--ivory-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* 404 */
.err-page {
  text-align: center;
  padding: var(--space-xl) 0;
}

.err-page .coord {
  margin-bottom: var(--space-sm);
}

/* Portrait */
.portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(184, 115, 51, 0.3);
}

.muted {
  color: var(--ivory-muted);
}

.star-rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: var(--space-md) 0;
  color: var(--copper);
  font-family: var(--font-meta);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}

.star-rule::before,
.star-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 115, 51, 0.45), transparent);
}
