/* --- Self-hosted Ubuntu (latin subset, woff2) --- */
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/ubuntu-300.woff2") format("woff2");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ubuntu-400.woff2") format("woff2");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ubuntu-500.woff2") format("woff2");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/ubuntu-700.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-dark: #1e1e1e;
  --color-lime: #b9f43f;
  --color-white: #ffffff;
  --color-success: #1e7a3a;
  --color-error: #c0392b;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--color-lime);
  color: var(--color-dark);
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Sections --- */
.section {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section--lime {
  background-color: var(--color-lime);
  padding: 2rem;
}

.section--white {
  background-color: var(--color-white);
}

.section__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(82vw, 820px);
  max-height: 50vh;
}

/* Fylga has a much wider aspect ratio — keep it more compact */
#section-fylga-logo .section__logo {
  max-width: min(52vw, 480px);
  max-height: 28vh;
}

#section-fylse-logo .section__logo {
  max-width: min(48vw, 440px);
  max-height: 30vh;
}

/* Dual-logo section (Fylse Pro + Fylse Pro+ side by side) */
.section--dual {
  gap: clamp(4rem, 8vw, 8rem);
  flex-wrap: wrap;
}

.section__logo--dual {
  max-width: min(26vw, 260px);
  max-height: 30vh;
}

.section__separator {
  display: block;
  width: 1px;
  height: clamp(80px, 12vh, 140px);
  background-color: var(--color-dark);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .section--dual {
    flex-direction: column;
    gap: 2rem;
  }

  /* Higher specificity than .section__logo so the 480px rule below
     does NOT override these dual sizes */
  .section--dual .section__logo--dual {
    max-width: min(52vw, 230px);
    max-height: 18vh;
  }

  .section__separator {
    width: clamp(60px, 30vw, 110px);
    height: 1px;
  }
}

/* --- Text section layout (label + huge heading + 2-col footer) --- */
.section--text {
  align-items: stretch;
  justify-content: stretch;
}

.text-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 5vw, 5rem);
  row-gap: 1.5rem;
  overflow: hidden;
  position: relative;
}

.text-layout__image {
  display: block;
  width: clamp(320px, 36vw, 480px);
  height: clamp(400px, 66vh, 640px);
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  user-select: none;
}

.text-layout__image--left {
  object-position: left center;
}

/* When the layout has an image, switch to a 2-column grid:
   text on the left, image on the right, with a safety gap. */
.text-layout--with-image {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 4vw, 5rem);
}

.text-layout--with-image .text-layout__image {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
}

.text-layout__label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.text-layout__dash {
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background-color: var(--color-dark);
}

.text-layout__heading {
  align-self: center;
  font-size: clamp(1.75rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.text-layout__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-self: end;
}

.text-layout__detail {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.7;
  max-width: 32ch;
}

@media (max-width: 768px) {
  .text-layout__heading {
    max-width: none;
  }

  .text-layout__footer {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Image becomes a top strip on tablet/mobile (single column, 4 rows) */
  .text-layout--with-image {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    column-gap: 0;
  }

  .text-layout--with-image .text-layout__image {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: clamp(160px, 22vh, 240px);
    align-self: stretch;
    justify-self: stretch;
  }
}

/* --- Contact form --- */
.text-layout--with-form .text-layout__heading {
  font-size: clamp(1.5rem, 4vw, 3.25rem);
  max-width: 18ch;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 720px;
}

/* Honeypot — visually and semantically hidden, but still in the DOM
   so that bots fill it and we can reject those submissions. */
.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-form__input {
  width: 100%;
  background: transparent;
  border: 0 solid var(--color-dark);
  border-bottom-width: 2px;
  padding: 0.6rem 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-dark);
  outline: none;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.2s ease,
    border-bottom-width 0.2s ease;
}

.contact-form__input:focus {
  border-bottom-color: var(--color-lime);
  border-bottom-width: 3px;
}

/* Disable browser autofill yellow background */
.contact-form__input:-webkit-autofill,
.contact-form__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-dark);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-in-out 0s;
}

.contact-form__input--textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.contact-form__submit {
  background-color: var(--color-dark);
  color: var(--color-white);
  border: none;
  padding: 0.9rem 2.25rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-form__submit:hover:not(:disabled) {
  transform: translateY(-1px);
}

.contact-form__submit:focus-visible {
  outline: 2px solid var(--color-dark);
  outline-offset: 3px;
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__status {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
  min-height: 1.2em;
}

.contact-form__status--success {
  color: var(--color-success);
}

.contact-form__status--error {
  color: var(--color-error);
}

@media (max-width: 640px) {
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .section--lime {
    padding: 1.5rem;
  }

  .section__logo {
    max-width: 90vw;
    max-height: 38vh;
  }

  .text-layout {
    padding: 2rem 1.5rem;
    row-gap: 1.5rem;
  }

  .text-layout__dash {
    width: 1.75rem;
  }

  .text-layout__detail {
    font-size: 0.72rem;
  }
}

/* --- Stepper — vertical dots on the right --- */
.stepper {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 10;
  padding: 0.5rem;
}

.stepper__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-dark);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 0.4s ease,
    transform 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}

.stepper__dot:hover {
  transform: scale(1.15);
}

.stepper__dot:focus-visible {
  outline: 2px solid var(--color-dark);
  outline-offset: 4px;
}

.stepper__dot--active {
  background-color: var(--color-dark);
  transform: scale(1.25);
}

.stepper__dot--active:hover {
  transform: scale(1.4);
}

@media (max-width: 480px) {
  .stepper {
    right: 1rem;
    gap: 0.75rem;
  }

  .stepper__dot {
    width: 10px;
    height: 10px;
  }
}

/* Respect user motion preference — disable animations and transitions globally */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
