/* ============================================================
   HYKORE Design System v2
   Palette: graphite / warm paper / brushed brass / deep teal
   Display: Big Shoulders Display (stamped-metal industrial feel)
   Body: IBM Plex Sans   Mono/Data: IBM Plex Mono
   ============================================================ */

:root {
  --ink: #14181B;
  --ink-soft: #262C30;
  --paper: #FAFAF8;
  --panel: #F0EFEA;
  --panel-line: #E2DFD6;
  --steel: #5B6770;
  --steel-light: #8B959C;
  --line: #DCD9CF;
  --brass: #B07A3E;
  --brass-deep: #7A5127;
  --brass-tint: #F3E6D3;
  --teal: #2F6E62;
  --teal-deep: #1E4A42;
  --white: #FFFFFF;

  --mono: 'IBM Plex Mono', monospace;
  --display: 'Big Shoulders Display', sans-serif;
  --body-font: 'IBM Plex Sans', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,250,248,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo {
  text-decoration: none; display: flex; align-items: center;
}
.logo img { height: 34px; width: auto; display: block; }
nav ul { list-style: none; display: flex; gap: 10px; }
nav a {
  font-size: 1rem; font-weight: 500; text-decoration: none; color: var(--steel);
  padding: 9px 16px; border-radius: 3px; position: relative; transition: color 0.2s var(--ease);
}
nav a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
nav a:hover { color: var(--ink); }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }
nav a.active { color: var(--ink); font-weight: 600; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 3px;
  padding: 8px 12px; font-family: var(--mono); font-size: 0.78rem; cursor: pointer;
}
@media (max-width: 760px) {
  nav ul { display: none; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 28px 20px; }
  nav ul.open { display: flex; }
  .menu-toggle { display: block; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.14s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.23s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.32s; }

/* ---------- Hero ---------- */
.hero { padding: 68px 0 56px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } }
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass-deep); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--brass-deep); }
h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.02; letter-spacing: 0.005em; margin-bottom: 22px; text-transform: uppercase;
}
h2 { font-family: var(--display); font-weight: 700; font-size: 2.1rem; letter-spacing: 0.005em; text-transform: uppercase; }
h3 { font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.01em; }
.hero p.lead, p.lead { font-size: 1.06rem; color: var(--steel); max-width: 48ch; margin-bottom: 30px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--body-font); font-weight: 600; font-size: 0.92rem;
  padding: 14px 26px; border-radius: 3px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,24,27,0.25); background: var(--brass-deep); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-deep); transform: translateY(-2px); }

/* ---------- Photo / drawing frame ---------- */
.photo-frame, .drawing-frame {
  background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 16px;
  position: relative; box-shadow: 0 20px 44px rgba(20,24,27,0.07);
}
.photo-frame .tag, .drawing-frame .tag {
  position: absolute; top: 16px; left: 20px; font-family: var(--mono); font-size: 0.66rem;
  color: var(--steel-light); letter-spacing: 0.07em; z-index: 2; background: rgba(255,255,255,0.9); padding: 3px 7px; border-radius: 2px;
}
.photo-frame img { border-radius: 3px; }

/* draw-in animation for hero technical SVG */
.draw-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s var(--ease) forwards; }
.draw-line.d1 { animation-delay: 0.1s; }
.draw-line.d2 { animation-delay: 0.5s; }
.draw-line.d3 { animation-delay: 0.9s; }
.fade-in-svg { opacity: 0; animation: fadeIn 0.8s ease forwards; }
.fade-in-svg.d1 { animation-delay: 1.1s; }
.fade-in-svg.d2 { animation-delay: 1.3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Section framing ---------- */
section { padding: 66px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.section-num { font-family: var(--mono); font-size: 0.8rem; color: var(--brass-deep); }
.section-sub { color: var(--steel); max-width: 62ch; margin-top: 10px; font-size: 1rem; }

/* ---------- Overview ---------- */
.overview-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 46px; }
@media (max-width: 780px) { .overview-grid { grid-template-columns: 1fr; } }
.overview-grid p { color: var(--steel); margin-bottom: 16px; }
.fact-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.fact {
  display: flex; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line);
  background: var(--white); font-size: 0.9rem; gap: 12px; transition: background 0.2s var(--ease);
}
.fact:hover { background: var(--brass-tint); }
.fact:last-child { border-bottom: none; }
.fact .k { color: var(--steel-light); font-family: var(--mono); font-size: 0.76rem; }
.fact .v { font-weight: 600; text-align: right; }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 15px 20px; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.spec-table th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel-light); background: var(--panel); font-weight: 500; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tr { transition: background 0.2s var(--ease); }
.spec-table tbody tr:hover { background: var(--brass-tint); }
.spec-table td.param { color: var(--steel); font-family: var(--mono); font-size: 0.85rem; }
.spec-table td.val { font-weight: 600; }

