/*
Theme Name: CHO Autohuolto
Theme URI: https://cho-autohuolto.fi
Author: CHO Autohuolto
Description: One-page landing theme for CHO Autohuolto, Lahti. Bilingual (FI/EN) with a language toggle, services, gallery, about, contact + quote form. Content is seeded with sensible defaults and editable under Appearance → Customize → CHO Autohuolto.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cho-autohuolto
*/

:root {
  --cho-yellow: #FFC907;
  --cho-yellow-dark: #E5AF00;
  --cho-red: #D62E1F;
  --cho-red-dark: #B82415;
  --cho-ink: #1B1710;
  --cho-ink-2: #2A2519;
  --cho-muted: #4A443A;
  --cho-cream: #FBF7EE;
  --cho-paper: #FFFFFF;
  --cho-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --cho-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cho-cream);
  color: var(--cho-ink);
  font-family: var(--cho-body);
  font-size: 16px;
  line-height: 1.5;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--cho-red); }

.cho-wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* ---------- Nav ---------- */
.cho-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cho-paper);
  border-bottom: 3px solid var(--cho-yellow);
}
.cho-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.cho-logo { display: flex; align-items: center; gap: 10px; }
.cho-logo__chip {
  background: var(--cho-yellow);
  padding: 5px 9px;
  border-radius: 6px;
  font-family: var(--cho-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  color: var(--cho-red);
  letter-spacing: .02em;
}
.cho-logo__name {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cho-nav__links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-weight: 500;
  font-size: 15px;
}
.cho-nav__right { display: flex; align-items: center; gap: 14px; }

.cho-lang {
  display: flex;
  border: 1.5px solid var(--cho-ink);
  border-radius: 999px;
  overflow: hidden;
}
.cho-lang button {
  padding: 5px 12px;
  font-family: var(--cho-body);
  font-weight: 600;
  font-size: 12px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--cho-ink);
}
.cho-lang button.is-active { background: var(--cho-ink); color: #fff; }

.cho-btn {
  display: inline-block;
  background: var(--cho-red);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.cho-btn:hover { background: var(--cho-red-dark); color: #fff; }
.cho-btn--big { padding: 15px 26px; border-radius: 10px; font-size: 17px; }
.cho-btn--outline {
  background: transparent;
  border: 2px solid var(--cho-ink);
  color: var(--cho-ink);
  padding: 13px 24px;
}
.cho-btn--outline:hover { background: var(--cho-ink); color: var(--cho-yellow); }
.cho-btn--yellow { background: var(--cho-yellow); color: var(--cho-ink); font-weight: 700; }
.cho-btn--yellow:hover { background: var(--cho-yellow-dark); color: var(--cho-ink); }

/* ---------- Hero ---------- */
.cho-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 60px;
}
.cho-tag {
  display: inline-block;
  background: var(--cho-yellow);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cho-hero h1 {
  margin: 0 0 18px;
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 64px;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.cho-hero__lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--cho-muted);
  max-width: 52ch;
}
.cho-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.cho-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-weight: 500;
  font-size: 14px;
  color: var(--cho-muted);
}
.cho-dot { display: flex; align-items: center; gap: 8px; }
.cho-dot::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--cho-yellow);
  border-radius: 2px;
  flex: none;
}
.cho-hero__media { position: relative; }
.cho-hero__media::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--cho-yellow);
  border-radius: 16px;
}
.cho-hero__media img {
  position: relative;
  width: 100%;
  height: 460px;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 16px;
  display: block;
}

/* ---------- Sections ---------- */
.cho-kicker {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cho-red);
  margin-bottom: 8px;
}
.cho-h2 {
  margin: 0 0 30px;
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  text-transform: uppercase;
}

/* ---------- Services ---------- */
.cho-services { background: var(--cho-yellow); padding: 56px 0 64px; }
.cho-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cho-service {
  background: var(--cho-paper);
  border-radius: 12px;
  padding: 24px 24px 26px;
  box-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.cho-service__num {
  font-family: var(--cho-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--cho-red);
  margin-bottom: 10px;
}
.cho-service__title {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cho-service p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--cho-muted); }

/* ---------- Gallery ---------- */
.cho-gallery { padding: 56px 0; }
.cho-gallery__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 210px 210px;
  gap: 14px;
}
.cho-gallery__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.cho-gallery__grid img:nth-child(1) { grid-row: span 2; }
.cho-gallery__grid img:nth-child(3) { grid-row: span 2; object-position: 50% 55%; }
.cho-gallery__grid img:nth-child(4) { object-position: 50% 45%; }

/* ---------- About ---------- */
.cho-about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: center;
  padding: 24px 0 64px;
}
.cho-about__img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  border: 3px solid var(--cho-yellow);
}
.cho-about p { margin: 0 0 20px; font-size: 17px; line-height: 1.6; color: var(--cho-muted); }
.cho-checks { display: flex; flex-direction: column; gap: 10px; font-weight: 500; font-size: 16px; }
.cho-checks div { display: flex; align-items: center; gap: 10px; }
.cho-checks div::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--cho-red);
  border-radius: 2px;
  flex: none;
}

