/* Kulladal Fönster — Landing Page Styles */

/* ── Variables (scoped to plugin wrapper) ── */
.kf-fonster-page {
  --kf-color-text: #4F4A45;
  --kf-color-heading: #222222;
  --kf-color-bg: #ebeae4;
  --kf-color-btn: #4F4A45;
  --kf-color-btn-text: #FFFFFF;
  --kf-color-accent: #C5BFB8;
  --kf-font-heading: 'EB Garamond', serif;
  --kf-font-body: 'Jost', sans-serif;
  padding-top: 3rem;
}

/* ── Zone 1: Centered title area ── */
.kf-fonster-page .kf-title-zone {
  background: var(--kf-color-bg);
  padding: 3rem 24px 2rem;
  text-align: center;
  opacity: 0;
  animation: kf-fadeUp 0.6s ease forwards;
  animation-delay: 0.1s;
}

.kf-fonster-page .kf-title-zone h1 {
  font-family: var(--kf-font-heading);
  font-weight: 400;
  font-size: 52px;
  text-transform: uppercase;
  letter-spacing: 5.2px;
  line-height: 1.6;
  color: var(--kf-color-heading);
  margin: 0;
  padding: 0;
}

/* ── Zone 2: Two-column content ── */
.kf-fonster-page .kf-content-zone {
  display: flex;
  flex-wrap: wrap;
  background: var(--kf-color-bg);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 1280px) {
  .kf-fonster-page .kf-content-zone {
    padding-left: 80px;
    padding-right: 80px;
  }
}

/* ── Left column: Image ── */
.kf-fonster-page .kf-col-image {
  width: 50%;
  padding: 0 3rem;
  opacity: 0;
  animation: kf-fadeIn 0.8s ease forwards;
  animation-delay: 0.3s;
}

.kf-fonster-page .kf-col-image img {
  width: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3 / 4;
}

