/*
Theme Name: Kean Lai Precision Engineering
Theme URI: https://keanlai.com/
Author: Kean Lai
Description: Custom five-page precision engineering website theme converted from the supplied HTML prototype.
Version: 1.0.0
Text Domain: keanlai
*/

:root {
  --navy: #071a3d;
  --navy-2: #0d2b5f;
  --navy-3: #123a7d;
  --red: #d71920;
  --red-dark: #a80f15;
  --white: #ffffff;
  --offwhite: #f5f7fb;
  --light: #eef2f7;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 92%);
  margin: auto;
}

.top-bar {
  background: var(--navy);
  color: #dbe4f0;
  font-size: 13px;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.nav {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo-mark {
  width: 52px;
  height: 52px;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
}

.logo-text strong {
  display: block;
  color: var(--navy);
  font-size: 24px;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.logo-text span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  height: 3px;
  width: 0;
  background: var(--red);
  left: 0;
  bottom: -28px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 12px 18px;
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
  font-weight: 900;
  border: 2px solid transparent;
  transition: 0.2s ease;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.2px;
}

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

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  background: var(--red-dark);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.hero {
  min-height: 620px;
  background:
    linear-gradient(90deg, rgba(7,26,61,0.94) 0%, rgba(7,26,61,0.84) 50%, rgba(7,26,61,0.56) 100%),
    radial-gradient(circle at right, rgba(215,25,32,0.52), transparent 34%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 18px);
  color: var(--white);
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 800px;
  padding: 88px 0;
}

.hero-kicker,
.page-kicker {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 9px 14px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: -1.5px;
}

.hero p,
.page-hero p {
  font-size: 19px;
  color: #dbe4f0;
  max-width: 690px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-hero {
  background:
    linear-gradient(90deg, rgba(7,26,61,0.94), rgba(7,26,61,0.76)),
    radial-gradient(circle at right, rgba(215,25,32,0.45), transparent 35%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 18px);
  color: var(--white);
  padding: 92px 0;
}

.breadcrumb {
  color: #cbd5e1;
  font-size: 14px;
  margin-top: -12px;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--white);
  font-weight: 800;
}

section {
  padding: 76px 0;
}

.section-title {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 42px;
}

.section-title.left {
  text-align: left;
  margin-left: 0;
}

.section-title .small {
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 10px;
}

.section-title h2 {
  color: var(--navy);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.1;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section-title p {
  color: var(--muted);
  font-size: 17px;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: center;
}

.image-placeholder {
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(215,25,32,0.8), rgba(7,26,61,0.88)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 1px, transparent 1px, transparent 16px);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-content h3 {
  color: var(--navy);
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 18px;
}

.about-content p {
  color: var(--muted);
  margin-bottom: 18px;
}

.split-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.philosophy,
.light-section {
  background: var(--offwhite);
}

.philosophy-grid,
.product-grid,
.service-grid,
.keyword-grid,
.capability-grid {
  display: grid;
  gap: 22px;
}

.philosophy-grid {
  grid-template-columns: repeat(4, 1fr);
}

.product-grid,
.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.keyword-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
}

.capability-grid {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.philo-card,
.product-card,
.machine-panel,
.contact-card,
.policy-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.philo-card {
  padding: 30px 22px;
  text-align: center;
  min-height: 190px;
}

.card {
  padding: 28px;
  min-height: 230px;
}

.card h3,
.philo-card h3,
.product-card h3,
.machine-panel h3,
.contact-card h3,
.policy-card h3 {
  color: var(--navy);
  font-size: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.card p,
.product-card p,
.contact-card p,
.policy-card p {
  color: var(--muted);
  font-size: 15px;
}

.icon,
.philo-icon {
  width: 56px;
  height: 56px;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-weight: 900;
  position: relative;
}

.philo-icon {
  margin: 0 auto 22px;
}

.icon::after,
.philo-icon::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 5px;
  background: var(--red);
  bottom: -9px;
  left: 14px;
}

.product-card {
  overflow: hidden;
}

.product-image {
  height: 215px;
  background:
    linear-gradient(135deg, rgba(7,26,61,0.84), rgba(215,25,32,0.66)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 14px);
}

.product-body {
  padding: 24px;
}

.dark-section {
  background: var(--navy);
  color: var(--white);
}

.dark-section .section-title h2,
.dark-section .section-title p {
  color: var(--white);
}

.dark-section .section-title p {
  color: #cbd5e1;
}

.machine-panel {
  padding: 30px;
  border-top: 6px solid var(--red);
}

.machine-list,
.check-list {
  list-style: none;
  display: grid;
  gap: 13px;
}

.machine-list li,
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.machine-list li::before,
.check-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 12px;
}

.cta-section {
  background: var(--offwhite);
}

.cta-box {
  background: var(--red);
  color: var(--white);
  padding: 52px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.cta-box h2 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.1;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.cta-box p {
  color: #ffe5e7;
  font-size: 17px;
}

.cta-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.keyword-grid a {
  color: var(--navy);
  font-weight: 900;
  font-size: 17px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.keyword-grid a:hover {
  color: var(--red);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.contact-card {
  padding: 30px;
}

.contact-line {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-line:last-child {
  border-bottom: none;
}

.contact-line strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.form-box {
  background: var(--offwhite);
  padding: 30px;
  border: 1px solid var(--line);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-box label {
  display: block;
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 8px;
}

.form-box input,
.form-box textarea,
.form-box select {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  margin-bottom: 16px;
  font: inherit;
}

.form-box textarea {
  min-height: 140px;
  resize: vertical;
}

.map-placeholder {
  margin-top: 30px;
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(7,26,61,0.88), rgba(215,25,32,0.72)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 16px);
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
}

footer {
  background: var(--navy);
  color: #dbe4f0;
  padding: 46px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 36px;
}

footer h3 {
  color: var(--white);
  margin-bottom: 14px;
  font-size: 18px;
  text-transform: uppercase;
}

footer p,
footer a {
  color: #cbd5e1;
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 22px;
  color: #94a3b8;
  font-size: 13px;
}

.floating-enquiry {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--red);
  color: var(--white);
  padding: 14px 18px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  z-index: 80;
}

.note {
  background: #fff7ed;
  border-left: 5px solid #f97316;
  padding: 16px 18px;
  color: #9a3412;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .about-grid,
  .split-2,
  .capability-grid,
  .contact-grid,
  .cta-box,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .philosophy-grid,
  .product-grid,
  .service-grid,
  .keyword-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .top-bar,
  .nav-cta {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 66px 0;
  }

  .philosophy-grid,
  .product-grid,
  .service-grid,
  .keyword-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 32px;
  }

  .floating-enquiry {
    right: 12px;
    bottom: 12px;
  }
}

