/* --------------------------------------------------------------------------
   Basic style and layout
   -------------------------------------------------------------------------- */

:root {
  --bg: #0b1121;
  --surface: #0f1831;
  --surface-2: #152540;
  --text: #f2f6ff;
  --muted: #a9b4cf;
  --accent: #4fb8a9;
  --accent-2: #f2b138;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --max: 1200px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at top, rgba(79, 184, 169, 0.26), transparent 55%),
    linear-gradient(145deg, #090d15 0%, #08101f 60%, #050714 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 17, 33, 0.85);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.06em;
}

.brand p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
  font-size: 14px;
}

.site-nav a {
  padding: 10px 8px;
  border-radius: 999px;
  transition: background 160ms ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cta {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1121;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: 88px 0 64px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-text h2 {
  margin: 0;
  font-size: clamp(2.3rem, 3vw, 3.2rem);
  letter-spacing: -0.02em;
  max-width: 520px;
}

.hero-text p {
  margin: 20px 0 32px;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 520px;
  color: rgba(242, 246, 255, 0.82);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1121;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 246, 255, 0.9);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.hero-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Inventory
   -------------------------------------------------------------------------- */

.inventory {
  padding: 72px 0;
}

.section-header {
  margin-bottom: 44px;
  text-align: center;
}

.section-header h2 {
  margin: 0;
  font-size: 2.4rem;
}

.section-header p {
  margin: 12px auto 0;
  max-width: 560px;
  color: rgba(242, 246, 255, 0.78);
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.car-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease, border-color 160ms ease;
}

.car-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 184, 169, 0.4);
}

.car-media {
  display: block;
  border: none;
  padding: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
}

.car-media img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.car-card-content {
  padding: 18px;
}

.car-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.car-meta {
  margin: 10px 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(242, 246, 255, 0.75);
}

.car-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.car-meta span svg {
  width: 14px;
  height: 14px;
  fill: rgba(242, 246, 255, 0.75);
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 14px 0 18px;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec span {
  font-size: 0.87rem;
  color: rgba(242, 246, 255, 0.66);
}

.spec strong {
  font-weight: 600;
}

.car-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.car-price {
  font-weight: 700;
  font-size: 1.1rem;
}

.car-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(242, 246, 255, 0.9);
  cursor: pointer;
  transition: background 160ms ease;
}

.car-button:hover {
  background: rgba(79, 184, 169, 0.18);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about {
  padding: 72px 0;
  background: rgba(9, 13, 21, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.about-text h2 {
  margin: 0;
  font-size: 2.3rem;
}

.about-text ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: rgba(242, 246, 255, 0.82);
  display: grid;
  gap: 10px;
}

.about-text li {
  line-height: 1.6;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  padding: 72px 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 46px;
  align-items: start;
}

.contact-info h2 {
  margin: 0 0 12px;
  font-size: 2.1rem;
}

.contact-info p {
  margin: 0 0 24px;
  color: rgba(242, 246, 255, 0.78);
  max-width: 520px;
}

.contact-info dl {
  display: grid;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(242, 246, 255, 0.8);
}

.contact-info dt {
  font-weight: 700;
}

.contact-form {
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
}

.contact-form h3 {
  margin: 0 0 18px;
  font-size: 1.5rem;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(242, 246, 255, 0.92);
  font-size: 0.95rem;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: rgba(79, 184, 169, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 184, 169, 0.16);
}

.form-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(242, 246, 255, 0.65);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 17, 33, 0.70);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(242, 246, 255, 0.7);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: rgba(242, 246, 255, 0.7);
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: rgba(242, 246, 255, 0.95);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;

  }

  .hero-inner,
  .about-inner,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 36px;
  }
}

@media (max-width: 520px) {
  .hero-text h2 {
    font-size: 2.1rem;
  }

  .car-card {
    border-radius: 14px;
  }
}

/* --------------------------------------------------------------------------
   Bildgalleri per bil
   -------------------------------------------------------------------------- */

.gallery-modal {
  z-index: 50;
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.gallery-modal.open {
  display: flex;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.gallery-content {
  position: relative;
  width: min(920px, 100%);
  max-height: min(92vh, 580px);
  padding: 24px;
  border-radius: 20px;
  background: rgba(17, 25, 43, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 18px;
  overflow: hidden;
}

.gallery-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  color: rgba(242, 246, 255, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.gallery-close:hover {
  background: rgba(79, 184, 169, 0.18);
  transform: scale(1.05);
}

.gallery-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.gallery-header p {
  margin: 6px 0 0;
  color: rgba(242, 246, 255, 0.72);
  font-size: 0.95rem;
}

.gallery-viewer {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 12px;
  position: relative;
}

.gallery-viewer img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.gallery-nav {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(242, 246, 255, 0.8);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.gallery-nav:hover {
  background: rgba(79, 184, 169, 0.18);
  transform: scale(1.05);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.thumb {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  overflow: hidden;
  width: 86px;
  height: 54px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.active {
  border-color: rgba(79, 184, 169, 0.8);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .gallery-viewer {
    grid-template-columns: 44px 1fr 44px;
  }

  .gallery-viewer img {
    height: 260px;
  }

  .thumb {
    width: 72px;
    height: 48px;
  }
}
