/* =========================================================
   کیا صنعت خودرو فرجام — farjamkhodro.com
   ========================================================= */

/* ---------- Font: Pinar (self-hosted, assets/fonts) ---------- */

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinar";
  src: url("../fonts/Pinar-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #d71920;
  --red-dark: #a8111a;
  --red-soft: #fdf1f1;
  --red-line: #f6d4d5;
  --ink: #16181d;
  --text: #3d4048;
  --muted: #7a7e88;
  --line: #ececef;
  --bg: #ffffff;
  --bg-alt: #fafafb;

  --header-h: 76px;
  --footer-h: 40px;
  --radius: 20px;
  --shadow: 0 20px 50px -20px rgba(22, 24, 29, 0.25);
  --container: 1240px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Pinar", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;

  /* Single-screen layout: header + main + footer fill the viewport.
     If the screen is too short for the content, the page scrolls instead of clipping. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ---------- Header ---------- */

.site-header {
  flex-shrink: 0;
  height: var(--header-h);
  background: var(--bg);
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  position: relative;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}

.nav a:hover { color: var(--red); background: var(--red-soft); }

.nav a[aria-current="page"] { color: var(--red); }

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 16px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

/* ---------- Main ---------- */

.site-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: 24px;
}

/* soft red glow in the background */
.site-main::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  left: -260px;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(215, 25, 32, .08), transparent 65%);
  pointer-events: none;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 64px;
  position: relative;
}

/* ---------- Shared text styles ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.title {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 900;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 18px;
}

.title .accent { color: var(--red); }

.lead {
  font-size: 16.5px;
  color: var(--text);
  max-width: 540px;
}

.text p + p { margin-top: 12px; }

.text p {
  font-size: 15.5px;
  text-align: justify;
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding-inline: 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform .2s, background-color .2s, color .2s, box-shadow .2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(215, 25, 32, .6);
}

.btn-primary:hover { background: var(--red-dark); }

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn svg { width: 18px; height: 18px; }

/* ---------- Home: feature list ---------- */

.features {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.features svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--red);
}

/* ---------- Home: video frame ---------- */

.media {
  position: relative;
  padding: 18px 0 18px 18px;
}

/* red slanted block behind the video */
.media::before {
  content: "";
  position: absolute;
  inset: 0 40px 0 0;
  background: var(--red);
  border-radius: var(--radius);
  transform: skewX(-6deg);
  transform-origin: bottom;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #1d1f24 0%, #2b1316 100%);
  box-shadow: var(--shadow);
  max-height: calc(100dvh - var(--header-h) - var(--footer-h) - 120px);
  width: 100%;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- About: value cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.card:hover {
  border-color: var(--red-line);
  box-shadow: 0 16px 36px -22px rgba(215, 25, 32, .45);
  transform: translateY(-3px);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}

.card--red {
  background: var(--red);
  border-color: var(--red);
}

.card--red h3,
.card--red p { color: #fff; }

.card--red p { opacity: .9; }

.card--red .card-icon {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

/* ---------- About: CEO ---------- */

.ceo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--red);
}

.ceo .card-icon {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 50%;
}

.ceo .card-icon svg { width: 22px; height: 22px; }

.ceo strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.6;
}

.ceo small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- About: registration facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 0;
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-alt);
  overflow: hidden;
}

.facts div {
  padding: 10px 18px;
  border-inline-start: 1px solid var(--line);
}

.facts div:first-child { border-inline-start: 0; }

.facts dt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.facts dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.7;
}

/* ---------- Contact ---------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contact-list .wide { grid-column: 1 / -1; }

.contact-list .card-icon {
  width: 42px;
  height: 42px;
}

.contact-list .card-icon svg { width: 21px; height: 21px; }

.contact-item {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s;
}

a.contact-item:hover { border-color: var(--red); }

.contact-item .card-icon {
  margin: 0;
  flex-shrink: 0;
}

.contact-item small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-item strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.7;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: calc(100dvh - var(--header-h) - var(--footer-h) - 170px);
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.map-actions .btn {
  flex: 1;
  justify-content: center;
  height: 46px;
}

/* ---------- Footer ---------- */

.site-footer {
  flex-shrink: 0;
  height: var(--footer-h);
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
  color: var(--muted);
}

.site-footer .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer a:hover { color: var(--red); }

/* ---------- Entrance animation ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal .7s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .reveal-2 { animation-delay: .12s; }

  @keyframes reveal {
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Responsive ----------
   On small or short screens a single fixed screen can't hold the content,
   so the page falls back to normal scrolling. */

@media (max-width: 1100px) {
  .split { gap: 40px; }
  .text p { font-size: 15px; }
  .card { padding: 18px; }
}

/* short laptop screens (e.g. 1366×768 minus browser toolbars) */
@media (min-width: 901px) and (max-height: 720px) {
  .site-main { padding-block: 12px; }
  .eyebrow { margin-bottom: 8px; }
  .title { font-size: clamp(28px, 2.8vw, 38px); margin-bottom: 10px; }
  .contact-list { margin-top: 16px; }
  .facts, .ceo { margin-top: 16px; }
  .actions { margin-top: 22px; }
}

@media (max-width: 900px), (max-height: 600px) {
  .site-main { padding-block: 40px; }
  .video-frame,
  .map-frame { max-height: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 16px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .media { padding: 12px 0 12px 12px; }
  .media::before { inset-inline-end: 24px; }
  .brand img { width: 38px; height: 38px; }
  .brand-name { font-size: 15px; }
  .brand-tag { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 14px; }
}

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { border-inline-start: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .actions .btn { flex: 1; justify-content: center; }
  .site-footer .domain { display: none; }
  .site-footer .container { justify-content: center; }
}

@media (max-width: 420px) {
  .site-header .container { gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 13.5px; line-height: 1.6; }
  .nav a { padding: 6px 8px; font-size: 13.5px; }
  .nav a[aria-current="page"]::after { inset-inline: 8px; }
}
