@layer reset, tokens, base, layout, components, states, responsive;

@layer tokens {
  :root {
    --bdw-canvas: #f7f5ef;
    --bdw-paper: #fffdf9;
    --bdw-ink: #374550;
    --bdw-ink-deep: #2d3942;
    --bdw-muted: #687985;
    --bdw-mint: #b2e0d6;
    --bdw-mint-strong: #79c7b8;
    --bdw-sand: #f0e6da;
    --bdw-line: rgb(55 69 80 / 15%);
    --bdw-line-light: rgb(255 255 255 / 16%);
    --bdw-danger: #9c3f36;
    --bdw-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bdw-radius-sm: 12px;
    --bdw-radius-md: 18px;
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body, h1, h2, p { margin: 0; }
  button, input { font: inherit; }
  button { border: 0; }
  a { color: inherit; text-decoration: none; }
  svg { display: block; width: 100%; height: 100%; }
}

@layer base {
  html { background: var(--bdw-canvas); }
  body {
    min-width: 320px;
    min-height: 100dvh;
    background: var(--bdw-canvas);
    color: var(--bdw-ink);
    font-family: var(--bdw-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  :focus-visible { outline: 3px solid var(--bdw-mint-strong); outline-offset: 3px; }
  ::selection { background: var(--bdw-mint); color: var(--bdw-ink); }
}

@layer layout {
  .bdw-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  }

  .bdw-presentation {
    position: relative;
    overflow: hidden;
    background: var(--bdw-ink);
    color: #fff;
  }

  .bdw-presentation__inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: clamp(24px, 4vh, 46px);
    padding: clamp(28px, 4vw, 56px) clamp(30px, 5.6vw, 88px);
  }

  .bdw-access {
    display: grid;
    place-items: center;
    padding: clamp(28px, 4vw, 58px);
    background: var(--bdw-paper);
  }

  .bdw-access__inner { width: min(100%, 460px); }
}

@layer components {
  .bdw-skip {
    position: fixed;
    inset: 16px auto auto 16px;
    z-index: 20;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    transform: translateY(-180%);
  }
  .bdw-skip:focus { transform: none; }

  .bdw-presentation::before {
    content: "";
    position: absolute;
    inset: auto -10% -24% auto;
    width: min(54vw, 720px);
    aspect-ratio: 1;
    border: 1px solid rgb(178 224 214 / 18%);
    border-radius: 50%;
    box-shadow: 0 0 0 92px rgb(178 224 214 / 4%), 0 0 0 184px rgb(178 224 214 / 2.5%);
  }

  .bdw-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: max-content;
  }
  .bdw-brand__mark {
    width: 48px;
    height: 48px;
    color: var(--bdw-mint);
  }
  .bdw-brand__mark img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 20px rgb(0 0 0 / 12%));}
  .bdw-brand__text { display: grid; gap: 2px; }
  .bdw-brand__text strong { font-size: .98rem; letter-spacing: .14em; line-height: 1; }
  .bdw-brand__text small { font-size: .5rem; letter-spacing: .22em; opacity: .68; }

  .bdw-presentation__copy {
    align-self: center;
    max-width: 760px;
  }
  .bdw-kicker {
    margin-bottom: 16px;
    color: var(--bdw-mint);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
  }
  .bdw-presentation h1 {
    max-width: 760px;
    font-size: clamp(3.15rem, 5.15vw, 6.25rem);
    line-height: 1.01;
    letter-spacing: -.052em;
    text-wrap: balance;
  }
  .bdw-lead {
    max-width: 600px;
    margin-top: 22px;
    color: rgb(255 255 255 / 66%);
    font-size: clamp(.92rem, 1.15vw, 1.06rem);
    line-height: 1.65;
  }


  .bdw-mobile-access {
    display: none;
    width: max-content;
    margin-top: 24px;
    padding: 12px 15px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 10px;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
  }

  .bdw-capabilities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--bdw-line-light);
    border-bottom: 1px solid var(--bdw-line-light);
  }
  .bdw-capabilities article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 13px;
    min-width: 0;
    padding: 18px 18px 18px 0;
  }
  .bdw-capabilities article + article {
    padding-left: 18px;
    border-left: 1px solid var(--bdw-line-light);
  }
  .bdw-capabilities > article > span {
    color: var(--bdw-mint);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .08em;
  }
  .bdw-capabilities strong,
  .bdw-capabilities small { display: block; }
  .bdw-capabilities strong { font-size: .8rem; line-height: 1.25; }
  .bdw-capabilities small {
    margin-top: 4px;
    color: rgb(255 255 255 / 52%);
    font-size: .65rem;
    line-height: 1.4;
  }

  .bdw-presentation__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgb(255 255 255 / 52%);
    font-size: .67rem;
  }
  .bdw-presentation__footer a {
    color: rgb(255 255 255 / 68%);
    font-weight: 720;
    transition: color .18s ease;
  }
  .bdw-presentation__footer a:hover { color: #fff; }

  .bdw-access__heading { margin-bottom: 30px; }
  .bdw-access__heading .bdw-kicker { color: var(--bdw-muted); }
  .bdw-access__heading h2 {
    font-size: clamp(2.35rem, 3.3vw, 3.45rem);
    line-height: .98;
    letter-spacing: -.052em;
  }
  .bdw-access__heading > p:last-child {
    max-width: 390px;
    margin-top: 14px;
    color: var(--bdw-muted);
    font-size: .82rem;
    line-height: 1.55;
  }

  .bdw-form { display: grid; gap: 17px; }
  .bdw-field { display: grid; gap: 8px; }
  .bdw-field label { font-size: .73rem; font-weight: 760; }
  .bdw-field__label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .bdw-password-toggle {
    padding: 0;
    background: transparent;
    color: var(--bdw-muted);
    cursor: pointer;
    font-size: .68rem;
    font-weight: 740;
  }
  .bdw-field input {
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border: 1px solid var(--bdw-line);
    border-radius: var(--bdw-radius-sm);
    background: transparent;
    color: var(--bdw-ink);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  }
  .bdw-field input:hover { border-color: rgb(55 69 80 / 28%); }
  .bdw-field input:focus {
    border-color: var(--bdw-mint-strong);
    background: #fff;
    box-shadow: 0 0 0 4px rgb(121 199 184 / 14%);
    outline: 0;
  }
  .bdw-field__error {
    min-height: 1em;
    color: var(--bdw-danger);
    font-size: .66rem;
    line-height: 1.3;
  }

  .bdw-form__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: .69rem;
  }
  .bdw-form__meta > a { font-weight: 760; }
  .bdw-checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--bdw-muted); }
  .bdw-checkbox input { width: 16px; height: 16px; accent-color: var(--bdw-ink); }

  .bdw-feedback {
    padding: 11px 13px;
    border-left: 2px solid var(--bdw-ink);
    background: rgb(55 69 80 / 5%);
    color: var(--bdw-muted);
    font-size: .7rem;
    line-height: 1.45;
  }

  .bdw-submit {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-radius: var(--bdw-radius-sm);
    background: var(--bdw-ink);
    color: #fff;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 820;
    letter-spacing: .01em;
    transition: background .18s ease, transform .18s ease;
  }
  .bdw-submit:hover { background: var(--bdw-ink-deep); transform: translateY(-1px); }
  .bdw-submit:active { transform: translateY(0); }
  .bdw-submit:disabled { cursor: wait; opacity: .72; transform: none; }

  .bdw-support {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--bdw-line);
    font-size: .68rem;
  }
  .bdw-support span:first-child { color: var(--bdw-muted); }
  .bdw-support a { font-weight: 760; }

  .bdw-social {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 15px;
    margin-top: 18px;
    color: var(--bdw-muted);
    font-size: .61rem;
    line-height: 1.4;
  }
  .bdw-social a,
  .bdw-legal a {
    transition: color .18s ease;
  }
  .bdw-social a:hover,
  .bdw-legal a:hover { color: var(--bdw-ink); }

  .bdw-legal {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgb(55 69 80 / 8%);
    color: var(--bdw-muted);
    font-size: .6rem;
  }
  .bdw-legal a:last-child { text-decoration: underline; text-underline-offset: 3px; }
}

