/* Frequently asked questions, on the home page and the FAQ page, after Dilara's mockups (design/reference). */

/* the section: light falls in from the top-right corner down towards the speech bubbles */

.teo-website-faq-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* clip, unlike hidden, keeps the sticky side of the FAQ page working */
  overflow: clip;
  background-color: var(--teo-website-background);
  interpolate-size: allow-keywords;
}

.teo-website-faq-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 36% 48% at 100% 9%, rgba(16, 130, 252, 0.82), rgba(0, 80, 205, 0.36) 42%, transparent 72%),
    linear-gradient(218deg, rgba(42, 107, 255, 0.3) 0%, rgba(30, 90, 230, 0.1) 30%, transparent 52%),
    radial-gradient(ellipse 28% 30% at 100% 86%, rgba(1, 34, 97, 0.55), transparent 70%),
    radial-gradient(ellipse 34% 26% at 22% 78%, rgba(10, 79, 184, 0.22), transparent 70%);
  /* faded at both ends, so the glow in the lower corner does not stop in a hard line where the next band begins */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 110px, #000 calc(100% - 160px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 110px, #000 calc(100% - 160px), transparent 100%);
}

.teo-website-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

/* heading */

.teo-website-faq-section .teo-website-heading {
  margin-bottom: 0;
}

.teo-website-faq-section .teo-website-eyebrow {
  margin-bottom: 22px;
  color: #cfe5f2;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* one line beside the questions at medium weight, as drawn: Manrope runs wider than the mockup face, so the size follows
   the width of the column (about 8.2 em for the Turkish title) and stops a little lower; English wraps to two lines */
.teo-website-faq-section .teo-website-title {
  font-size: clamp(36px, 4.15vw, 60px);
  font-weight: 500;
  letter-spacing: -0.015em;
  word-spacing: 0.05em;
}

/* the accent word of the mockup is a flat pale blue rather than the deep gradient */
.teo-website-faq-section .teo-website-title em {
  background: linear-gradient(100deg, #b3dcfb 0%, #92c8f3 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.teo-website-faq-section .teo-website-lead {
  margin-top: 22px;
  color: #d6e2ef;
  font-size: clamp(16px, 1.4vw, 20px);
}

/* the speech bubbles: a render, blended into the night with screen so its own dark ground disappears */

.teo-website-faq-art {
  position: relative;
  width: calc(100% + 72px);
  max-width: 640px;
  margin: 36px 0 0 -56px;
  pointer-events: none;
}

.teo-website-faq-art::before {
  content: '';
  position: absolute;
  inset: 18% 10% 4% 14%;
  background: radial-gradient(ellipse at 50% 70%, rgba(42, 120, 255, 0.28), transparent 70%);
  filter: blur(24px);
  animation: teo-website-faq-glow 7s ease-in-out infinite alternate;
}

/* its ground is not quite black, so the edges are feathered or the frame of the picture shows */
.teo-website-faq-art img {
  position: relative;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 9%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 9%, #000 78%, transparent 100%);
  mask-composite: intersect;
}

@keyframes teo-website-faq-glow {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

/* the list: hairlines between closed questions, the open one a glass card */

.teo-website-faq-main {
  position: relative;
  z-index: 1;
}

.teo-website-faq-section .teo-website-faq {
  display: block;
  border-bottom: 1px solid var(--teo-website-border);
}

.teo-website-faq-section .teo-website-faq-item {
  position: relative;
  border: 0;
  border-top: 1px solid var(--teo-website-border);
  border-radius: 0;
  background: none;
  /* the reveal's fade stays in the list, or this transition would replace it */
  transition: opacity 0.7s ease, transform 0.7s ease, margin 0.3s ease, border-color 0.3s ease;
}

.teo-website-faq-section .teo-website-faq-item::before {
  content: '';
  position: absolute;
  inset: -1px 0 0;
  border-radius: 12px;
  border: 1px solid rgba(90, 190, 245, 0.75);
  background: linear-gradient(100deg, rgba(3, 26, 70, 0.62) 0%, rgba(10, 52, 150, 0.46) 100%);
  box-shadow: 0 0 0 1px rgba(77, 164, 255, 0.08), 0 0 28px rgba(42, 140, 255, 0.25), inset 0 0 32px rgba(77, 164, 255, 0.1),
    inset 0 1px 0 rgba(200, 235, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.teo-website-faq-section .teo-website-faq-item[open] {
  border-top-color: transparent;
  margin: 11px 0;
}

.teo-website-faq-section .teo-website-faq-item[open]:first-child {
  margin-top: 0;
}

.teo-website-faq-section .teo-website-faq-item:first-child {
  border-top-color: transparent;
}

.teo-website-faq-section .teo-website-faq-item[open]::before {
  opacity: 1;
}

.teo-website-faq-section .teo-website-faq-item:not([open]):hover {
  border-top-color: var(--teo-website-border-strong);
}

.teo-website-faq-section .teo-website-faq-item summary {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  padding: 28px 22px;
  border-radius: 12px;
  color: #fff;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  transition: padding 0.3s ease;
}

.teo-website-faq-section .teo-website-faq-item[open] summary {
  padding: 26px 26px 16px;
}

.teo-website-faq-section .teo-website-faq-item summary:focus-visible {
  outline-offset: -2px;
}

.teo-website-faq-section .teo-website-faq-item p {
  position: relative;
  margin: 0;
  padding: 0 clamp(26px, 6vw, 84px) 30px 26px;
  color: #d3dfec;
  font-size: clamp(16px, 1.32vw, 19px);
  line-height: 1.7;
}

/* the answer slides open where the browser can animate to an automatic height, elsewhere it simply opens */
.teo-website-faq-section .teo-website-faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
}

.teo-website-faq-section .teo-website-faq-item[open]::details-content {
  block-size: auto;
}

/* a thin plus that turns into a minus */

.teo-website-faq-icon {
  position: relative;
  flex: none;
  width: 21px;
  height: 21px;
  color: #a9c8e8;
  transition: color 0.3s ease;
}

.teo-website-faq-icon::before, .teo-website-faq-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, width 0.3s ease;
}

.teo-website-faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.teo-website-faq-item summary:hover .teo-website-faq-icon, .teo-website-faq-item[open] .teo-website-faq-icon {
  color: #cfeeff;
}

.teo-website-faq-item[open] .teo-website-faq-icon::before {
  width: 21px;
}

.teo-website-faq-item[open] .teo-website-faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
}

/* link to all the questions, underlined as drawn */

.teo-website-faq-section .teo-website-faq-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 44px 0 0 22px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(111, 171, 212, 0.85);
  color: #a6d4f5;
  font-size: 17px;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s;
}

.teo-website-faq-more i {
  transition: transform 0.2s ease;
}

.teo-website-faq-section .teo-website-faq-more:hover {
  color: #d4ecff;
  border-bottom-color: #a6d4f5;
}

.teo-website-faq-more:hover i {
  transform: translateX(4px);
}

/* the FAQ page opens with the questions: room for the fixed header, the side stays in view while the list scrolls */

.teo-website-faq-opening {
  padding-top: clamp(140px, 15vw, 196px);
}

/* the light reaches up under the header; only the lower end fades into the closing band */
.teo-website-faq-opening::before {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 160px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 160px), transparent 100%);
}

