/*
 * Ghost Core Web Style
 * Derived from the established Ghost Core visual language.
 *
 * Typography:
 * - Glacial Indifference: headings / subheadings / product identity
 * - Inter: functional UI and body copy
 *
 * Expected self-hosted font files:
 *   /fonts/glacial-indifference-regular.woff2
 *   /fonts/glacial-indifference-bold.woff2
 *
 * Font files are intentionally not bundled with this stylesheet.
 */

@font-face {
  font-family: "Glacial Indifference";
  src: url("/fonts/glacial-indifference-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Glacial Indifference";
  src: url("/fonts/glacial-indifference-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Core surfaces */
  --ghost-canvas: #14171c;
  --ghost-header: #111419;
  --ghost-raised: #1a1e25;
  --ghost-soft: #20252d;
  --ghost-sunken: #0d1117;
  --ghost-border: #282e37;

  /* Text */
  --ghost-text: #d5d9df;
  --ghost-text-secondary: #9ca4af;
  --ghost-text-subtle: #707985;
  --ghost-title: #aeb9c3;
  --ghost-logo: #8999a7;

  /* Interface blues */
  --ghost-active-bg: #355873;
  --ghost-active: #587d98;
  --ghost-illuminated: #91b1c3;

  /* Spectral / apparition palette */
  --ghost-violet-deep: #382d62;
  --ghost-violet: #51437f;
  --ghost-indigo: #3e4f7b;
  --ghost-blue-deep: #315e82;
  --ghost-blue: #5790af;
  --ghost-blue-light: #83b6cd;
  --ghost-blue-pale: #b9d7e3;
  --ghost-apparition: #d9e8ed;

  /* Semantic */
  --ghost-critical: #b65a5a;
  --ghost-modulation: #c8874b;

  /* Typography */
  --ghost-font-heading: "Glacial Indifference", "Helvetica Neue", Arial, sans-serif;
  --ghost-font-ui: Inter, "Helvetica Neue", Arial, sans-serif;

  /* Geometry */
  --ghost-radius-sm: 5px;
  --ghost-radius-md: 9px;
  --ghost-radius-lg: 14px;
  --ghost-max-width: 1200px;

  /* Spacing */
  --ghost-space-1: 0.25rem;
  --ghost-space-2: 0.5rem;
  --ghost-space-3: 0.75rem;
  --ghost-space-4: 1rem;
  --ghost-space-5: 1.5rem;
  --ghost-space-6: 2rem;
  --ghost-space-7: 3rem;
  --ghost-space-8: 4.5rem;

  /* Motion */
  --ghost-fast: 120ms;
  --ghost-normal: 200ms;
  --ghost-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

html {
  background: var(--ghost-canvas);
  color: var(--ghost-text);
  font-family: var(--ghost-font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(87, 144, 175, 0.08), transparent 38rem),
    var(--ghost-canvas);
  color: var(--ghost-text);
}

::selection {
  background: var(--ghost-active);
  color: var(--ghost-apparition);
}

a {
  color: var(--ghost-blue-light);
  text-decoration-color: rgba(131, 182, 205, 0.38);
  text-underline-offset: 0.18em;
  transition:
    color var(--ghost-fast) var(--ghost-ease),
    text-decoration-color var(--ghost-fast) var(--ghost-ease);
}

a:hover {
  color: var(--ghost-blue-pale);
  text-decoration-color: currentColor;
}

/* Typography */

h1,
h2,
h3,
h4,
h5,
h6,
.ghost-heading,
.ghost-subheading,
.ghost-product-name {
  margin-top: 0;
  color: var(--ghost-title);
  font-family: var(--ghost-font-heading);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.015em;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.75rem);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
}

h4,
h5,
h6 {
  font-size: 1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

p {
  margin: 0 0 var(--ghost-space-4);
  color: var(--ghost-text-secondary);
}

strong {
  color: var(--ghost-text);
  font-weight: 600;
}

small,
.ghost-muted {
  color: var(--ghost-text-subtle);
}

.ghost-eyebrow {
  margin-bottom: var(--ghost-space-3);
  color: var(--ghost-blue-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ghost-lead {
  max-width: 48rem;
  color: var(--ghost-text-secondary);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

/* Layout */

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

.ghost-section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.ghost-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ghost-space-5);
}

/* Header / navigation */

.ghost-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(40, 46, 55, 0.72);
  background: rgba(17, 20, 25, 0.92);
  backdrop-filter: blur(14px);
}

.ghost-nav {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--ghost-space-5);
}

.ghost-logo {
  color: var(--ghost-logo);
  font-family: var(--ghost-font-heading);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.ghost-nav-links {
  display: flex;
  align-items: center;
  gap: var(--ghost-space-5);
}

.ghost-nav-links a {
  color: var(--ghost-text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
}

.ghost-nav-links a:hover,
.ghost-nav-links a[aria-current="page"] {
  color: var(--ghost-blue-pale);
}

/* Hero */

.ghost-hero {
  display: grid;
  min-height: min(78vh, 760px);
  align-items: center;
  padding-block: var(--ghost-space-8);
}

.ghost-hero h1 {
  max-width: 12ch;
  margin-bottom: var(--ghost-space-5);
}

.ghost-hero .ghost-lead {
  margin-bottom: var(--ghost-space-6);
}

/* Surfaces */

.ghost-card,
.ghost-panel {
  border: 1px solid var(--ghost-border);
  border-radius: var(--ghost-radius-md);
  background: var(--ghost-raised);
}

.ghost-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  transition:
    border-color var(--ghost-normal) var(--ghost-ease),
    background var(--ghost-normal) var(--ghost-ease),
    transform var(--ghost-normal) var(--ghost-ease);
}

.ghost-card:hover {
  border-color: #34404b;
  background: var(--ghost-soft);
  transform: translateY(-2px);
}

.ghost-panel {
  padding: var(--ghost-space-5);
}

.ghost-display {
  border: 1px solid rgba(40, 46, 55, 0.8);
  border-radius: var(--ghost-radius-md);
  background:
    radial-gradient(circle at 50% 100%, rgba(56, 45, 98, 0.16), transparent 55%),
    var(--ghost-sunken);
}

/* Buttons */

.ghost-button,
button.ghost-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: var(--ghost-space-2);
  padding: 0.7rem 1.05rem;
  border: 1px solid var(--ghost-border);
  border-radius: var(--ghost-radius-sm);
  background: var(--ghost-soft);
  color: var(--ghost-text);
  font: 600 0.82rem/1 var(--ghost-font-ui);
  letter-spacing: 0.025em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--ghost-fast) var(--ghost-ease),
    border-color var(--ghost-fast) var(--ghost-ease),
    color var(--ghost-fast) var(--ghost-ease),
    transform var(--ghost-fast) var(--ghost-ease);
}

.ghost-button:hover {
  border-color: var(--ghost-active);
  background: #252c35;
  color: var(--ghost-apparition);
}

.ghost-button:active {
  transform: translateY(1px);
}

.ghost-button--primary {
  border-color: #416b88;
  background: var(--ghost-active-bg);
  color: var(--ghost-apparition);
}

.ghost-button--primary:hover {
  border-color: var(--ghost-blue);
  background: #3b627e;
}

.ghost-button--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ghost-text-secondary);
}