/* ---------- Contact ---------- */
.cho-contact { background: var(--cho-paper); border-top: 3px solid var(--cho-yellow); padding: 56px 0 64px; }
.cho-contact__grid {
  display: grid;
  grid-template-columns: 300px 1fr 420px;
  gap: 28px;
  align-items: stretch;
}
.cho-infocards { display: flex; flex-direction: column; gap: 16px; }
.cho-infocard { background: var(--cho-cream); border-radius: 12px; padding: 20px; }
.cho-infocard__label {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cho-muted);
  margin-bottom: 6px;
}
.cho-infocard__value { font-weight: 600; font-size: 18px; line-height: 1.35; }
.cho-infocard__phone {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--cho-red);
}
.cho-hours-row { display: flex; justify-content: space-between; font-weight: 500; font-size: 16px; }

.cho-map { border-radius: 12px; overflow: hidden; min-height: 320px; background: #EAE5D6; }
.cho-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- Form ---------- */
.cho-form { background: var(--cho-ink); border-radius: 12px; padding: 26px; color: #fff; }
.cho-form__title {
  font-family: var(--cho-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cho-form__note { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #C9C2B4; }
.cho-form__fields { display: flex; flex-direction: column; gap: 12px; }
.cho-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cho-form label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #C9C2B4;
  margin-bottom: 5px;
}
.cho-form input[type="text"],
.cho-form input[type="tel"],
.cho-form input[type="email"],
.cho-form textarea {
  width: 100%;
  background: var(--cho-ink-2);
  border: 1px solid var(--cho-muted);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--cho-body);
  font-size: 15px;
}
.cho-form textarea { resize: vertical; }
.cho-form input:focus, .cho-form textarea:focus { outline: 2px solid var(--cho-yellow); outline-offset: 0; }
.cho-form .cho-btn--yellow { width: 100%; padding: 13px; border-radius: 8px; font-size: 16px; }
.cho-form__success {
  background: var(--cho-yellow);
  color: var(--cho-ink);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 14px;
}
.cho-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- WhatsApp draft button ---------- */
.cho-wa { margin-top: 2px; }
.cho-wa.is-visible { animation: cho-wa-in .25s ease-out; }
.cho-wa__hint { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: #C9C2B4; }
.cho-wa__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 15px 26px;
  border-radius: 10px;
  text-align: center;
}
.cho-wa__btn:hover { background: #1EBE5D; color: #fff; }
.cho-wa__icon { width: 24px; height: 24px; flex: none; }
.cho-form .cho-btn--demoted {
  background: transparent;
  border: 1px solid var(--cho-muted);
  color: #C9C2B4;
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
}
.cho-form .cho-btn--demoted:hover { background: var(--cho-ink-2); color: #fff; }
@keyframes cho-wa-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.cho-footer { background: var(--cho-ink); color: #C9C2B4; }
.cho-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  font-size: 14px;
}
.cho-footer .cho-logo__chip { font-size: 13px; padding: 3px 6px; border-radius: 4px; }
.cho-footer .cho-logo__name { color: #fff; font-size: 13px; }
.cho-footer__site { margin-left: auto; }
.cho-footer a:hover { color: var(--cho-yellow); }

/* ---------- Language toggle content ---------- */
[data-lang] { }
html[data-cho-lang="fi"] [data-lang="en"] { display: none !important; }
html[data-cho-lang="en"] [data-lang="fi"] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cho-hero { grid-template-columns: 1fr; }
  .cho-hero__media img { height: 380px; }
  .cho-services__grid { grid-template-columns: 1fr 1fr; }
  .cho-contact__grid { grid-template-columns: 1fr 1fr; }
  .cho-contact__grid .cho-form { grid-column: span 2; }
  .cho-about { grid-template-columns: 1fr; }
  .cho-nav__links { display: none; }
}
@media (max-width: 640px) {
  .cho-wrap { padding: 0 20px; }
  .cho-nav__inner { padding: 12px 20px; }
  .cho-hero h1 { font-size: 42px; }
  .cho-services__grid { grid-template-columns: 1fr; }
  .cho-gallery__grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .cho-gallery__grid img { height: 160px; }
  .cho-gallery__grid img:nth-child(1), .cho-gallery__grid img:nth-child(3) { grid-row: auto; }
  .cho-contact__grid { grid-template-columns: 1fr; }
  .cho-contact__grid .cho-form { grid-column: auto; }
  .cho-form__row { grid-template-columns: 1fr; }
  .cho-footer__inner { padding: 20px; }
  .cho-footer__site { margin-left: 0; }
}
