/*
Theme Name:   CTRL Motor
Theme URI:    https://www.ctrl-motor.com/
Description:  Custom theme for CTRL Motor — extreme environment motion solutions (vacuum, high/low temperature motors). Built for speed, SEO and GEO.
Version:      1.0.0
Author:       CTRL Motor
License:      Proprietary
Text Domain:  ctrlmotor
*/

:root {
  --navy-900: #0a1826;
  --navy-800: #0d2137;
  --navy-700: #14304e;
  --navy-100: #e8eef5;
  --orange: #f97316;
  --orange-dark: #d95f0e;
  --ink: #1c2733;
  --ink-soft: #46586a;
  --line: #dde5ec;
  --bg-soft: #f4f7fa;
  --white: #ffffff;
  --green: #178a4c;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 33, 55, .06), 0 2px 8px rgba(13, 33, 55, .06);
  --shadow-md: 0 4px 12px rgba(13, 33, 55, .10), 0 12px 32px rgba(13, 33, 55, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy-800); margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  margin-bottom: .7rem;
}
.section { padding: 76px 0; }
.section.alt { background: var(--bg-soft); }
.section.dark { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #cdd9e5; }
.section.dark h1, .section.dark h2, .section.dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.6em; border-radius: 6px; font-weight: 600; font-size: .98rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s ease;
  background: var(--orange); color: #fff;
}
.btn:hover { background: var(--orange-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { background: transparent; border-color: var(--navy-700); color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }
.btn-sm { padding: .5em 1.1em; font-size: .88rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: #aebfce; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.topbar a { color: #dce7f0; display: inline-flex; align-items: center; gap: .4em; }
.topbar a:hover { color: var(--orange); }
.topbar-group { display: flex; gap: 22px; align-items: center; }
.topbar-cert { color: #7e93a8; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.site-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--navy-800); letter-spacing: .02em; }
.site-logo:hover { color: var(--navy-800); }
.site-logo .logo-mark {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  display: grid; place-items: center; color: #fff;
}
.site-logo .logo-mark svg { width: 22px; height: 22px; }
.site-logo em { font-style: normal; color: var(--orange); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 10px 14px; font-weight: 600; font-size: .95rem;
  color: var(--ink); border-radius: 6px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--orange); }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .18s ease; z-index: 50;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .sub-menu a { padding: 9px 12px; font-weight: 500; white-space: nowrap; }
.menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 6px; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2.4px; background: var(--navy-800); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #dbe6f0;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(249,115,22,.22), transparent 60%),
    radial-gradient(700px 500px at 8% 110%, rgba(20,48,78,.9), transparent 65%),
    linear-gradient(140deg, var(--navy-900) 0%, var(--navy-800) 55%, #0f2c49 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(800px 500px at 70% 20%, #000, transparent 75%);
}
.hero .container { position: relative; z-index: 2; padding-top: 92px; padding-bottom: 92px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.12; margin-bottom: 20px; }
.hero h1 .accent { color: var(--orange); }
.hero-lead { font-size: 1.12rem; color: #b9c9d8; max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-stat { border-left: 2px solid rgba(249,115,22,.65); padding-left: 14px; }
.hero-stat b { display: block; color: #fff; font-size: 1.5rem; line-height: 1.1; }
.hero-stat span { font-size: .82rem; color: #93a8bb; letter-spacing: .02em; }
.hero-panel {
  background: rgba(13,33,55,.55); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 30px; backdrop-filter: blur(6px);
}
.hero-panel h3 { color: #fff; display: flex; align-items: center; gap: .5em; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.hero-panel li { display: flex; gap: .7em; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,.14); font-size: .94rem; color: #c6d4e1; align-items: flex-start; }
.hero-panel li:last-child { border-bottom: 0; }
.hero-panel .icon { color: var(--orange); margin-top: .18em; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 16 / 10; background: linear-gradient(160deg, #eef3f8, #dde6ee); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .45em; }
.card-body h3 a { color: var(--navy-800); }
.card-body h3 a:hover { color: var(--orange); }
.card-body p { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.card .btn { align-self: flex-start; margin-top: 8px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip {
  font-size: .76rem; font-weight: 600; color: var(--navy-700);
  background: var(--navy-100); border-radius: 999px; padding: .32em .85em;
}
.section.dark .chip { background: rgba(255,255,255,.12); color: #e8eef5; }

.cat-card { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: all .2s ease; height: 100%; }
.cat-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; margin-bottom: 16px; }
.cat-icon .icon { width: 26px; height: 26px; }
.cat-card h3 { margin-bottom: .4em; }
.cat-card p { color: var(--ink-soft); font-size: .92rem; margin-bottom: .8em; }
.cat-card .more { font-weight: 600; font-size: .9rem; color: var(--orange); display: inline-flex; align-items: center; gap: .4em; }

/* ---------- Feature / why-us ---------- */
.feature-row { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 0; }
.feature-row .cat-icon { margin-bottom: 0; flex: none; }
.feature-row h3 { margin-bottom: .25em; }
.feature-row p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

/* ---------- Case band ---------- */
.case-band { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); }
.case-band .media { min-height: 340px; background-size: cover; background-position: center; }
.case-band .body { padding: 46px; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.case-band .body p { color: var(--ink-soft); }
.result-list { list-style: none; margin: 6px 0 20px; padding: 0; }
.result-list li { display: flex; gap: .6em; padding: 7px 0; color: var(--ink); font-size: .95rem; }
.result-list .icon { color: var(--green); margin-top: .2em; }

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-band b { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); color: #fff; line-height: 1.05; }
.stats-band span { color: #9db2c4; font-size: .86rem; }
.stat-cell { border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 26px 14px; }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem; color: var(--navy-800); padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--orange); font-weight: 400; line-height: 1; transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 22px 18px; color: var(--ink-soft); font-size: .95rem; }
.faq-a-inner p { margin: 0; }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 42%; color: var(--ink-soft); font-weight: 600; background: var(--bg-soft); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---------- Product single layout ---------- */
.product-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.product-gallery { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg,#eef3f8,#dde6ee); position: sticky; top: 96px; }
.breadcrumbs { font-size: .84rem; color: var(--ink-soft); margin-bottom: 22px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .sep { margin: 0 .5em; color: #b6c2cd; }

/* ---------- Inquiry form ---------- */
.inquiry-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: .88rem; color: var(--navy-800); }
.form-field input, .form-field textarea, .form-field select {
  font: inherit; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 6px;
  background: #fbfcfd; transition: border-color .15s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--orange); background: #fff; }
.notice { border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; font-weight: 500; }
.notice-success { background: #e7f6ee; color: var(--green); border: 1px solid #b9e2cb; }
.notice-error { background: #fdeaea; color: #b3261e; border: 1px solid #f2c1c1; }

/* ---------- Contact cards ---------- */
.contact-card { display: flex; gap: 16px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; }
.contact-card .cat-icon { margin-bottom: 0; width: 46px; height: 46px; }
.contact-card h3 { margin-bottom: .2em; font-size: 1rem; }
.contact-card p { margin: 0; color: var(--ink-soft); font-size: .93rem; word-break: break-word; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 30px 0 10px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item::before { content: ""; position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.18); }
.timeline-item b { color: var(--navy-800); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #cdd9e5; padding: 64px 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 85% 0%, rgba(249,115,22,.18), transparent 60%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { margin: 0; max-width: 46em; color: #a9bccd; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--orange) 0%, #e85d04 100%); border-radius: 16px; padding: 48px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.12); }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.92); }
.cta-band .btn { background: #fff; color: var(--orange-dark); position: relative; z-index: 1; }
.cta-band .btn:hover { background: var(--navy-800); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #93a8bb; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 64px 0 44px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #aebfce; }
.site-footer a:hover { color: var(--orange); }
.footer-brand p { max-width: 30em; }
.footer-contact li { display: flex; gap: .6em; align-items: flex-start; }
.footer-contact .icon { color: var(--orange); margin-top: .2em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: .84rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Content typography ---------- */
.entry-content { max-width: 780px; }
.entry-content > * + * { margin-top: 0; }
.entry-content h2 { margin-top: 1.6em; padding-top: .4em; }
.entry-content h3 { margin-top: 1.3em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; color: var(--ink-soft); }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--orange); background: var(--bg-soft); border-radius: 0 8px 8px 0; color: var(--ink-soft); }

/* ---------- Pagination / misc ---------- */
.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: .5em 1em; border: 1px solid var(--line); border-radius: 6px; margin: 0 3px; font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.archive-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.archive-count { color: var(--ink-soft); font-size: .9rem; }
.search-box { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box input[type="search"] { font: inherit; padding: .6em .9em; border: 1.5px solid var(--line); border-radius: 6px; min-width: 240px; }
.no-results { text-align: center; padding: 80px 0; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; gap: 36px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .case-band { grid-template-columns: 1fr; }
  .case-band .media { min-height: 240px; }
  .product-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: #fff; box-shadow: -12px 0 40px rgba(13,33,55,.18); padding: 90px 24px 24px; transform: translateX(105%); transition: transform .25s ease; z-index: 200; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; }
  .main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin-left: 14px; display: none; }
  .main-nav li.open > .sub-menu { display: block; }
  .nav-toggle { display: block; position: relative; z-index: 300; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7.4px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7.4px) rotate(-45deg); }
  .header-cta .btn { display: none; }
  .topbar-group.cert-group { display: none; }
  .grid-2, .grid-3, .grid-4, .stats-band { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 34px 26px; }
  .section { padding: 56px 0; }
  .case-band .body { padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 0 30px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
