/* ==========================================================================
   iCAUR Pakistan — layout.css
   Site header, off-canvas menu, footer and shared components
   (buttons, hero, feature panels, sliders, reveal headings, forms).
   ========================================================================== */

/* ---------- Site header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px var(--gutter);
  background: transparent;
  transition: background-color .35s ease, backdrop-filter .35s ease;
}
.site-header:hover,
.header-scrolled .site-header {
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  justify-self: start;
  display: flex;
  align-items: center;
  width: 24px;
  height: 48px;
  color: var(--white);
}
.menu-toggle svg { width: 24px; height: 24px; overflow: visible; }
.menu-toggle path { transition: transform .3s var(--ease); }
.menu-toggle:hover .menu-toggle__top { transform: translateX(5px); }
.menu-toggle:hover .menu-toggle__bottom { transform: translateX(-5px); }

.site-logo { justify-self: center; display: block; }
.site-logo img { width: 160px; min-width: 100px; max-width: 160px; }

.header-cta {text-decoration:none;
  justify-self: end;
  padding: 12px 32px;
  background: var(--gold);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--fw-bold);
  color: var(--white);
  transition: background-color .3s, color .3s;
}
.header-cta:hover { background: var(--white); color: var(--gold); }

@media (max-width: 767px) {
  .site-header { padding: 12px 16px; }
  .site-logo img { width: 110px; }
  .header-cta { font-size: 11px; line-height: 16px; padding: 8px; }
}

/* ---------- Off-canvas menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}
.menu-open .menu-overlay { opacity: 1; visibility: visible; }

.menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 210;
  width: clamp(450px, 30vw, 550px);
  padding: 220px 64px 40px;
  background: rgba(20, 20, 20, .75);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateX(-100%);
  transition: transform .5s var(--ease);
  overflow-y: auto;
}
.menu-open .menu-panel { transform: translateX(0); }

.menu-close {
  position: absolute;
  top: 82px;
  left: 62px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: transform .3s ease;
}
.menu-close:hover { transform: rotate(90deg); }

.menu-back svg { transform: rotate(180deg); }
.menu-back {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 48px auto;
  color: var(--gold);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.main-menu,
.sub-menu { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.main-menu li + li,
.sub-menu li + li { margin-top: 48px; }

.main-menu a,
.main-menu button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #b9b9b9;
  transition: color .3s;
}
.main-menu a:hover,
.main-menu button:hover { color: var(--gold); }
.submenu-icon { transform: rotate(-90deg); }

.sub-menu { display: none; }
.main-menu.is-sub > li { display: none; }
.main-menu.is-sub > li.is-active { display: block; }
.main-menu.is-sub > li.is-active > button { display: none; }
.main-menu.is-sub > li.is-active > .sub-menu { display: flex; }

/* stagger-in animation for visible items */
.menu-item-anim { opacity: 0; transform: translateX(-120%); }
.menu-item-anim.is-in {
  opacity: 1;
  transform: none;
  transition: transform .8s var(--ease), opacity .8s ease;
  transition-delay: calc(var(--i, 0) * 160ms);
}

@media (max-width: 767px) {
  .menu-panel { width: 100%; padding: 72px 24px 32px; }
  .menu-close { top: 20px; left: 20px; }
  .main-menu li + li,
  .sub-menu li + li { margin-top: 24px; }
  .main-menu a, .main-menu button { font-size: 16px; line-height: 24px; }
  .menu-back { margin-bottom: 24px; }
}

