/**
 * The Yacht Lab — Industry Design System Tokens & Blueprint Framework
 * Derived from the custom design specification:
 * Barlow Semi Condensed (Headings), Source Sans 3 (Body), IBM Plex Mono (Specs)
 */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Typography Stacks */
  --font-heading: 'Barlow Semi Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Brand Colors */
  --color-bg: #EEEBE4;             /* Salt Paper light ground */
  --color-surface: #E4E0D7;        /* Secondary light surface */
  --color-text: #1F222B;           /* Hull Navy dark copy */
  --color-text-dim: rgba(31, 34, 43, 0.82);
  --color-accent: #177D89;         /* Lab Teal primary accent */
  --color-accent-100: #E4EFF0;
  --color-accent-200: #C6DFE1;
  --color-accent-600: #0F5A63;     /* Darker teal for text/active */
  --color-accent-700: #0B454C;
  --color-accent-800: #0B454C;
  --color-harbour: #19515D;        /* Harbour Teal second dark ground */
  --color-navy: #1F222B;           /* Hull Navy */
  --color-navy-deep: #14161D;      /* Deep midnight dock ground */
  --color-amber: #FAB301;          /* Low Sun highlight accent */
  --color-granite: #585C60;        /* Wet Granite neutral */
  --color-cedar: #6B5340;          /* Dock Cedar draft marker */
  --color-silver: #C9CBC7;         /* Overcast Silver neutral */

  /* Dividers & Lines */
  --color-divider: rgba(31, 34, 43, 0.18);
  --color-divider-subtle: rgba(31, 34, 43, 0.12);
  --color-divider-light: rgba(255, 255, 255, 0.2);
  --color-divider-light-subtle: rgba(255, 255, 255, 0.12);

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(31, 34, 43, 0.08);
  --shadow-md: 0 4px 12px rgba(31, 34, 43, 0.1);
  --shadow-lg: 0 12px 28px rgba(31, 34, 43, 0.14);
}

/* Global Reset & Base Setup */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: inherit;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

/* Blueprint Framework: Hairline square frames with crosshair corner marks */
.blueprint {
  position: relative;
  border: 1px solid var(--color-divider);
  background: transparent;
  border-radius: 0 !important;
}

.corner {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  z-index: 2;
  color: var(--color-divider);
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background-color: currentColor;
}

/* Horizontal crosshair bar */
.corner::before {
  top: 5px;
  left: 0;
  width: 11px;
  height: 1px;
}

/* Vertical crosshair bar */
.corner::after {
  left: 5px;
  top: 0;
  width: 1px;
  height: 11px;
}

.corner.tl { top: -6px; left: -6px; }
.corner.tr { top: -6px; right: -6px; }
.corner.bl { bottom: -6px; left: -6px; }
.corner.br { bottom: -6px; right: -6px; }

/* Dark tone corner marks */
.tone-dark .blueprint,
.blueprint.tone-dark {
  border-color: rgba(255, 255, 255, 0.22);
}

.tone-dark .corner,
.corner.tone-dark {
  color: rgba(255, 255, 255, 0.45);
}

/* Duotone Photographic Treatment */
.duotone {
  position: relative;
  overflow: hidden;
}

.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0B454C;
  opacity: 0.38;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.duotone:hover::after {
  opacity: 0.28;
}

.duotone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65) contrast(1.05);
  transition: transform 600ms ease, filter 300ms ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  padding: 0 24px;
  min-height: 48px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-accent);
  border: 1px solid var(--color-accent);
  color: #FFFFFF !important;
}

.btn-primary:hover {
  background-color: var(--color-accent-600);
  border-color: var(--color-accent-600);
  color: #FFFFFF !important;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid rgba(31, 34, 43, 0.28);
  color: var(--color-text) !important;
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent) !important;
}

.btn-secondary-light {
  background-color: rgba(20, 22, 29, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #FFFFFF !important;
}

.btn-secondary-light:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* Tags & Badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  line-height: 1.2;
}

.tag-accent {
  background: var(--color-accent-100);
  color: var(--color-accent-600);
}

.tag-outline {
  border: 1px solid currentColor;
  background: transparent;
}

.tag-amber {
  background: var(--color-amber);
  color: var(--color-navy);
  font-weight: 600;
}

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

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-600);
}

.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background-color: #FFFFFF;
  border: 1px solid var(--color-divider);
  padding: 10px 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus, select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
}

.table th, .table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-divider);
}

.table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-600);
  background: var(--color-surface);
}

.table tr:hover td {
  background: rgba(23, 125, 137, 0.04);
}
