:root {
  --orange: #ff6200;
  --orange-dark: #ee5900;
  --orange-soft: #fff3ec;
  --ink: #182036;
  --muted: #707784;
  --line: #e7e7ea;
  --success: #20b968;
  --danger: #d23a3a;
  --card-width: 620px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #fff;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 0% 100%, rgba(255,111,24,.82) 0, rgba(255,143,76,.48) 10rem, rgba(255,214,187,.20) 22rem, transparent 34rem),
    radial-gradient(circle at 100% 0%, rgba(255,126,48,.58) 0, rgba(255,184,137,.30) 12rem, rgba(255,228,211,.16) 24rem, transparent 38rem),
    linear-gradient(135deg, #fff 0%, #fffdfb 52%, #fff8f3 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 145px;
  height: 145px;
  pointer-events: none;
  opacity: .45;
  background-image: radial-gradient(circle, rgba(255,98,0,.24) 2px, transparent 2.3px);
  background-size: 28px 28px;
}

body::before { left: 7vw; top: 24vh; }
body::after { right: 8vw; bottom: 15vh; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(28px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  position: relative;
  isolation: isolate;
}

.page::before,
.page::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(52vw, 820px);
  aspect-ratio: 1;
  border: 2px solid rgba(255,98,0,.55);
  border-radius: 50%;
  pointer-events: none;
}

.page::before {
  top: min(-34vw, -390px);
  right: min(-24vw, -250px);
  background: radial-gradient(circle at 42% 58%, rgba(255,255,255,0) 0 48%, rgba(255,190,145,.16) 72%, rgba(255,112,28,.28) 100%);
}

.page::after {
  bottom: min(-36vw, -430px);
  left: min(-24vw, -250px);
  background: radial-gradient(circle at 62% 38%, rgba(255,255,255,0) 0 45%, rgba(255,176,116,.22) 70%, rgba(255,98,0,.42) 100%);
}

.call-card {
  width: min(100%, var(--card-width));
  padding: 48px 54px 44px;
  border-radius: 34px;
  border: 1.5px solid rgba(255,98,0,.68);
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 75px rgba(72,48,34,.13);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  z-index: 1;
}

.logo {
  width: 148px;
  height: 148px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  border-radius: 31% 34% 29% 32% / 28% 30% 34% 34%;
  background: linear-gradient(145deg, #ff710c, var(--orange));
  box-shadow: 0 18px 36px rgba(255,98,0,.22);
  transform: rotate(-1.5deg);
}

.logo span {
  color: #fff;
  font-size: 68px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -5px;
  transform: rotate(1.5deg);
}

.logo-image {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin: 0 auto 30px;
  filter: drop-shadow(0 18px 24px rgba(255,98,0,.18));
}

.title-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.title-wrap h1,
.title-wrap h2 { margin: 0; }

.title-wrap h1 {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: clamp(32px, 5vw, 45px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -1.8px;
}

.title-wrap .brand {
  color: var(--orange);
  font-weight: 800;
}

.title-wrap h2 {
  margin-top: 13px;
  font-size: clamp(25px, 4vw, 33px);
  font-weight: 800;
  letter-spacing: -1px;
}

.call-form { width: 100%; }

.phone-box {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: .18s ease;
}

.phone-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,98,0,.10);
}

.phone-box.valid { border-color: rgba(32,185,104,.72); }
.phone-box.invalid { border-color: rgba(210,58,58,.72); }

.phone-prefix {
  width: 54px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--orange);
  border-right: 1px solid #eceef1;
}

.phone-prefix svg,
.valid-icon svg,
.primary-btn svg,
.secondary-btn svg,
.checkbox svg {
  width: 22px;
  height: 22px;
}

.phone-box input {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
}

.phone-box input::placeholder { color: #a2a6ae; }

.valid-icon {
  margin-right: 15px;
  color: var(--success);
  opacity: 0;
  transform: scale(.8);
  transition: .18s ease;
}

.phone-box.valid .valid-icon {
  opacity: 1;
  transform: scale(1);
}

.message {
  min-height: 20px;
  margin: 8px 4px 0;
  font-size: 13px;
  color: var(--danger);
}

.remember {
  width: fit-content;
  margin: 7px 2px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4f5664;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #d2d5db;
  border-radius: 6px;
  color: transparent;
  background: #fff;
  transition: .15s ease;
}

.remember input:checked + .checkbox {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.primary-btn,
#c2c_call_btn {
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff790a, var(--orange));
  box-shadow: 0 18px 30px rgba(255,98,0,.24);
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

#c2c_call_btn { display: flex !important; }

#c2c_call_btn svg {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px;
}

#c2c_call_btn span {
  display: inline-block;
  line-height: 1.2;
}