/* Forms */

.ghost-field {
  display: grid;
  gap: var(--ghost-space-2);
}

.ghost-label {
  color: var(--ghost-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ghost-input,
.ghost-select,
.ghost-textarea {
  width: 100%;
  border: 1px solid var(--ghost-border);
  border-radius: var(--ghost-radius-sm);
  outline: none;
  background: var(--ghost-sunken);
  color: var(--ghost-text);
  font: inherit;
  transition:
    border-color var(--ghost-fast) var(--ghost-ease),
    box-shadow var(--ghost-fast) var(--ghost-ease);
}

.ghost-input,
.ghost-select {
  min-height: 2.75rem;
  padding-inline: 0.8rem;
}

.ghost-textarea {
  min-height: 8rem;
  padding: 0.8rem;
  resize: vertical;
}

.ghost-input:focus,
.ghost-select:focus,
.ghost-textarea:focus,
.ghost-button:focus-visible,
a:focus-visible {
  border-color: var(--ghost-active);
  box-shadow: 0 0 0 3px rgba(88, 125, 152, 0.18);
}

/* Tags / status */

.ghost-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding-inline: 0.55rem;
  border: 1px solid var(--ghost-border);
  border-radius: 999px;
  background: var(--ghost-soft);
  color: var(--ghost-text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ghost-tag--active {
  border-color: rgba(88, 125, 152, 0.7);
  background: rgba(53, 88, 115, 0.72);
  color: var(--ghost-blue-pale);
}

/* Divider */

.ghost-divider {
  height: 1px;
  border: 0;
  background: var(--ghost-border);
}

/* Spectral accent utility.
   Keep this restrained: "haunted, not Halloween." */

.ghost-spectral {
  background:
    radial-gradient(circle at 28% 75%, rgba(81, 67, 127, 0.26), transparent 34%),
    radial-gradient(circle at 62% 62%, rgba(49, 94, 130, 0.24), transparent 38%),
    radial-gradient(circle at 82% 36%, rgba(87, 144, 175, 0.13), transparent 30%),
    var(--ghost-sunken);
}

.ghost-glow-text {
  color: var(--ghost-blue-pale);
  text-shadow: 0 0 18px rgba(131, 182, 205, 0.14);
}

/* Tables */

.ghost-table {
  width: 100%;
  border-collapse: collapse;
}

.ghost-table th,
.ghost-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--ghost-border);
  text-align: left;
}

.ghost-table th {
  color: var(--ghost-text-subtle);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-table td {
  color: var(--ghost-text-secondary);
}

/* Footer */

.ghost-footer {
  padding-block: var(--ghost-space-7);
  border-top: 1px solid var(--ghost-border);
  background: var(--ghost-header);
  color: var(--ghost-text-subtle);
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Responsive */

@media (max-width: 720px) {
  .ghost-container {
    width: min(calc(100% - 1.25rem), var(--ghost-max-width));
  }

  .ghost-nav {
    min-height: 3.5rem;
  }

  .ghost-nav-links {
    gap: var(--ghost-space-3);
  }

  .ghost-grid {
    grid-template-columns: 1fr;
  }

  .ghost-hero {
    min-height: auto;
    padding-block: var(--ghost-space-7);
  }
}
