/* Delta Pricing AB -- Corporate Website
   Design system derived from Aposmart Brand Portal */

/* ---- Reset ---- */

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

/* ---- Custom Properties ---- */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: hsl(226 40% 97%);
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-border: hsl(226 30% 92%);

  --color-brand-blue: hsl(226 99% 33%);
  --color-brand-blue-overlay: hsl(226 99% 33% / 82%);
  --color-brand-blue-hover: hsl(226 90% 26%);

  --color-footer-bg: hsl(226 85% 18%);
  --color-footer-text: hsl(226 30% 92%);
  --color-footer-muted: hsl(226 20% 65%);

  --font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --size-heading-hero: clamp(2rem, 5vw, 3rem);
  --size-heading-section: clamp(1.75rem, 3vw, 2.25rem);
  --size-heading-card: 1.125rem;
  --size-body: 1rem;
  --size-small: 0.875rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --width-content: 1200px;
  --radius-card: 16px;
  --radius-button: 8px;
  --shadow-card:
    0 1px 2px hsl(226 60% 30% / 8%),
    0 4px 12px hsl(226 60% 30% / 10%);
  --shadow-card-hover:
    0 2px 4px hsl(226 60% 30% / 10%),
    0 8px 24px hsl(226 60% 30% / 14%);

  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

/* ---- Base ---- */

html {
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-family);
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-brand-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---- Layout ---- */

.section {
  position: relative;
  padding: var(--space-3xl) var(--space-l);
}

.section__inner {
  position: relative;
  z-index: 1;
  max-width: var(--width-content);
  margin-inline: auto;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--alt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.07;
  pointer-events: none;
}


/* ---- Typography ---- */

.heading-section {
  font-size: var(--size-heading-section);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-m);
}

.subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: 14px 28px;
  border-radius: var(--radius-button);
  font-family: var(--font-family);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-brand-blue);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--color-brand-blue-hover);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-brand-blue);
  border: 1.5px solid var(--color-brand-blue);
}

.btn--outline:hover {
  background-color: var(--color-brand-blue);
  border-color: var(--color-brand-blue);
  color: #ffffff;
}

.btn--outline-light {
  background-color: transparent;
  color: #ffffff;
  border: 1.5px solid rgb(255 255 255 / 70%);
}

.btn--outline-light:hover {
  background-color: rgb(255 255 255 / 15%);
  color: #ffffff;
}

/* ---- Nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-brand-blue);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--width-content);
  margin-inline: auto;
  padding: var(--space-m) var(--space-l);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  text-decoration: none;
  color: #ffffff;
}

.nav__brand:hover {
  text-decoration: none;
}

.nav__logo {
  border-radius: 6px;
}

.nav__name {
  font-size: 1.125rem;
  font-weight: var(--weight-semibold);
}

.nav__menu {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.nav__link {
  color: rgb(255 255 255 / 80%);
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__link:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-s);
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 96px;
  padding-bottom: 96px;
  background-color: hsl(226 80% 14%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--width-content);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
}

.hero__content {
  flex: 1 1 52%;
  min-width: 0;
}

.hero__heading {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: var(--space-l);
  max-width: 560px;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: rgb(255 255 255 / 75%);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.hero__media {
  flex: 1 1 48%;
  min-width: 0;
}

.hero__scene {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.hero__browser {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgb(0 0 20 / 20%),
    0 24px 60px rgb(0 0 20 / 50%);
}

.hero__browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: hsl(226 15% 92%);
}

.hero__browser-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(226 10% 75%);
}

.hero__browser-screen {
  display: block;
  width: 100%;
  height: auto;
}

.hero__phone {
  position: absolute;
  bottom: -28px;
  left: -36px;
  width: 30%;
  max-width: 170px;
}

.hero__phone-wrapper {
  position: relative;
  padding: 10px 6px 14px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 20%),
    0 20px 50px rgb(0 0 20 / 55%);
}

.hero__phone-wrapper::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: rgb(0 0 0 / 18%);
  border-radius: 2px;
}

.hero__phone-wrapper::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 3px;
  background: rgb(0 0 0 / 20%);
  border-radius: 2px;
}

.hero__phone-screen {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
}

.hero .btn--primary {
  background-color: #ffffff;
  color: var(--color-brand-blue);
}

.hero .btn--primary:hover {
  background-color: rgb(255 255 255 / 90%);
}

/* ---- About ---- */

