/* ==========================================================================
   FORGYEN — Discovery Session (homepage section 6 + /discovery/)
   Builds on main.css tokens. Scoped to .dc (section), .df (form) and the
   intl-tel-input widget inside it. Both locations render the same markup
   (templates/discovery-section.html); .dc--home / .dc--page only tune spacing.
   Structure: 1 Section & atmosphere · 2 Intro · 3 Panel · 4 Fields
              5 Phone field · 6 Submit, note & status · 7 Success
              8 Country dropdown · 9 Page variant · 10 Responsive
   ========================================================================== */

/* 1. Section & atmosphere ----------------------------------------------- */
.dc {
  position: relative;
  isolation: isolate;
  overflow: clip;
  scroll-margin-top: var(--fg-header-h);
  padding: clamp(96px, 9vw, 136px) 0 clamp(104px, 10vw, 152px);
  /* picks up Case Studies' cool silver, warms to ivory, deepens to navy below */
  /* starts on exactly the colour Case Studies ends on, so the sections meet seamlessly */
  background:
    radial-gradient(56% 30% at 22% 26%, rgba(255, 255, 255, 0.55), transparent 75%),
    linear-gradient(180deg, #F3F4F6 0%, #F5F2EF 12%, #F7F0E8 32%, #F5EDE4 50%, #E7E6E8 78%, #D9DEE5 100%);
}
.dc__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
/* hand-off to the site footer: the lower edge settles into the footer's
   opening navy (#16233A), so the two meet tone-on-tone with no seam.
   Background only: it sits under the panel and never covers content. */
.dc::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(150px, 12.5vw, 190px);          /* clears the copper beads above */
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 35, 58, 0) 0%, rgba(22, 35, 58, 0.55) 45%, rgba(22, 35, 58, 0.9) 78%, #16233A 100%);
}
/* the navy body that rises from the lower left, as in the approved design */
.dc__navy {
  position: absolute;
  left: -30%;
  top: 58%;
  width: 112%;
  aspect-ratio: 1.6;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 44% 46%, #0C1A2D 0%, #112645 40%, #1A3558 66%, #2B4A6E 86%, rgba(62, 92, 124, 0.35) 97%, rgba(62, 92, 124, 0) 100%);
  /* a silver haze above the navy edge, so it meets the ivory softly */
  box-shadow: 0 -40px 90px -10px rgba(120, 140, 165, 0.35);
}
.dc__navy::after {                 /* warm light catching the upper rim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border-top: 1.5px solid rgba(240, 200, 155, 0.75);
  -webkit-mask: linear-gradient(90deg, transparent 8%, #000 30%, #000 70%, transparent 95%);
  mask: linear-gradient(90deg, transparent 8%, #000 30%, #000 70%, transparent 95%);
}
/* a cooler silver-blue pool at the lower right, behind the form */
.dc__backdrop::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -30%;
  width: 70%;
  aspect-ratio: 1.4;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 74, 99, 0.28), rgba(40, 74, 99, 0) 100%);
}
.dc__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dc__line {
  fill: none;
  stroke: rgba(214, 160, 108, 0.55);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.dc__line--rim { stroke: rgba(236, 196, 150, 0.85); stroke-width: 1.4; }
.dc__line--soft { stroke: rgba(214, 160, 108, 0.3); }

/* 2. Intro --------------------------------------------------------------- */
.dc__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(560px, 46vw, 672px));
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
.dc__intro {
  align-self: center;
  padding-bottom: 8%;
  container-type: inline-size;                /* the heading scales to its column */
}
.dc__mark {
  display: block;
  width: 50px;
  height: 2px;
  margin-bottom: 30px;
  border-radius: 2px;
  background: var(--fg-copper);
}
.dc__title {
  margin: 0;
  color: var(--fg-navy-950);
  /* "Discovery Session" is ~8.5em wide: keep it on one line in any column */
  font-size: min(4.25rem, 11.4cqi);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.dc__title-line { display: block; }
.dc__accent {
  color: var(--fg-copper);
  background: linear-gradient(180deg, #CC8650, #A35A28);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dc__lead {
  max-width: 34ch;
  margin: clamp(18px, 2vw, 28px) 0 0;
  color: #2E3B52;
  font-size: clamp(1.125rem, 0.82rem + 0.85vw, 1.625rem);  /* 18 → 26 */
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* 3. Panel --------------------------------------------------------------- */
.df-panel {
  position: relative;
  padding: clamp(28px, 3.2vw, 46px) clamp(22px, 3.2vw, 46px) clamp(26px, 2.8vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: rgba(252, 248, 243, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(184, 115, 51, 0.1),
    0 2px 4px rgba(11, 19, 32, 0.04),
    0 44px 80px -44px rgba(11, 19, 32, 0.55);
}

/* 4. Fields -------------------------------------------------------------- */
.df { margin: 0; }
.df__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 24px;
}
.df__field { grid-column: 1 / -1; min-width: 0; }
.df__field--half { grid-column: span 1; }

.df__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-bottom: 12px;
  color: var(--fg-navy-950);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.df__hint {
  color: var(--fg-text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
}

.df__control { position: relative; }
.df__icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 24px;
  height: 24px;
  translate: 0 -50%;
  fill: none;
  stroke: #2E3B52;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.df__control--area .df__icon { top: 18px; translate: none; }

.df__input {
  display: block;
  width: 100%;
  height: 58px;
  margin: 0;
  padding: 0 18px 0 58px;
  border: 1px solid rgba(11, 19, 32, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--fg-navy-950);
  font: 500 1rem/1.4 var(--fg-font-en);
  transition: border-color var(--fg-dur-micro) var(--fg-ease),
              box-shadow var(--fg-dur-micro) var(--fg-ease),
              background-color var(--fg-dur-micro) var(--fg-ease);
  -webkit-appearance: none;
  appearance: none;
}
.df__input::placeholder { color: #6B7385; font-weight: 400; opacity: 1; }
.df__input:hover { border-color: rgba(11, 19, 32, 0.24); }
.df__input:focus {
  outline: none;
  border-color: rgba(184, 115, 51, 0.75);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(184, 115, 51, 0.15);
}
.df__textarea {
  height: auto;
  min-height: 118px;
  padding-top: 17px;
  padding-bottom: 14px;
  resize: vertical;
}

/* errors: shown next to the field, never by colour alone */
.df__field.is-invalid .df__input { border-color: #B8452B; background: #FFFDFB; }
.df__field.is-invalid .df__input:focus { box-shadow: 0 0 0 4px rgba(184, 69, 43, 0.14); }
.df__error {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
  color: #A23B22;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.df__error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  background: #B8452B;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 800;
}
.df__error[hidden] { display: none; }

/* 5. Phone field (intl-tel-input) ---------------------------------------- */
.df .iti { display: block; width: 100%; }
.df .iti__country-container { padding: 0; }
.df .iti__selected-country {
  padding: 0 21px 0 16px;
  border-radius: 10px 0 0 10px;
  background: none;
}
.df .iti__selected-country::after {             /* divider between country and number */
  content: "";
  position: absolute;
  right: 8px;                                    /* + the library's 6px = 14px before the number */
  top: 15px;
  bottom: 15px;
  width: 1px;
  background: rgba(11, 19, 32, 0.14);
}
.df .iti__selected-country-primary { gap: 10px; padding: 0; }
.df .iti__selected-country:hover .iti__selected-country-primary,
.df .iti__selected-country:focus-visible .iti__selected-country-primary { background: none; }
.df .iti__selected-country:focus-visible { outline: 2px solid var(--fg-focus); outline-offset: -4px; }
.df .iti__arrow {
  width: 7px;
  height: 7px;
  margin: -3px 2px 0 0;
  border: 0;
  border-right: 1.6px solid #2E3B52;
  border-bottom: 1.6px solid #2E3B52;
  rotate: 45deg;
}
.df .iti__arrow--up { rotate: 225deg; margin-top: 4px; }
.df .iti__selected-dial-code {
  margin-left: 4px;
  color: var(--fg-navy-950);
  font-weight: 600;
}
.df .iti__globe {                               /* line globe, matching the other field icons */
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E3B52' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M2.75 12h18.5M12 2.75c2.6 2.6 3.9 5.7 3.9 9.25S14.6 18.65 12 21.25M12 2.75C9.4 5.35 8.1 8.45 8.1 12s1.3 6.65 3.9 9.25M4.4 7h15.2M4.4 17h15.2'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: none;
}
.df .iti input.df__input { padding-right: 18px; }

/* 6. Submit, note & status ----------------------------------------------- */
.df__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  margin-top: 30px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #C98243 0%, #B0642C 55%, #A1572A 100%);
  color: #FFFFFF;
  font: 600 1.125rem/1.25 var(--fg-font-en);
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 16px 30px -16px rgba(126, 74, 31, 0.75);
  transition: filter var(--fg-dur-micro) var(--fg-ease), box-shadow var(--fg-dur-micro) var(--fg-ease);
}
.df__submit:hover { filter: brightness(0.95); }
.df__submit:active { filter: brightness(0.9); }
.df__submit:focus-visible { outline: 3px solid var(--fg-steel-blue); outline-offset: 3px; }
.df__submit-arrow {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--fg-dur-micro) var(--fg-ease);
}
.df__submit:hover .df__submit-arrow { transform: translateX(4px); }
.df__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: df-spin 0.8s linear infinite;
}
.df.is-sending .df__submit { cursor: progress; filter: saturate(0.85); }
.df.is-sending .df__submit-arrow { display: none; }
.df.is-sending .df__spinner { display: block; }
@keyframes df-spin { to { transform: rotate(360deg); } }

.df__status:empty { display: none; }
.df__status {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--fg-copper);
  border-radius: 6px;
  background: rgba(184, 115, 51, 0.08);
  color: var(--fg-navy-950);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.df__status.is-sending { border-left-color: rgba(11, 19, 32, 0.2); background: rgba(11, 19, 32, 0.04); }
.df__status.is-failure { border-left-color: #B8452B; background: rgba(184, 69, 43, 0.08); color: #7A2B18; }

.df__note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 0;
  padding-left: 6px;
  color: var(--fg-text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.df__privacy {
  margin: 8px 0 0;
  padding-left: 48px;                            /* lines up with the note text */
  color: var(--fg-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.df__privacy a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.df__privacy a:hover { color: var(--fg-copper-700); }
.df__note-icon {
  width: 28px;
  height: 28px;
  flex: none;
  fill: none;
  stroke: var(--fg-copper);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* 7. Success (only after the service confirms) --------------------------- */
.df-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(12px, 2vw, 24px) 0;
}
.df-success[hidden] { display: none; }
.df-success:focus { outline: none; }
.df-success__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #C98243, #A1572A);
  box-shadow: 0 14px 28px -16px rgba(126, 74, 31, 0.8);
}
.df-success__icon svg { width: 26px; height: 26px; fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.df-success__title {
  margin: 8px 0 0;
  color: var(--fg-navy-950);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.df-success__text { margin: 0; color: #2E3B52; font-size: 1.0625rem; line-height: 1.55; }

/* 8. Country dropdown (inline on desktop, full-screen popup on phones) ---- */
.df .iti__dropdown-content { z-index: 5; margin-top: 6px; }
.iti--container { z-index: 60; }
.iti--container .iti__dropdown-content,
.df .iti__dropdown-content {
  overflow: hidden;
  border: 1px solid rgba(11, 19, 32, 0.12);
  border-radius: 12px;
  background: #FFFDFA;
  box-shadow: 0 24px 48px -24px rgba(11, 19, 32, 0.45);
  font-family: var(--fg-font-en);
}
.df .iti__search-input,
.iti--container .iti__search-input {
  height: 46px;
  padding: 0 14px 0 38px;                        /* room for the library's search icon */
  border: 0;
  border-bottom: 1px solid rgba(11, 19, 32, 0.1);
  background: transparent;
  color: var(--fg-navy-950);
  font: 500 1rem var(--fg-font-en);
}
.df .iti__search-input:focus,
.iti--container .iti__search-input:focus { outline: none; background: #FFFFFF; }
.df .iti__country,
.iti--container .iti__country { padding: 10px 14px; color: var(--fg-navy-950); font-size: 0.9375rem; }
.df .iti__country.iti__highlight,
.iti--container .iti__country.iti__highlight { background: rgba(184, 115, 51, 0.1); }
.df .iti__dial-code,
.iti--container .iti__dial-code { color: var(--fg-text-muted); }

/* 9. Page variant (/discovery/) ------------------------------------------ */
.dc-page { background: #F3F4F6; }
.dc--page {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--fg-header-h) + clamp(40px, 5vw, 80px));
  display: flex;
  align-items: center;
}
.dc--page .dc__inner { width: 100%; }
.dc--page {
  background:
    radial-gradient(60% 34% at 50% 0%, rgba(255, 255, 255, 0.7), transparent 75%),
    linear-gradient(180deg, #F9F4EF 0%, #F7F1EA 30%, #F2ECE6 60%, #E2E3E7 82%, #D3D9E1 100%);
}

/* 10. Responsive --------------------------------------------------------- */
@media (max-width: 1099px) {
  /* stacked layout: the form sits over the light area, so the hand-off starts higher */
  .dc::after {
    height: 320px;
    background: linear-gradient(180deg, rgba(22, 35, 58, 0) 0%, rgba(22, 35, 58, 0.7) 38%, rgba(22, 35, 58, 0.95) 62%, #16233A 100%);
  }
  .dc__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .dc__intro { padding-bottom: 0; max-width: 640px; }
  .dc__lead { max-width: 40ch; }
  .df-panel { max-width: 720px; }
  .dc__navy { left: -40%; top: 46%; width: 150%; }
}

@media (max-width: 599px) {
  .dc { padding: 64px 0 56px; }
  /* phones: the navy body sits behind the form, so start the hand-off higher,
     under the panel, and the space below it reads as navy, not silver */
  .dc::after {
    height: 340px;
    background: linear-gradient(180deg, rgba(22, 35, 58, 0) 0%, rgba(22, 35, 58, 0.7) 38%, rgba(22, 35, 58, 0.95) 62%, #16233A 100%);
  }
  .dc--page { padding-top: calc(var(--fg-header-h) + 28px); padding-bottom: 56px; align-items: flex-start; }
  .dc__mark { width: 44px; margin-bottom: 22px; }
  .dc__title { font-size: min(2.375rem, 9.6vw); line-height: 1.06; }
  .dc__lead { font-size: 1.0625rem; max-width: none; }
  .dc__inner { gap: 30px; }

  .df-panel { padding: 26px 18px 24px; border-radius: 20px; }
  .df__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .df__field--half { grid-column: 1 / -1; }
  .df__label { font-size: 0.9375rem; gap: 2px 8px; margin-bottom: 10px; }
  .df__hint { font-size: 0.8125rem; }
  .df__input { height: 54px; padding-left: 52px; }
  .df__icon { left: 16px; width: 22px; height: 22px; }
  .df__textarea { min-height: 110px; padding-top: 15px; }
  .df__control--area .df__icon { top: 16px; }
  .df__submit { min-height: 58px; margin-top: 26px; font-size: min(1rem, 4.1vw); gap: 10px; padding: 0 10px; }
  .df__submit-arrow { width: 18px; height: 18px; }
  .df__note { align-items: flex-start; gap: 12px; padding-left: 0; font-size: 0.875rem; }
  .df__note-icon { width: 24px; height: 24px; }
  .df__privacy { padding-left: 36px; font-size: 0.78125rem; }

  .dc__navy { left: -60%; top: 34%; width: 220%; aspect-ratio: 1.15; }
  .dc__lines { opacity: 0.7; }
}

/* Honeypot (WordPress form): off-screen, never shown or announced */
.df__hp { position: absolute !important; inset-inline-start: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
