/* Adventure Rebuild — styles */
:root {
  --bg: #0f1115;
  --bg-soft: #151922;
  --surface: #1a1f2b;
  --text: #e6e9ef;
  --muted: #a6adbb;
  --accent: #d76a2b;
  --accent-600: #b45824;
  --accent-700: #94491e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
/* Global: never hyphenate or split words mid-line */
*, *::before, *::after { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; word-break: keep-all; overflow-wrap: normal; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -20%, rgba(215,106,43,0.12), transparent 50%) , var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

.container { width: min(1100px, 92%); margin-inline: auto; }
.section { padding: 72px 0; }
.section h2 { font-size: 2rem; margin: 0 0 24px; line-height: 1.2; }

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid transparent;
  transition: 200ms ease;
}
.btn:hover { transform: translateY(-1px); border-color: #2a3242; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-600); }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 8px 10px; background: var(--accent); color: #fff; border-radius: 6px; z-index: 1001; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(15,17,21,0.8); backdrop-filter: blur(10px); border-bottom: 1px solid #222734; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { display: block; height: 72px; width: auto; flex: 0 0 auto; }
.logo-text { display: inline-block; font-weight: 800; letter-spacing: 0.6px; line-height: 1; }
.logo-adventure { color: var(--accent); }
.logo-rebuild { color: #c9ceda; opacity: 0.95; }
@media (max-width: 560px) { .logo-text { display: none; } }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.nav a { padding: 10px 6px; border-radius: 8px; }
.nav a:focus-visible, .nav a:hover { background: rgba(215,106,43,0.12); color: #fff; }

.burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid #2a3242; background: #121722; color: var(--text); cursor: pointer; }
.burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.burger-box { position: relative; width: 20px; height: 14px; }
.burger-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.burger-line:nth-child(1) { top: 0; }
.burger-line:nth-child(2) { top: 6px; }
.burger-line:nth-child(3) { bottom: 0; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav { position: fixed; inset: 96px 0 auto 0; background: #0f1115; border-bottom: 1px solid #222734; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: 250ms ease; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-top: 1px solid #17202e; }
  .nav a { display: block; padding: 16px; }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
}
@media (min-width: 901px) { .burger { display: none; } }

/* Hero / Slider */
.hero { padding: 0; }
.slider { position: relative; overflow: hidden; }
.slides { position: relative; height: clamp(360px, 70vh, 640px); }
.slide { position: absolute; inset: 0; opacity: 0; transform: translateX(6%); transition: opacity 500ms ease, transform 600ms ease; display: grid; place-items: center; }
.slide.is-active { opacity: 1; transform: translateX(0); }
.slide::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1000px 680px at 85% -10%, rgba(215,106,43,0.32), transparent 58%), linear-gradient(180deg, rgba(0,0,0,0.38), rgba(0,0,0,0.0)); }
.slide-content { position: relative; text-align: center; padding: 32px 24px 42px; max-width: 900px; margin-inline: auto; }
.slide-content h1, .slide-content h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  margin: 0 0 12px;
  line-height: 1.18;
  letter-spacing: 0.2px;
  overflow-wrap: normal;
  word-break: keep-all;
}
.slide-content p { color: var(--muted); margin-bottom: 18px; }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px; border: 1px solid #2a3242; background: rgba(18,23,34,0.9); color: var(--text); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.slider-arrow:hover { border-color: var(--accent); color: var(--accent); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; }
.slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #2a3242; background: #161b27; padding: 0; cursor: pointer; }
.slider-dots button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }

/* Services */
.services .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid #222734; border-radius: 14px; padding: 18px; min-height: 140px; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); border-color: rgba(215,106,43,0.6); box-shadow: 0 10px 26px rgba(215,106,43,0.15); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card h3 { line-height: 1.25; letter-spacing: .1px; overflow-wrap: normal; word-break: keep-all; }

/* Ensure common text elements never split words */
p, li, a, label, button, span, figcaption { hyphens: none; word-break: keep-all; overflow-wrap: normal; }
.card p { margin: 0; color: var(--muted); }

@media (max-width: 900px) { .services .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .services .cards { grid-template-columns: 1fr; } }

/* Gallery */
.gallery .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery .grid-item { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: #121722; border: 1px solid #1e2533; }
.gallery img { width: 100%; height: 100%; object-fit: contain; background: #0f1115; padding: 8px; transition: transform .35s ease; image-rendering: -webkit-optimize-contrast; }
.gallery .grid-item:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .gallery .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .gallery .grid { grid-template-columns: 1fr; } }

/* About */
.about p { color: var(--muted); max-width: 70ch; }

/* Section titles accent underline */
.section h2 { position: relative; display: inline-block; }
.section h2::after {
  content: ""; position: absolute; left: 0; bottom: -8px; width: 56%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(215,106,43,0.8), rgba(215,106,43,0.1));
}

/* Contact */
.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
label { font-weight: 600; }
input, textarea { background: #0f131c; border: 1px solid #232a3a; color: var(--text); border-radius: 10px; padding: 12px 14px; font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.form-hint { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { border-top: 1px solid #222734; background: #0f1115; padding: 28px 0; color: var(--muted); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.lang-switch select { background: #0f131c; color: var(--text); border: 1px solid #2a3242; border-radius: 10px; padding: 8px 10px; font: inherit; }
.lang-switch select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Tech section */
.tech-lead { color: var(--muted); margin-top: -4px; margin-bottom: 20px; }
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tech-grid figure { background: var(--surface); border: 1px solid #222734; border-radius: 12px; overflow: hidden; }
.tech-grid img { width: 100%; height: 180px; object-fit: cover; display: block; }
.tech-grid figcaption { padding: 10px 12px; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .tech-grid { grid-template-columns: 1fr 1fr; } .tech-grid img { height: 160px; } }
@media (max-width: 520px) { .tech-grid { grid-template-columns: 1fr; } }
/* CNC subtle grid background */
.with-grid { position: relative; }
.with-grid { background-image:
  repeating-linear-gradient(0deg, rgba(215,106,43,0.05) 0 1px, transparent 1px 22px),
  repeating-linear-gradient(90deg, rgba(215,106,43,0.035) 0 1px, transparent 1px 22px);
  background-blend-mode: overlay;
}

/* Technical blueprint watermark for gallery */
.gallery.with-grid {
  background-image:
    repeating-linear-gradient(0deg, rgba(215,106,43,0.05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(215,106,43,0.035) 0 1px, transparent 1px 22px),
    url('../img/patterns/joint.svg');
  background-repeat: repeat, repeat, no-repeat;
  background-position: center;
  background-size: auto, auto, 880px auto;
  background-blend-mode: overlay, overlay, normal;
}