/* ---------- Process ---------- */
.process-list { display: flex; flex-direction: column; }
.process-step {
  display: grid; grid-template-columns: 74px 1fr; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line);
  transition: padding-left 0.25s var(--ease);
}
.process-step:first-child { border-top: none; }
.process-step:hover { padding-left: 8px; }
.process-num {
  font-family: var(--display); font-size: 2rem; color: var(--brass); font-weight: 700; line-height: 1;
}
.process-step p { color: var(--steel); font-size: 0.94rem; max-width: 58ch; margin-top: 4px; }

/* ---------- Icon chips ---------- */
.icon-chip {
  width: 46px; height: 46px; border-radius: 8px; background: var(--panel); border: 1px solid var(--panel-line);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.icon-chip svg { width: 24px; height: 24px; stroke: var(--brass-deep); }

/* ---------- Comparison ---------- */
.compare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 700px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 26px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.compare-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(20,24,27,0.08); }
.compare-card.accent { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.compare-card h3 { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.compare-card.accent h3 { color: var(--brass-deep); }
.compare-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.compare-card li { font-size: 0.92rem; color: var(--steel); padding-left: 20px; position: relative; }
.compare-card li::before { content: '–'; position: absolute; left: 0; color: var(--steel-light); }
.compare-card.accent li::before { content: '✓'; color: var(--brass-deep); font-weight: 700; }

/* ---------- Applications ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 780px) { .app-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .app-grid { grid-template-columns: 1fr; } }
.app-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; font-size: 0.9rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.app-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(20,24,27,0.08); border-color: var(--brass); }
.app-card .mono-tag { font-family: var(--mono); font-size: 0.7rem; color: var(--brass-deep); display: block; margin-bottom: 10px; letter-spacing: 0.05em; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel-light); margin-bottom: 7px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--body-font); font-size: 0.95rem; background: var(--white); color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-tint); outline: none; }
.form-field textarea { resize: vertical; min-height: 112px; }
.form-note { font-size: 0.82rem; color: var(--steel-light); margin-top: 10px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 60px 0 42px; background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
footer::before {
  content: ''; position: absolute; top: -60%; right: -10%; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(176,122,62,0.18), transparent 70%);
}
footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 42px; position: relative; z-index: 1; }
@media (max-width: 780px) { footer .wrap { grid-template-columns: 1fr; } }
footer h2 { color: var(--paper); font-size: 1.9rem; }
footer p.lead { color: #B7BEC1; max-width: 42ch; margin: 16px 0 26px; }
footer .btn-primary { background: var(--brass); color: var(--ink); }
footer .btn-primary:hover { background: var(--brass-deep); color: var(--paper); }
.contact-list { display: flex; flex-direction: column; gap: 15px; }
.contact-item .k { font-family: var(--mono); font-size: 0.72rem; color: #8A9296; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 4px; }
.contact-item .v { font-size: 1rem; color: var(--paper); }
.contact-item a.v { text-decoration: none; transition: color 0.2s var(--ease); }
.contact-item a.v:hover { color: var(--brass); }

/* Light-panel contact info card (used on Contact page body, not footer) */
.info-card-list { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  display: flex; align-items: center; gap: 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.info-card:hover { border-color: var(--brass); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,24,27,0.08); }
.info-card .icon-chip { margin-bottom: 0; flex-shrink: 0; }
.info-card .info-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-card .info-k { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--steel-light); }
.info-card .info-v { font-size: 1.05rem; font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
.info-card a.info-v:hover { color: var(--brass-deep); }
.fine { margin-top: 42px; padding-top: 24px; border-top: 1px solid #313A3E; font-size: 0.78rem; color: #767E82; position: relative; z-index: 1; }
.fine a { color: #9BA3A6; text-decoration: none; }
.fine a:hover { color: var(--brass); }