/* ---------- Site footer ---------- */
.site-footer {
  background: var(--footer-bg);
  padding: 80px var(--gutter);
  color: rgba(255, 255, 255, .7);
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-logo img { display: block; width: 170px; }
.footer-heading {
  font-size: 20px;
  line-height: 21px;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  color: #e5e5e5;
}
.footer-heading a { transition: color .3s;text-decoration: none;color:#fff; }
.footer-heading a:hover { color: var(--gold); }
.footer-links { margin-top: 20px;padding-left:0px; }
.footer-links li + li { margin-top: 12px; }
.footer-links a,
.legal-links a {text-decoration: none;
  font-size: 14px;
  line-height: 22px;
  display: inline-block;
  color: rgba(255, 255, 255, .7);
  transition: color .3s;
}
.footer-links a:hover,
.legal-links a:hover { color: var(--gold); }

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
}
.social-links { display: flex; gap: 14px; }
.social-links a { position: relative; display: block; width: 20px; height: 20px; color: #b2b2b2; transition: color .3s; }
/* Larger invisible hit area for touch (the icons themselves stay 18-20px) */
.social-links a::after { content: ""; position: absolute; inset: -10px -7px; }
.social-links a:hover { color: var(--gold); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; }
.legal-links a { line-height: 21px; }
.legal-links { display: flex; justify-content: flex-end; gap: 24px; }

@media (max-width: 767px) {
  .site-footer { padding: 48px 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; }
  .footer-top > * { padding-bottom: 20px; }
  .footer-logo { padding-bottom: 16px; }
  .footer-logo img { width: 100px; margin: 3px 0; }
  .footer-bottom { grid-template-columns: 1fr; gap: 16px; }
  .legal-links { order: -1; justify-content: flex-start; flex-wrap: wrap; gap: 16px; }
  .social-links a, .social-links svg { width: 18px; height: 18px; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 32px;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  font-weight: var(--fw-medium);
  transition: background-color .3s, color .3s;
}
.btn:hover { background: var(--gold); color: var(--white); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

.btn--outline {
  width: 150px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 16px;
}

.link-more {
  display: inline-block;
  font-size: 18px;
  line-height: 24px;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  color: var(--gold);
  transition: color .3s;
}
.link-more:hover { color: var(--white); }

/* ---------- Full-bleed background section (hero / feature) ---------- */
.bg-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 720px;
  padding: 0 var(--gutter) 100px;
  color: var(--white);
  background: #000 center / cover no-repeat;
  overflow: hidden;
}
.bg-section--center { justify-content: center; padding-bottom: 0; }
.bg-section--plain { min-height: 900px; }
@media (max-width: 767px) {
  .bg-section { min-height: 450px; padding: 0 16px 16px; }
  .bg-section--center { padding-bottom: 0; }
}

/* ---------- Reveal heading (word by word) ---------- */
.reveal-title {
  max-width: var(--title-width, none);
  font-size: 36px;
  line-height: 44px;
  font-weight: var(--fw-bold);
  text-transform: capitalize;
  color: var(--white);
}
.reveal-title--dark { color: var(--black); }
.reveal-title .word {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity .6s ease, filter .6s ease, transform .6s ease;
  transition-delay: calc(.05s + var(--i, 0) * .1s);
}
.reveal-title.is-visible .word { opacity: 1; filter: none; transform: none; }
.feature-text {
  margin-top: 24px;
  font-size: 20px;
  line-height: 26px;
}
@media (max-width: 767px) {
  .reveal-title { font-size: 20px; line-height: 28px; max-width: none; }
  .feature-text { margin-top: 8px; font-size: 16px; line-height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-title .word { opacity: 1; filter: none; transform: none; transition: none; }
}

/* ---------- Slider (hero + gallery) ---------- */
.slider { --per-view: 1; --gap: 0px; position: relative; overflow: hidden; }
.slider__track { display: flex; gap: var(--gap); height: 100%; transition: transform .5s ease; will-change: transform; }
.slider__slide { flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view)); min-width: 0; height: 100%; }
.slider__pagination {
  position: absolute;
  z-index: 5;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--gold-soft);
  font-size: 16px;
  line-height: 16px;
}
.slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: var(--white);
  opacity: 0;
  transition: opacity .3s, background-color .3s;
}
.slider:hover .slider__arrow { opacity: 1; }
.slider__arrow:hover { background: var(--gold); }
.slider__arrow--prev { left: 20px; }
.slider__arrow--next { right: 20px; }
.slider__arrow svg { width: 18px; height: 18px; }
@media (hover: none) { .slider__arrow { display: none; } }