.primary-btn:hover,
#c2c_call_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 34px rgba(255,98,0,.30);
}

.primary-btn:active, #c2c_call_btn:active { transform: translateY(0); }
.primary-btn:disabled, #c2c_call_btn:disabled { opacity: .65; cursor: progress; }

.secondary-btn {
  margin: 24px auto 0;
  padding: 10px 7px;
  border: 0;
  background: transparent;
  color: #11356d;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,98,0,.50);
  text-underline-offset: 6px;
}

.status {
  min-height: 18px;
  margin-top: 13px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.status.success { color: var(--success); }
.status.error { color: var(--danger); }

.call-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.tool-btn {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #4f5664;
  background: #fff;
  cursor: pointer;
}

.tool-btn:hover { border-color: var(--orange); }
.tool-btn svg { width: 20px; height: 20px; }

#c2c_test_btn,
#c2c_self_video_chk_span {
  display: none !important;
}

.tool-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

#c2c_select_devices_div fieldset { border: 0; padding: 0; }
#c2c_select_devices_div label { display: grid; gap: 4px; margin: 8px 0; }
#c2c_select_devices_div select { width: 100%; min-height: 38px; }
#select_devices_done_btn, .close-modal {
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
}

#c2c_keypad_table { margin: auto; border-spacing: 8px; }
#c2c_keypad_table td {
  width: 52px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
  cursor: pointer;
}

.modal-container {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24,32,54,.48);
}

.content-modal {
  width: min(100%, 390px);
  padding: 26px;
  border-radius: 18px;
  text-align: center;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}

.content-modal h3 { margin-top: 0; }
.video-container video { max-width: 100%; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* TABLET */
@media (max-width: 768px) {
  .call-card {
    width: min(100%, 560px);
    padding: 42px 38px 38px;
  }
}

/* MOBILE */
@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 0% 100%, rgba(255,98,0,.13), transparent 18rem),
      radial-gradient(circle at 100% 0%, rgba(255,98,0,.10), transparent 18rem),
      #fff;
  }

  .page::before,
  .page::after {
    width: 520px;
    opacity: .7;
  }

  .page::before { top: -390px; right: -340px; }
  .page::after { bottom: -390px; left: -340px; }

  body::before,
  body::after {
    opacity: .18;
    transform: scale(.8);
  }

  .page {
    display: block;
    min-height: 100dvh;
    padding:
      max(18px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .call-card {
    width: 100%;
    min-height: calc(100dvh - 36px);
    padding: 30px 20px 26px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .logo {
    width: 104px;
    height: 104px;
    margin-bottom: 22px;
  }

  .logo span {
    font-size: 48px;
    letter-spacing: -4px;
  }

  .logo-image {
    width: 104px;
    height: 104px;
    margin-bottom: 22px;
  }

  .title-wrap {
    margin-bottom: 28px;
  }

  .title-wrap h1 {
    gap: 7px;
    font-size: 30px;
  }

  .title-wrap h2 {
    margin-top: 10px;
    font-size: 24px;
  }

  .phone-box {
    min-height: 60px;
    border-radius: 14px;
  }

  .phone-prefix {
    width: 48px;
  }

  .phone-box input {
    padding: 14px 12px;
    font-size: 18px;
  }

  .remember {
    margin-bottom: 24px;
    font-size: 15px;
  }

  .primary-btn,
  #c2c_call_btn {
    min-height: 60px;
    font-size: 19px;
    border-radius: 14px;
  }

  .secondary-btn {
    margin-top: 18px;
    font-size: 15px;
  }
}

/* SMALL MOBILE */
@media (max-width: 360px) {
  .call-card { padding-left: 16px; padding-right: 16px; }
  .title-wrap h1 { font-size: 27px; }
  .title-wrap h2 { font-size: 22px; }
  .phone-box input { font-size: 16px; }
}

/* LANDSCAPE MOBILE */
@media (max-height: 560px) and (orientation: landscape) {
  .page {
    display: grid;
    padding: 12px;
  }

  .call-card {
    min-height: auto;
    max-width: 520px;
    padding: 20px 28px;
  }

  .logo {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
  }

  .logo span { font-size: 33px; }

  .logo-image { width: 70px; height: 70px; margin-bottom: 12px; }

  .title-wrap {
    margin-bottom: 16px;
  }

  .title-wrap h1 { font-size: 25px; }
  .title-wrap h2 { margin-top: 5px; font-size: 20px; }

  .message { min-height: 14px; margin-top: 4px; }
  .remember { margin-bottom: 12px; }

  .primary-btn, #c2c_call_btn { min-height: 50px; }

  .secondary-btn {
    margin-top: 8px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
