/* ============================================
   Copper Ridge Instrumentation School
   styles.css
   ============================================ */

/* ---- Variables & Reset ---- */
:root {
  --copper-oxide: #6E4C3E;
  --copper-bright: #B87333;
  --copper-light: #E8985E;
  --slate-900: #0F1419;
  --slate-800: #1E252D;
  --slate-700: #2F363F;
  --off-white: #F4F1EA;
  --paper: #E8E4D9;
  --blueprint-line: rgba(163, 177, 192, 0.12);
  --font-serif: 'Crimson Text', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--off-white);
  color: var(--slate-800);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Layout Utilities ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--copper-bright);
  color: var(--off-white);
  padding: 0.5rem 1rem;
  z-index: 200;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-two {
  display: grid;
  gap: 3rem;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 600;
}

p {
  max-width: 65ch;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s ease-out;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--copper-bright);
  color: var(--off-white);
  border-color: var(--copper-bright);
}

.btn-primary:hover {
  background: var(--copper-oxide);
  border-color: var(--copper-oxide);
}

.btn-secondary {
  background: transparent;
  color: var(--copper-bright);
  border-color: var(--copper-bright);
}

.btn-secondary:hover {
  background: var(--copper-bright);
  color: var(--off-white);
}

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  background: rgba(15, 20, 25, 0.97);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(184, 115, 51, 0.25);
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--off-white);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: conic-gradient(from 45deg, var(--copper-bright), var(--copper-oxide), var(--copper-light));
  border-radius: 50%;
  border: 2px solid rgba(244, 241, 234, 0.2);
}

.nav-menu {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  padding: 0;
}

.nav-menu a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--copper-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--off-white);
  position: relative;
  transition: background 0.2s, transform 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--slate-800);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%) sepia(10%) brightness(0.35) contrast(1.1);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15, 20, 25, 0.9) 0%, rgba(15, 20, 25, 0.4) 60%, rgba(15, 20, 25, 0.1) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 6rem 1.5rem;
}

.hero-subhead {
  color: var(--copper-light);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.75rem);
  color: var(--off-white);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #b8b3a8;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* ---- Sections ---- */
.section {
  padding: 5rem 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--slate-700);
}

/* ---- Workshop ---- */
.workshop-section {
  background: var(--off-white);
}

.workshop-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  margin-bottom: 1.25rem;
  color: var(--slate-900);
}

.workshop-text p + p {
  margin-top: 1rem;
}

.workshop-media {
  background-color: #c8c4bc;
  overflow: hidden;
  border: 1px solid #dcd8cc;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.workshop-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

/* ---- Training ---- */
.blueprint-bg {
  background-color: var(--slate-800);
  background-image:
    linear-gradient(var(--blueprint-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint-line) 1px, transparent 1px);
  background-size: 40px 40px;
  border-top: 1px solid rgba(244, 241, 234, 0.06);
  border-bottom: 1px solid rgba(244, 241, 234, 0.06);
}

.blueprint-bg .section-header h2 {
  color: var(--off-white);
}

.blueprint-bg .section-header p {
  color: #a8a49c;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.training-card {
  background: rgba(244, 241, 234, 0.03);
  border: 1px solid rgba(244, 241, 234, 0.08);
  padding: 2.25rem 2rem;
  border-radius: 2px;
  transition: border-color 0.25s ease-out, transform 0.25s ease-out;
}

.training-card:hover {
  border-color: var(--copper-bright);
  transform: translateY(-4px);
}

.card-icon {
  color: var(--copper-bright);
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 42px;
  height: 42px;
}

.training-card h3 {
  font-size: 1.5rem;
  color: var(--off-white);
  margin-bottom: 0.75rem;
}

.training-card p {
  color: #b8b3a8;
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: none;
}

/* ---- Instrument Bench ---- */
.bench-section {
  background: var(--paper);
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.bench-card {
  background: var(--off-white);
  border: 1px solid #dcd8cc;
  padding: 2.25rem;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(15, 20, 25, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}

.bench-card:hover {
  box-shadow: 0 8px 24px rgba(15, 20, 25, 0.08);
  transform: translateY(-2px);
}

.bench-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--slate-900);
}

.bench-meta {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--copper-bright);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.bench-card > p {
  color: var(--slate-700);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Instrument Displays */
.instrument-display {
  background: var(--slate-800);
  color: var(--off-white);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
  border: 1px solid #3a424a;
}

.gauge-face {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a424a, #1E252D);
  border: 2px solid #485058;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.45);
}

.gauge-needle {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  height: 44%;
  background: var(--copper-light);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-60deg);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gauge-cap {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 10px;
  height: 10px;
  background: var(--copper-bright);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.readout {
  font-family: 'Courier New', Courier, monospace;
  text-align: center;
}

.readout-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--copper-light);
}

.readout-unit {
  font-size: 0.875rem;
  color: #7a8896;
  margin-left: 0.25rem;
}

/* Digital pressure */
.digital-face {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.25rem;
  letter-spacing: 0.18em;
  text-align: center;
  color: #d4cfc7;
}

.digit {
  display: inline-block;
  min-width: 1ch;
  text-align: center;
}

.bar-graph {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 1.25rem;
  height: 36px;
  align-items: flex-end;
}

.bar-segment {
  width: 7px;
  height: 100%;
  background: #2F363F;
  border-radius: 1px;
  transition: background 0.3s ease-out;
}

.bar-segment.active {
  background: var(--copper-bright);
}

/* Diagram */
.instrument-diagram {
  background: #f6f4ef;
  border: 1px solid #dcd8cc;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.diagram-svg {
  width: 100%;
  height: auto;
}

.tolerance-readout {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: 'Courier New', Courier, monospace;
  margin-top: 0.75rem;
}

.tolerance-readout .label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tolerance-readout .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-800);
  transition: color 0.3s;
}