.teo-website-faq-opening .teo-website-faq-side {
  position: sticky;
  top: 112px;
}

/* narrow screens */

@media (max-width: 1080px) {
  .teo-website-faq-layout {
    gap: 32px;
  }

  .teo-website-faq-art {
    width: calc(100% + 40px);
    margin-left: -32px;
  }
}

@media (max-width: 900px) {
  .teo-website-faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .teo-website-faq-section::before {
    background:
      radial-gradient(ellipse 70% 30% at 100% 0%, rgba(12, 125, 248, 0.4), rgba(0, 77, 197, 0.14) 45%, transparent 75%),
      radial-gradient(ellipse 60% 24% at 100% 100%, rgba(1, 34, 97, 0.5), transparent 70%);
  }

  .teo-website-faq-art {
    display: none;
  }

  .teo-website-faq-opening .teo-website-faq-art {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 20px auto 0;
  }

  .teo-website-faq-opening .teo-website-faq-side {
    position: static;
  }

  .teo-website-faq-section .teo-website-faq-item summary {
    padding: 20px 18px;
  }

  .teo-website-faq-section .teo-website-faq-item[open] summary {
    padding: 20px 18px 12px;
  }

  .teo-website-faq-section .teo-website-faq-item p {
    padding: 0 18px 22px;
    line-height: 1.65;
  }

  .teo-website-faq-icon {
    width: 18px;
    height: 18px;
  }

  .teo-website-faq-icon::before, .teo-website-faq-icon::after {
    width: 16px;
  }

  .teo-website-faq-item[open] .teo-website-faq-icon::before {
    width: 18px;
  }

  .teo-website-faq-section .teo-website-faq-more {
    margin-left: 18px;
  }
}

@media (max-width: 600px) {
  .teo-website-faq-section .teo-website-eyebrow {
    font-size: 14px;
  }

  .teo-website-faq-section .teo-website-faq-more {
    min-height: 44px;
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teo-website-faq-art::before {
    animation: none;
  }

  .teo-website-faq-section .teo-website-faq-item, .teo-website-faq-section .teo-website-faq-item::before,
  .teo-website-faq-section .teo-website-faq-item summary, .teo-website-faq-icon, .teo-website-faq-icon::before,
  .teo-website-faq-icon::after, .teo-website-faq-more i {
    transition: none;
  }

  .teo-website-faq-section .teo-website-faq-item::details-content {
    transition: none;
  }
}
