:root {
  --bg: #f4f6f8;
  --bg-soft: #ffffff;
  --ink: #16263e;
  --muted: #677487;
  --line: rgba(22, 38, 62, 0.12);
  --line-strong: rgba(22, 38, 62, 0.2);
  --accent: #1f4b7a;
  --accent-dark: #153250;
  --accent-soft: rgba(31, 75, 122, 0.08);
  --gold-soft: rgba(188, 152, 92, 0.14);
  --success-soft: rgba(36, 92, 63, 0.1);
  --shadow: 0 18px 45px rgba(15, 30, 55, 0.08);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 75, 122, 0.08), transparent 26%),
    radial-gradient(circle at right top, rgba(188, 152, 92, 0.08), transparent 18%),
    linear-gradient(180deg, #f9fbfc 0%, #eef2f6 100%);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.topbar-logo {
  width: 78px;
  height: auto;
  display: block;
  object-fit: contain;
}

.topbar-copy {
  display: grid;
  gap: 2px;
}

.topbar-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-tag {
  color: var(--muted);
  font-size: 0.84rem;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar-meta a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.panel {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(31, 75, 122, 0.08), transparent 70%);
  pointer-events: none;
}

.hero-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 14px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(31, 75, 122, 0.04), rgba(255, 255, 255, 0.98)),
    #fff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-heading {
  display: grid;
  gap: 8px;
}

.hero-intro {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  color: var(--ink);
}

h2 {
  font-size: clamp(2rem, 2vw, 2.4rem);
  line-height: 0.98;
}

.hero-title {
  display: grid;
  gap: 0;
  font-size: clamp(3.2rem, 5.2vw, 5.3rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.hero-title span {
  display: block;
}

.hero-text {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-link {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.hero-link.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 75, 122, 0.22);
}

.hero-link.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.hero-link:hover {
  transform: translateY(-1px);
}

.hero-card-title {
  font-size: clamp(1.7rem, 2vw, 2.2rem);
}

.hero-card-text {
  margin: -2px 0 4px;
  color: var(--muted);
  line-height: 1.65;
}

.hero-stat {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.92);
}

.hero-stat-label,
.metric-label,
.detail-list dt,
.field span,
.helper-text,
.notice,
.metric-card small {
  color: var(--muted);
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
}


.hero-card--compact {
  margin-top: 22px;
  padding: 18px 22px;
  gap: 10px;
}

.hero-card--compact .eyebrow {
  margin-bottom: 4px;
}

.hero-card--compact .hero-card-title {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.08;
}

.hero-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-card--compact .hero-stat {
  padding: 12px 14px;
  border-radius: 14px;
}

.vehicle-photo-card {
  margin: -4px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}

.vehicle-photo {
  width: 100%;
  display: block;
  max-height: 360px;
  object-fit: cover;
  background: #edf1f5;
}

.vehicle-photo-caption {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 22px;
}

.form-panel {
  grid-row: span 2;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.panel-header {
  margin-bottom: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compact-grid,
.result-grid,
.detail-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(31, 75, 122, 0.42);
  box-shadow: 0 0 0 4px rgba(31, 75, 122, 0.1);
  transform: translateY(-1px);
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 2px;
  padding: 0;
}

.helper-text {
  margin-top: 16px;
  line-height: 1.6;
}

.result-grid,
.detail-list {
  display: grid;
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.metric-card.accent {
  background: linear-gradient(180deg, rgba(31, 75, 122, 0.08), rgba(255, 255, 255, 1));
  border-color: rgba(31, 75, 122, 0.18);
}

.metric-card strong {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.detail-list {
  margin: 22px 0 0;
  padding: 0;
}

.detail-list div {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
}

.detail-list dt {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--success-soft);
  border: 1px solid rgba(36, 92, 63, 0.16);
  line-height: 1.55;
}

.transport-tools {
  margin-top: 18px;
}

.action-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.calculate-button,
.route-button {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(22, 38, 62, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.calculate-button {
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(31, 75, 122, 0.2);
}

.calculate-button:hover,
.route-button:hover {
  transform: translateY(-1px);
}

.calculate-button:disabled,
.route-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.transport-hint {
  margin: 12px 0 0;
}

@media (max-width: 1080px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .form-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .topbar,
  .hero-copy,
  .hero-card,
  .panel {
    padding: 18px;
  }

  .topbar {
    border-radius: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    gap: 10px;
  }

  .topbar-logo {
    width: 64px;
  }

  .hero-title {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .hero-text {
    font-size: 0.96rem;
  }

  .hero-card-meta,
  .form-grid,
  .compact-grid,
  .result-grid,
  .detail-list {
    grid-template-columns: 1fr;
  }
}
