/* ==========================================================================
   Jointing Tech — Package Substations landing page
   Built from Figma node 31:5 (1440 × 4986)
   ========================================================================== */

:root {
  --orange: #ee7d00;
  --orange-tint: rgba(238, 125, 0, 0.08);
  --orange-wash: rgba(238, 125, 0, 0.14);
  --black: #000;
  --near-black: #111;
  --ink: #333;
  --muted: #666;
  --grey: #f5f5f5;
  --line: #e2e8f0;
  --white: #fff;

  --container: 1200px;
  --gutter: 120px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Outfit", "Inter", -apple-system, sans-serif;
}

/* ── reset ────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ── layout primitives ────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 60px; }
.section--white { background: var(--white); }
.section--grey  { background: var(--grey); }
.section--ruled { border-top: 1px solid var(--line); }

.stack-56 { display: flex; flex-direction: column; gap: 56px; }
.stack-48 { display: flex; flex-direction: column; gap: 48px; }

.icon { flex: none; }
.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--20 { width: 20px; height: 20px; }
.icon--32 { width: 32px; height: 32px; }

.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1.2;
  color: var(--black);
}

.section__head { display: flex; flex-direction: column; gap: 16px; }

.section__lede {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
}
.section__lede--full { max-width: none; }

/* ── buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: #d97100; }
.btn--primary:active { transform: translateY(1px); }
.btn--block { width: 100%; }

/* ── black header bar ─────────────────────────────────────────── */

.header { background: var(--black); }

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

.header__logo img { width: 200px; height: 62px; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--orange); }

.header__icons { display: flex; align-items: center; gap: 20px; }

.icon-btn {
  display: inline-flex;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.9;
}
.icon-btn:hover { opacity: 1; }

/* ── orange nav bar ───────────────────────────────────────────── */

.nav { background: var(--orange); }

.nav__inner {
  display: flex;
  align-items: stretch;
  gap: 32px;
  min-height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__inner::-webkit-scrollbar { display: none; }

.nav__item {
  display: inline-flex;
  align-items: center;
  padding-block: 8px;
  border-bottom: 2px solid transparent;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav__item:hover { border-bottom-color: rgba(255, 255, 255, 0.5); }
.nav__item.is-active { border-bottom-color: var(--white); }

/* ── hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); }

.hero__inner { padding-block: 76px; }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 720px;
}

.eyebrow {
  padding: 6px 12px;
  border: 1px solid var(--orange);
  border-radius: 2px;
  background: var(--orange-wash);
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1.15;
  color: var(--white);
}

.hero__lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--white);
  opacity: 0.9;
}

.hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 8px;
}

.link-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
}
.link-phone:hover { color: var(--orange); }

/* ── trust strip ──────────────────────────────────────────────── */

.trust { background: var(--near-black); }

.trust__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  min-height: 72px;
  padding-block: 16px;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
}

/* ── what we deliver ──────────────────────────────────────────── */

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

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--grey);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--black);
}

.card__body { font-size: 15px; line-height: 1.5; color: var(--ink); }

.callout {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--grey);
  border: 4px solid var(--orange);
}
.callout p { font-size: 16px; font-weight: 500; color: var(--ink); }
.callout strong { font-weight: 700; }

/* ── why choose us ────────────────────────────────────────────── */

.reasons { display: flex; flex-direction: column; gap: 24px; }

.reason {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.reason__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--orange-tint);
}

.reason__title {
  margin-bottom: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--black);
}

.reason__body { font-size: 15px; line-height: 1.5; color: var(--ink); }

/* ── project gallery ──────────────────────────────────────────── */

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

.shot { display: flex; flex-direction: column; gap: 16px; }

.shot img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 4px;
}

.shot figcaption {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
}

/* ── enquiry ──────────────────────────────────────────────────── */

.enquiry {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.enquiry__intro {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.assurances { display: flex; flex-direction: column; gap: 20px; }

.assurances li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.panel {
  flex: none;
  width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px;
  background: var(--grey);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 12px rgba(0, 0, 0, 0.05);
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.req { color: var(--orange); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  padding: 16px;
  background: var(--grey);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field input { height: 48px; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.4; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-tint);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c0392b; }

.field__error { font-size: 13px; color: #c0392b; }

.panel__foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.panel__terms {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.panel__success {
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--orange-tint);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ── faq ──────────────────────────────────────────────────────── */

.faq { display: flex; flex-direction: column; gap: 24px; }

.faq__item {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.faq__item h3 { margin: 0; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--black);
}

.faq__sign {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  background: var(--orange);
  transition: transform 0.2s ease;
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0deg); }

.faq__a {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.faq__a[hidden] { display: none; }

/* ── partner logos ────────────────────────────────────────────── */

.partners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.partners__label {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.partners__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.partners__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 64px;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}

/* ── footer ───────────────────────────────────────────────────── */

.footer {
  background: var(--black);
  color: var(--white);
  padding-top: 80px;
  padding-bottom: 40px;
}

.footer__branches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.branch h3 {
  margin-bottom: 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

.branch__address {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.7;
}

.branch__tel { font-size: 14px; font-weight: 700; }
.branch__tel a { color: var(--orange); text-decoration: none; }
.branch__tel a:hover { text-decoration: underline; }

.footer__rule {
  margin-block: 56px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.footer__mail { display: flex; align-items: center; gap: 8px; }
.footer__mail span { opacity: 0.6; }
.footer__mail a { font-weight: 700; text-decoration: underline; }

.footer__parent { font-weight: 600; opacity: 0.6; }

/* ── responsive ───────────────────────────────────────────────── */

@media (max-width: 1200px) {
  :root { --gutter: 48px; }
}

@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .enquiry { flex-direction: column; gap: 48px; }
  .panel { width: 100%; }
  .footer__branches { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --gutter: 24px; }

  .header__inner { flex-wrap: wrap; gap: 16px; padding-block: 20px; min-height: 0; }
  .header__logo img { width: 160px; height: auto; }

  .hero__title { font-size: 34px; }
  .hero__lede { font-size: 16px; }
  .hero__inner { padding-block: 56px; }

  .h2 { font-size: 28px; }
  .section { padding-block: 48px; }
  .stack-56 { gap: 40px; }

  .gallery { grid-template-columns: 1fr; }
  .shot img { height: 220px; }

  .partners__row { justify-content: center; }
  .panel { padding: 28px; }
  .faq__item { padding: 24px; }
  .faq__q { font-size: 18px; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .footer__branches { grid-template-columns: 1fr; }
  .trust__inner { flex-direction: column; align-items: flex-start; }
  .hero__cta { align-items: flex-start; flex-direction: column; }
  .btn { width: 100%; }
  .footer { padding-top: 56px; }
  .footer__rule { margin-block: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
