/*
Theme Name: Ohmkara Engineering
Author: Bershana
Description: Custom brown and white corporate theme for Ohmkara Engineering (Industrial Electrical & Automation).
Version: 1.6.4
Text Domain: ohmkara-engineering
*/

:root {
  --brown: #5c3a2a;
  --brown-deep: #3d2918;
  --tan: #c4a06a;
  --cream: #f7f1e8;
  --paper: #fffdf9;
  --ink: #1b130f;
  --muted: #6b5d54;
  --line: #ddcfc0;
  --white: #ffffff;
  --max: 1120px;
  --elev: 0 12px 32px rgba(61, 41, 24, 0.16), 0 3px 8px rgba(61, 41, 24, 0.08);
  --elev-hover: 0 20px 44px rgba(61, 41, 24, 0.2), 0 6px 16px rgba(61, 41, 24, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}

p {
  margin: 0 0 1rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brown);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 22px rgba(61, 41, 24, 0.07);
}

.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  background: transparent;
}

.brand img {
  height: 48px;
  width: auto;
  max-height: 48px;
  max-width: 280px;
  background: transparent;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-menu,
.nav-menu ul {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.nav-menu ul a {
  position: relative;
  padding: 0.45rem 0.05rem;
  color: var(--ink);
  transition: color 0.2s ease;
}

.nav-menu ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.12rem;
  height: 1px;
  background: var(--brown);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease, height 0.2s ease;
}

.nav-menu ul a:hover {
  color: var(--brown);
}

.nav-menu ul a:hover::after {
  transform: scaleX(1);
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--brown);
  font-weight: 600;
}

.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_item > a::after {
  transform: scaleX(1);
  height: 2px;
}

.nav-menu ul a:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--brown);
  background: var(--brown);
  color: var(--white);
  padding: 0.7rem 1.15rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn:hover {
  background: var(--brown-deep);
  border-color: var(--brown-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--brown);
}

.btn-ghost:hover {
  background: var(--brown);
  color: var(--white);
}

.hero {
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(92, 58, 42, 0.07) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(92, 58, 42, 0.07) 47px 48px),
    var(--cream);
  padding: 5rem 0 4.2rem;
  border-bottom: 1px solid var(--line);
}

.hero-industry {
  position: relative;
  min-height: min(34rem, 80vh);
  display: flex;
  align-items: center;
  background:
    linear-gradient(100deg, rgba(247, 241, 232, 0.95) 0%, rgba(247, 241, 232, 0.84) 38%, rgba(247, 241, 232, 0.4) 64%, rgba(247, 241, 232, 0.14) 100%),
    url("assets/industry-hero.jpg?v=2") center / cover no-repeat,
    var(--cream);
}

.hero .wrap,
.page-hero .wrap {
  animation: rise 0.75s ease both;
}

.kicker {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--brown);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.12rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4.2rem 0;
}

.section-alt {
  background: var(--cream);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--muted);
}

.copy-block {
  max-width: 46rem;
}

.copy-block p {
  margin: 0 0 1.1rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.section-head h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--brown);
  margin-top: 0.85rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 2px solid var(--brown);
  padding: 1.4rem;
  text-decoration: none;
  box-shadow: var(--elev);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elev-hover);
}

.card h3 {
  font-size: 1.5rem;
}

.card-media,
.media-slot {
  margin: -1.4rem -1.4rem 1rem;
  background: var(--cream);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-slot {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.card-photo {
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
}

.card-photo .card-media,
.card-photo .media-slot {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
}

.card-photo .media-slot {
  background: #efe6da;
}

.card-photo .card-media img {
  transition: transform 0.55s ease;
}

.card-photo:hover .card-media img {
  transform: scale(1.03);
}

.card-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 1rem 0.8rem;
  background: var(--paper);
}

.card-photo-caption h3 {
  font-size: 1.2rem;
  margin: 0;
}

.card-photo-caption p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.meta {
  color: var(--brown);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.page-hero {
  padding: 3.2rem 0 2.2rem;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.page-hero .lede {
  margin-bottom: 0;
}

.about-split {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 2.4rem;
  align-items: start;
}

.facts dl {
  margin: 0;
}

.facts dt {
  color: var(--brown);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}

.facts dd {
  margin: 0 0 1.1rem;
}

.facts dd:last-child {
  margin-bottom: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 2rem 2.4rem;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 0.85rem;
  text-decoration: none;
}

.footer-brand img {
  height: 40px;
  width: auto;
  max-width: 220px;
}

.footer-col p {
  margin: 0 0 0.35rem;
  max-width: 28rem;
}

.footer-col p:last-child {
  margin-bottom: 0;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--brown);
}

.enquiry-form label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.enquiry-form input,
.enquiry-form textarea {
  width: 100%;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  padding: 0.7rem 0.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.enquiry-form input:focus,
.enquiry-form textarea:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(92, 58, 42, 0.1);
}

.enquiry-form textarea {
  min-height: 8rem;
}

.hp {
  position: absolute;
  left: -9999px;
}

.form-status {
  color: var(--brown);
  min-height: 1.3rem;
}

.map-frame {
  min-height: 14rem;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--cream) 0 12px, #efe6da 12px 24px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0;
  color: var(--muted);
  overflow: hidden;
}

.map-frame iframe {
  width: 100%;
  min-height: 14rem;
  height: 14rem;
  border: 0;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2,
  .contact-grid,
  .about-split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-industry {
    min-height: 28rem;
    background:
      linear-gradient(180deg, rgba(247, 241, 232, 0.94) 0%, rgba(247, 241, 232, 0.72) 52%, rgba(247, 241, 232, 0.32) 100%),
      url("assets/industry-hero.jpg?v=2") center / cover no-repeat,
      var(--cream);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    inset: 4.5rem 0 auto 0;
    background: var(--paper);
    padding: 1rem 1.25rem 1.2rem;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: flex-start;
  }

  body.nav-open .nav-menu {
    display: block;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.grid-3 .card.reveal:nth-child(2),
.grid-2 .card.reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.grid-3 .card.reveal:nth-child(3),
.grid-2 .card.reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.grid-3 .card.reveal:nth-child(4) {
  transition-delay: 0.08s;
}

.grid-3 .card.reveal:nth-child(5) {
  transition-delay: 0.16s;
}

.grid-3 .card.reveal:nth-child(6) {
  transition-delay: 0.24s;
}

.grid-3 .card.reveal:nth-child(7) {
  transition-delay: 0.08s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero .wrap,
  .page-hero .wrap,
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .btn:hover,
  .card:hover .card-media img {
    transform: none;
  }
}