.tolerance-readout .unit {
  font-size: 0.8rem;
  color: #666;
}

/* Dashboard */
.instrument-dashboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mini-gauge {
  background: var(--slate-800);
  padding: 0.875rem;
  border-radius: 2px;
  border: 1px solid #3a424a;
  text-align: center;
}

.mini-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #7a8896;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.mini-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--copper-light);
}

.mini-unit {
  font-size: 0.75rem;
  color: #7a8896;
}

/* Comparison Sliders */
.comparison-slider {
  position: relative;
  width: 100%;
  height: 160px;
  background: #ddd;
  overflow: hidden;
  user-select: none;
  margin-bottom: 1.5rem;
  cursor: col-resize;
}

.slider-before,
.slider-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slider-after {
  width: 50%;
  overflow: hidden;
  z-index: 5;
}

.slider-after > div {
  width: var(--w, 100%);
  height: 100%;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--copper-bright);
  cursor: col-resize;
  z-index: 10;
  transform: translateX(-50%);
}

.slider-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: var(--off-white);
  border: 2px solid var(--copper-bright);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.slider-handle:hover .slider-knob,
.slider-handle:focus .slider-knob {
  transform: translate(-50%, -50%) scale(1.1);
}

.thermal-visible {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px),
    linear-gradient(180deg, #d0ccc4, #b0aca4);
}

.thermal-ir {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px),
    linear-gradient(90deg, rgba(40, 60, 120, 0.35), rgba(200, 60, 40, 0.6));
}

.defect-raw {
  background: repeating-linear-gradient(0deg, #bbb, #bbb 1px, #ccc 1px, #ccc 4px);
}

.defect-ai {
  background: repeating-linear-gradient(0deg, #bbb, #bbb 1px, #ccc 1px, #ccc 4px);
  position: relative;
}

.defect-ai::after {
  content: '';
  position: absolute;
  left: 25%;
  top: 30%;
  width: 50%;
  height: 18%;
  border: 2px dashed var(--copper-bright);
  background: rgba(184, 115, 51, 0.08);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
  pointer-events: none;
}

/* ---- Enrollment ---- */
.enrollment-section {
  border-top: 1px solid rgba(244, 241, 234, 0.06);
}

.enrollment-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  color: var(--off-white);
  margin-bottom: 1.25rem;
}

.enrollment-info > p {
  color: #a8a49c;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.contact-block {
  font-style: normal;
  color: #c8c4bc;
  line-height: 1.85;
  margin-top: 2.5rem;
}

.contact-block a {
  color: var(--copper-light);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-block a:hover {
  text-decoration: underline;
}

.enrollment-form {
  background: var(--off-white);
  padding: 2.5rem;
  border-radius: 2px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--slate-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #c4c0b6;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--slate-800);
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #2d5a27;
  min-height: 1.5em;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--slate-900);
  color: #888;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(244, 241, 234, 0.04);
}

.footer-address {
  margin-top: 0.5rem;
  color: #666;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .container {
    padding: 0 2.5rem;
  }
}

@media (min-width: 1024px) {
  .grid-two {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .section {
    padding: 6rem 0;
  }

  .hero-content {
    padding: 6rem 2.5rem;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 20, 25, 0.98);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--copper-oxide);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  }

  .nav-menu.is-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

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