/* ---------- Expanding panels (home + about values) ---------- */
.panels { display: flex; gap: 8px; height: 900px; padding: 0 var(--gutter) var(--section-y); box-sizing: content-box; }
.panel {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 56px;
  text-align: center;
  color: var(--white);
  background: #000 center / cover no-repeat;
  overflow: hidden;
  transition: flex-grow .6s var(--ease);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .1);
  transition: background-color .5s ease;
}
.panel > * { position: relative; }
.panel__content { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.panel:hover { flex-grow: 1.3; }
.panel:hover::before { background: rgba(0, 0, 0, .7); }
.panel:hover .panel__content { opacity: 1; transform: none; }
.panel__title { font-size: 48px; line-height: 56px; font-weight: var(--fw-bold); margin-bottom: 16px; }
.panel .link-more:hover { color: var(--white); }
@media (max-width: 1199px) {
  .panel { flex: 0 0 calc(50% - 4px); }
  .panel:hover { flex-grow: 0; }
}
@media (max-width: 767px) {
  .panels { flex-direction: column; gap: 15px; height: auto; padding: 0 16px 48px; }
  .panel { flex: none; height: 450px; padding: 25px 16px; }
  .panel__title { font-size: 32px; line-height: 40px; margin-bottom: 8px; }
  .panel .link-more { font-size: 16px; }
}

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field > .form__label { margin-bottom: 0; }
.form__field--full { grid-column: 1 / -1; }
.form__label { font-size: 16px; line-height: 24px; font-weight: var(--fw-bold); color: var(--black); }
.form__label .req { color: #d00; margin-left: 3px; }
.form__control {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--field-bg);
  font-size: 15px;
  color: var(--black);
  outline: none;
  transition: border-color .3s;
}
.form__control::placeholder { color: #a3a3a3; }
.form__control:focus { border-color: var(--gold); }
select.form__control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 11 11'%3E%3Cpath d='M0 3h11L5.5 9z' fill='%23000'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-repeat: no-repeat;
  background-position: right 16px center;
}
textarea.form__control { height: 228px; padding: 14px 16px; resize: none; }
.form__counter { align-self: flex-start; margin-top: -4px; font-size: 12px; line-height: 24px; color: #888; }
.form__check { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 16px; line-height: 24px; color: var(--black); }
.form__check input { flex: none; width: 23px; height: 23px; margin: 0; accent-color: var(--gold); }
.form__check a { color: var(--gold); text-decoration: underline; }
.form__error:empty { display: none; }
.form__error--submit { grid-column: 1 / -1; text-align: center; }
.form__error { font-size: 13px; line-height: 18px; color: #d33; }
.form__field.is-invalid .form__control { border-color: #d33; }
.form__actions { grid-column: 1 / -1; display: flex; justify-content: center; }
.form__success {
  grid-column: 1 / -1;
  position: relative;
  padding: 24px 28px 24px 36px;
  background: var(--white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
  color: var(--ink);
}
.form__success::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }
.form__success strong { display: block; font-size: 20px; margin-bottom: 6px; color: var(--gold); }
@media (max-width: 767px) {
  .form { grid-template-columns: 1fr; gap: 24px; }
  .form__check { align-items: flex-start; }
  .form__check input { width: 13px; height: 13px; margin-top: 5px; }
  .form__actions { justify-content: flex-start; margin-top: 24px; }
}

/* ---------- Touch hit areas ----------
   Invisible ::after boxes enlarge small links/buttons to ~40px tap targets
   on touch screens without changing how anything looks. */
@media (max-width: 767px) {
  .menu-toggle, .site-logo, .header-cta, .footer-heading a,
  .footer-links a, .legal-links a, .link-more, .dealer-actions a,
  .dealer-table td > a { position: relative; }
  .menu-toggle::after, .site-logo::after, .header-cta::after, .footer-heading a::after,
  .footer-links a::after, .legal-links a::after, .link-more::after, .dealer-actions a::after,
  .dealer-table td > a::after { content: ""; position: absolute; }
  .menu-toggle::after { inset: 0 -8px; }
  .site-logo::after { inset: -11px 0; }
  .header-cta::after { inset: -4px 0; }
  .footer-heading a::after { inset: -10px 0; }
  .footer-links a::after { inset: -9px 0; }
  .legal-links a::after { inset: -10px -2px; }
  .link-more::after { inset: -8px 0; }
  .dealer-table td > a::after { inset: -11px 0; }
  .dealer-table .dealer-actions a::after { inset: -5px -2px; }
  .social-links a::after { inset: -11px -7px; }
  .archive-item__title a { position: relative; }
  .archive-item__title a::after { content: ""; position: absolute; inset: -2px 0; }
}