@layer states {
  .bdw-field[data-invalid="true"] input {
    border-color: var(--bdw-danger);
    box-shadow: 0 0 0 4px rgb(156 63 54 / 8%);
  }
}

@layer responsive {
  @media (min-width: 981px) {
    html, body { height: 100%; overflow: hidden; }
    .bdw-shell { height: 100dvh; min-height: 560px; overflow: hidden; }
  }

  @media (max-height: 760px) and (min-width: 981px) {
    .bdw-presentation__inner {
      gap: 20px;
      padding-top: 24px;
      padding-bottom: 24px;
    }
    .bdw-presentation h1 { font-size: clamp(3rem, 4.65vw, 5rem); }
    .bdw-lead { margin-top: 14px; line-height: 1.5; }
    .bdw-capabilities article { padding-top: 13px; padding-bottom: 13px; }
    .bdw-access { padding-block: 24px; }
    .bdw-access__heading { margin-bottom: 20px; }
    .bdw-access__heading h2 { font-size: clamp(2.1rem, 3vw, 2.8rem); }
    .bdw-form { gap: 11px; }
    .bdw-field input { height: 46px; }
    .bdw-submit { min-height: 48px; }
    .bdw-support { margin-top: 18px; padding-top: 15px; }
    .bdw-social { margin-top: 12px; }
    .bdw-legal { margin-top: 10px; padding-top: 10px; }
  }

  @media (max-height: 640px) and (min-width: 981px) {
    .bdw-presentation__inner { gap: 14px; padding-block: 18px; }
    .bdw-brand__mark { width: 34px; height: 34px; }
    .bdw-presentation h1 { font-size: clamp(2.65rem, 4.2vw, 4.25rem); }
    .bdw-lead { font-size: .82rem; }
    .bdw-capabilities small { display: none; }
    .bdw-capabilities article { padding-top: 10px; padding-bottom: 10px; }
    .bdw-access__heading > p:last-child { margin-top: 8px; }
    .bdw-field__error { min-height: .7em; }
    .bdw-support { margin-top: 12px; padding-top: 12px; }
    .bdw-social { margin-top: 8px; }
    .bdw-legal { margin-top: 7px; padding-top: 7px; }
  }

  @media (max-width: 980px) {
    .bdw-shell { grid-template-columns: 1fr; }
    .bdw-presentation__inner { min-height: 100svh; padding: 0 26px 42px; }
    .bdw-brand {
      position: sticky;
      top: 0;
      z-index: 10;
      width: calc(100% + 52px);
      margin-inline: -26px;
      padding: 22px 26px 18px;
      background: rgb(55 69 80 / 96%);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid rgb(255 255 255 / 8%);
    }
    .bdw-presentation h1 {
      font-size: clamp(3.1rem, 10vw, 5.6rem);
      line-height: 1.02;
      letter-spacing: -.048em;
    }
    .bdw-mobile-access { display: inline-flex; align-items: center; gap: 10px; }
    .bdw-access { min-height: 100svh; padding: 54px 22px 64px; }
  }

  @media (max-width: 620px) {
    .bdw-presentation__inner { min-height: 100svh; padding-inline: 18px; }
    .bdw-brand {
      width: calc(100% + 36px);
      margin-inline: -18px;
      padding-inline: 18px;
    }
    .bdw-presentation h1 {
      font-size: clamp(2.75rem, 14vw, 4.2rem);
      line-height: 1.04;
      letter-spacing: -.044em;
    }
    .bdw-capabilities { grid-template-columns: 1fr; }
    .bdw-capabilities article { padding: 14px 0; }
    .bdw-capabilities article + article { padding-left: 0; border-top: 1px solid var(--bdw-line-light); border-left: 0; }
    .bdw-presentation__footer { align-items: flex-start; flex-direction: column; gap: 8px; }
    .bdw-form__meta,
    .bdw-support { align-items: flex-start; flex-direction: column; gap: 10px; }
    .bdw-social { gap: 8px 14px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms; animation-iteration-count: 1; transition-duration: .01ms; }
  }
}