/* ── Right column: Text + form ── */
.kf-fonster-page .kf-col-text {
  width: 50%;
  padding: 0 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ── H3 heading ── */
.kf-fonster-page .kf-col-text h3 {
  font-family: var(--kf-font-heading);
  font-weight: 400;
  font-size: 35px;
  letter-spacing: 0.4px;
  line-height: 1.3;
  color: var(--kf-color-heading);
  margin-bottom: 12px;
  opacity: 0;
  animation: kf-fadeUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

/* ── Sub-heading ── */
.kf-fonster-page .kf-subheading {
  font-family: var(--kf-font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--kf-color-text);
  margin-bottom: 20px;
  opacity: 0;
  animation: kf-fadeUp 0.6s ease forwards;
  animation-delay: 0.3s;
}

/* ── Description ── */
.kf-fonster-page .kf-description {
  font-family: var(--kf-font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--kf-color-text);
  margin-bottom: 32px;
  opacity: 0;
  animation: kf-fadeUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

/* ── Form area ── */
.kf-fonster-page .kf-form-area {
  opacity: 0;
  animation: kf-fadeUp 0.6s ease forwards;
  animation-delay: 0.5s;
}

/* ── Form states ── */
.kf-fonster-page .kf-form-step {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.kf-fonster-page .kf-form-step.active {
  display: block;
}

.kf-fonster-page .kf-form-step.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── State 1: Email capture ── */
.kf-fonster-page .kf-email-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.kf-fonster-page .kf-email-row .kf-input-group {
  flex: 1;
  position: relative;
}

.kf-fonster-page .kf-input-group label {
  display: block;
  font-family: var(--kf-font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--kf-color-text);
  margin-bottom: 6px;
}

.kf-fonster-page .kf-input {
  width: 100%;
  font-family: var(--kf-font-body);
  font-size: 16px;
  color: var(--kf-color-text);
  padding: 10px 12px;
  border: 1px solid var(--kf-color-accent);
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease;
  border-radius: 2px;
  -webkit-appearance: none;
}

.kf-fonster-page .kf-input::placeholder {
  color: var(--kf-color-accent);
}

.kf-fonster-page .kf-input:focus {
  border-color: var(--kf-color-text);
}

.kf-fonster-page .kf-input.error {
  border-color: #b85c5c;
}

.kf-fonster-page .kf-error-msg {
  position: absolute;
  left: 0;
  top: 100%;
  font-size: 13px;
  color: #b85c5c;
  margin-top: 4px;
  opacity: 0;
  pointer-events: none;
}

.kf-fonster-page .kf-error-msg.show {
  opacity: 1;
}

/* ── Buttons ── */
.kf-fonster-page .kf-btn {
  font-family: var(--kf-font-body);
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding: 12px 32px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border-radius: 2px;
}

.kf-fonster-page .kf-btn-primary {
  background: var(--kf-color-btn);
  color: var(--kf-color-btn-text);
}

.kf-fonster-page .kf-btn-primary:hover {
  background: #3a3632;
}

.kf-fonster-page .kf-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.kf-fonster-page .kf-btn-secondary {
  background: transparent;
  color: var(--kf-color-btn);
  border: 1px solid var(--kf-color-btn);
}

.kf-fonster-page .kf-btn-secondary:hover {
  background: var(--kf-color-btn);
  color: var(--kf-color-btn-text);
}

/* ── Spinner ── */
.kf-fonster-page .kf-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: kf-spin 0.6s linear infinite;
  vertical-align: middle;
}

.kf-fonster-page .kf-btn-secondary .kf-spinner {
  border-color: rgba(79,74,69,0.3);
  border-top-color: var(--kf-color-btn);
}

@keyframes kf-spin {
  to { transform: rotate(360deg); }
}

/* ── State 2: Profiling ── */
.kf-fonster-page .kf-step2-intro {
  margin-bottom: 24px;
}

.kf-fonster-page .kf-step2-intro p {
  font-family: var(--kf-font-body);
  font-size: 17px;
  color: var(--kf-color-text);
  line-height: 1.6;
}

.kf-fonster-page .kf-step2-intro p:first-child {
  font-family: var(--kf-font-heading);
  font-size: 22px;
  font-weight: 400;
  color: var(--kf-color-heading);
  margin-bottom: 6px;
}

.kf-fonster-page .kf-step2-intro p:last-child {
  font-size: 15px;
  color: #8a8480;
}

.kf-fonster-page .kf-profiling-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

/* ── Select styling ── */
.kf-fonster-page .kf-select-wrap {
  position: relative;
}

.kf-fonster-page .kf-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 16px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--kf-color-text);
  border-bottom: 1.5px solid var(--kf-color-text);
  transform: rotate(45deg);
  pointer-events: none;
}

.kf-fonster-page .kf-select {
  width: 100%;
  font-family: var(--kf-font-body);
  font-size: 16px;
  color: var(--kf-color-text);
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--kf-color-accent);
  background: transparent;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.kf-fonster-page .kf-select:focus {
  border-color: var(--kf-color-text);
}

/* ── Multi-select pills ── */
.kf-fonster-page .kf-pills-label {
  font-family: var(--kf-font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--kf-color-text);
  margin-bottom: 10px;
  display: block;
}

.kf-fonster-page .kf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kf-fonster-page .kf-pill {
  font-family: var(--kf-font-body);
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid var(--kf-color-accent);
  background: transparent;
  color: var(--kf-color-btn);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.kf-fonster-page .kf-pill:hover {
  border-color: var(--kf-color-text);
}

.kf-fonster-page .kf-pill.selected {
  background: var(--kf-color-btn);
  color: var(--kf-color-btn-text);
  border-color: var(--kf-color-btn);
}

/* ── Step 2 actions ── */
.kf-fonster-page .kf-step2-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.kf-fonster-page .kf-skip-link {
  font-family: var(--kf-font-body);
  font-size: 14px;
  color: #8a8480;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.kf-fonster-page .kf-skip-link:hover {
  color: var(--kf-color-text);
}

/* ── State 3: Confirmation ── */
.kf-fonster-page .kf-col-text .kf-confirmation h3 {
  font-family: var(--kf-font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--kf-color-heading);
}

.kf-fonster-page .kf-confirmation p {
  font-family: var(--kf-font-body);
  font-size: 16px;
  color: var(--kf-color-text);
  line-height: 1.5;
  margin-bottom: 16px;
}

.kf-fonster-page .kf-ig-link {
  font-family: var(--kf-font-body);
  font-size: 15px;
  color: var(--kf-color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--kf-color-accent);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.kf-fonster-page .kf-ig-link:hover {
  border-bottom-color: var(--kf-color-text);
}

/* ── Animations ── */
@keyframes kf-fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kf-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Tablet & Mobile (<1024px) ── */
@media (max-width: 1023px) {
  .kf-fonster-page .kf-title-zone {
    padding: 3rem 24px 2rem;
  }

  .kf-fonster-page .kf-title-zone h1 {
    font-size: 36px;
    letter-spacing: 3.6px;
  }

  .kf-fonster-page .kf-col-image,
  .kf-fonster-page .kf-col-text {
    width: 100%;
  }

  .kf-fonster-page .kf-col-text {
    order: 1;
    padding: 36px 24px;
  }

  .kf-fonster-page .kf-col-image {
    order: 2;
    padding: 0 24px 24px;
  }

  .kf-fonster-page .kf-col-text h3 {
    font-size: 28px;
  }

  .kf-fonster-page .kf-email-row {
    flex-direction: column;
    gap: 16px;
  }

  .kf-fonster-page .kf-email-row .kf-input-group {
    width: 100%;
    margin-bottom: 8px;
  }

  .kf-fonster-page .kf-email-row .kf-input {
    width: 100%;
  }

  .kf-fonster-page .kf-email-row .kf-btn {
    width: 100%;
  }

  .kf-fonster-page .kf-step2-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .kf-fonster-page .kf-step2-actions .kf-btn {
    width: 100%;
  }
}