.about {
  text-align: center;
}

.about__text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
}

.about__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

.about__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: center;
}

.about__stat-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-brand-blue);
}

.about__stat-label {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Product Sections ---- */

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.product__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

.product__text .subtitle {
  margin-top: calc(-1 * var(--space-s));
}

.product__description {
  color: var(--color-text-muted);
  line-height: 1.7;
}

.product__frame {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.product__frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.product__phone {
  max-width: 300px;
  margin-inline: auto;
}

.product__phone-wrapper {
  position: relative;
  padding: 14px 10px 18px;
  background: #ffffff;
  border-radius: 36px;
  box-shadow:
    0 0 0 1px rgb(0 0 20 / 4%),
    0 24px 60px rgb(0 0 20 / 14%);
}

.product__phone-wrapper::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 6px;
  background: rgb(0 0 0 / 18%);
  border-radius: 3px;
}

.product__phone-wrapper::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 4px;
  background: rgb(0 0 0 / 20%);
  border-radius: 2px;
}

.product__phone-screen {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top;
  border-radius: 24px;
}

/* ---- Portal Section ---- */

.product--reverse .product__text {
  grid-column: 2;
  grid-row: 1;
}

.product--reverse .product__image {
  grid-column: 1;
  grid-row: 1;
}

.portal__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-m);
  margin-top: var(--space-s);
}

.portal__feature {
  padding: var(--space-l);
  background-color: var(--color-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal__feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.portal__feature-title {
  font-size: var(--size-heading-card);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-xs);
}

.portal__feature-desc {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.portal__ctas {
  display: flex;
  gap: var(--space-m);
  margin-top: var(--space-s);
}

/* ---- Contact ---- */

.contact {
  text-align: center;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-l);
  max-width: 720px;
  margin-inline: auto;
}

.contact__label {
  font-size: var(--size-small);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-s);
}

.contact__value {
  font-size: var(--size-body);
  color: var(--color-text);
  font-style: normal;
  line-height: 1.6;
}

a.contact__value:hover {
  color: var(--color-brand-blue);
}

/* ---- Footer ---- */

.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-3xl) var(--space-l) var(--space-2xl);
  border-top: 1px solid hsl(226 70% 25%);
}

.footer__inner {
  max-width: var(--width-content);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-l);
}

.footer__company {
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-xs);
}

.footer__legal {
  font-size: var(--size-small);
  color: var(--color-footer-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-l);
}

.footer__links a {
  color: var(--color-footer-muted);
  font-size: var(--size-small);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--color-footer-text);
  text-decoration: none;
}

.footer__copy {
  font-size: var(--size-small);
  color: var(--color-footer-muted);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  /* Nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--color-brand-blue);
    padding: var(--space-s) 0;
  }

  .nav__menu--open {
    display: flex;
  }

  .nav__link {
    display: block;
    padding: var(--space-m) var(--space-l);
  }

  /* Sections */
  .section {
    padding: var(--space-2xl) var(--space-l);
  }

  .footer {
    padding: var(--space-2xl) var(--space-l);
  }

  /* Hero */
  .hero {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
  }

  .hero__content {
    width: 100%;
  }

  .hero__heading {
    margin-inline: auto;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__media {
    width: 100%;
  }

  .hero__scene {
    max-width: 360px;
  }

  .hero__phone {
    width: 30%;
    max-width: 120px;
    bottom: -20px;
    left: -20px;
  }

  /* About */
  .about__stats {
    gap: var(--space-xl);
  }

  /* Product sections */
  .product {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .product--reverse .product__text,
  .product--reverse .product__image {
    grid-column: 1;
  }

  .product__image {
    order: -1;
  }

  .portal__features {
    grid-template-columns: 1fr;
  }

  .portal__ctas {
    flex-direction: column;
  }

  .portal__ctas .btn {
    text-align: center;
    justify-content: center;
  }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}
