:root {
  --red: #d40008;
  --red-dark: #8d0006;
  --red-deep: #4c0004;
  --black: #030303;
  --ink: #151515;
  --muted: #62646d;
  --line: #e4e6eb;
  --white: #ffffff;
  --yellow: #f7b800;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f6f7f9;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 68px;
  padding: 9px clamp(18px, 4.4vw, 64px);
  color: var(--white);
  background: #000;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

.brand,
.header-nav,
.header-action,
.login-card-brand,
.login-note,
.login-links,
.feature-card,
.accounts-strip,
.accounts-heading,
.account-list,
.account-list a,
.site-footer,
.site-footer div {
  display: flex;
  align-items: center;
}

.brand {
  min-width: max-content;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.brand-logo {
  width: clamp(150px, 16vw, 205px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(151, 35, 10, 0.13));
}

.header-nav {
  gap: clamp(16px, 2.4vw, 34px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 650;
}

.header-nav a {
  transition: color 180ms ease, transform 180ms ease;
}

.header-nav a:hover {
  color: var(--yellow);
  transform: translateY(-1px);
}

.header-action {
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border: 1.5px solid var(--yellow);
  border-radius: 7px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 55%, rgba(255, 31, 31, 0.35), transparent 28%),
    linear-gradient(105deg, #9b0004 0%, #6e0004 44%, #030303 44.2%, #090909 100%);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  inset: auto -10% 0 24%;
  height: 230px;
  content: "";
  background: linear-gradient(155deg, transparent 25%, rgba(255, 20, 24, 0.9) 25.2%, rgba(120, 0, 6, 0.96) 50%, transparent 50.3%);
  opacity: 0.86;
  transform: skewY(-12deg);
}

.hero-section::after {
  inset: 12% -18% auto 46%;
  height: 180px;
  opacity: 0.42;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(240px, 0.42fr) minmax(380px, 0.94fr);
  align-items: center;
  gap: clamp(20px, 3.2vw, 46px);
  width: min(1500px, calc(100% - 120px));
  min-height: 530px;
  margin: 0 auto;
  padding: 54px 0 34px;
}

.hero-copy {
  padding-bottom: 22px;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: clamp(3rem, 4.3vw, 4.7rem);
  line-height: 1.09;
  letter-spacing: 0;
}

.hero-copy h1 span,
.login-card h2 span,
.login-links span {
  color: var(--red);
}

.hero-copy p {
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1.1rem, 1.45vw, 1.45rem);
  line-height: 1.55;
}

.powered-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 12px 17px;
  color: #fff;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.powered-badge svg {
  color: var(--yellow);
  fill: var(--yellow);
  stroke: #111;
}

.mail-visual {
  position: relative;
  min-height: 320px;
  align-self: end;
}

.app-icon-hero {
  position: absolute;
  left: 26px;
  top: 14px;
  width: 94px;
  height: 94px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.24));
  transform: rotate(-8deg);
}

.mail-visual::before {
  position: absolute;
  left: -26%;
  bottom: 54px;
  width: 310px;
  height: 110px;
  content: "";
  border: 3px dashed rgba(255, 255, 255, 0.85);
  border-top: 0;
  border-right: 0;
  border-radius: 0 0 0 100%;
  transform: rotate(-14deg);
}

.paper-plane {
  position: absolute;
  left: -70px;
  top: 126px;
  width: 90px;
  height: 54px;
  background: linear-gradient(145deg, #fff 0 45%, #dcdde2 46% 100%);
  clip-path: polygon(0 32%, 100% 0, 62% 100%, 48% 55%);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.28));
  transform: rotate(-18deg);
}

.envelope {
  position: absolute;
  right: 8px;
  bottom: 58px;
  width: 245px;
  height: 170px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbfbfb, #dadde3);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28);
}

.envelope::before {
  position: absolute;
  left: 34px;
  top: -36px;
  width: 176px;
  height: 176px;
  content: "";
  background: linear-gradient(135deg, #232323, #0d0d0d);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  transform: rotate(45deg);
}

.letter {
  position: absolute;
  left: 38px;
  top: -58px;
  z-index: 2;
  width: 170px;
  height: 150px;
  padding: 32px 28px;
  background: linear-gradient(#fff, #f5f0f0);
  border-radius: 7px;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.12);
}

.letter span,
.letter i {
  display: block;
  height: 5px;
  margin-bottom: 17px;
  background: #c6bfc1;
  border-radius: 999px;
}

.letter span {
  height: 8px;
  width: 88px;
  background: var(--red);
}

.letter i:nth-child(3) {
  width: 82%;
}

.letter i:nth-child(4) {
  width: 66%;
}

.envelope-front {
  position: absolute;
  inset: 52px 0 0;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(33deg, #fff 0 49.5%, transparent 50%),
    linear-gradient(-33deg, #fff 0 49.5%, transparent 50%),
    linear-gradient(#f4f4f4, #dfe2e8);
  border-radius: 0 0 10px 10px;
}

.envelope-front img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 19px;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.12));
}

.check-orb,
.lock-orb,
.at-orb,
.cloud-orb {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
}

.check-orb {
  right: -8px;
  top: 76px;
  width: 58px;
  height: 58px;
  background: var(--yellow);
}

.check-orb::before {
  width: 26px;
  height: 14px;
  content: "";
  border: 6px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -2px);
}

.lock-orb {
  left: 6px;
  bottom: 40px;
  width: 70px;
  height: 76px;
  background: linear-gradient(#d50009, #8b0006);
  border-radius: 9px;
}

.lock-orb::before {
  position: absolute;
  top: -36px;
  width: 44px;
  height: 44px;
  content: "";
  border: 8px solid #151515;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
}

.lock-orb::after {
  width: 12px;
  height: 24px;
  content: "";
  background: #030303;
  border-radius: 999px;
  clip-path: polygon(50% 0, 100% 34%, 72% 100%, 28% 100%, 0 34%);
}

.at-orb {
  left: 92px;
  bottom: 10px;
  width: 66px;
  height: 66px;
  color: #f6000a;
  font-size: 2.2rem;
  font-weight: 900;
  background: #151515;
  border: 2px solid #2b2b2b;
}

.cloud-orb {
  right: -68px;
  bottom: 30px;
  width: 96px;
  height: 50px;
  background: #151515;
  border: 2px solid #333;
}

.cloud-orb::before,
.cloud-orb::after {
  position: absolute;
  content: "";
  background: #151515;
  border: 2px solid #333;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.cloud-orb::before {
  left: 18px;
  top: -25px;
  width: 48px;
  height: 42px;
}

.cloud-orb::after {
  right: 14px;
  top: -16px;
  width: 38px;
  height: 30px;
}

.login-card {
  width: 100%;
  padding: clamp(28px, 3vw, 46px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.login-card-brand {
  gap: 14px;
  margin-bottom: 24px;
}

.login-brand-logo {
  width: clamp(150px, 13vw, 198px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(151, 35, 10, 0.14));
}

.login-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.login-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.08rem);
  line-height: 1;
}

.login-form {
  display: grid;
  gap: 11px;
}

.login-form label {
  margin-top: 4px;
  font-weight: 800;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  color: #8a8f9d;
  background: #fff;
  border: 1px solid #cfd3da;
  border-radius: 5px;
  box-shadow: 0 7px 18px rgba(30, 34, 44, 0.04) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(212, 0, 8, 0.11);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 48px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  background: transparent;
  border: 0;
  outline: 0;
}

.input-wrap input::placeholder {
  color: #7c8190;
}

.eye-icon {
  margin-left: auto;
}

.login-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 12px;
  color: #fff;
  font: inherit;
  font-size: 1.22rem;
  font-weight: 850;
  background: linear-gradient(180deg, #e00008, #bd0007);
  border: 0;
  border-radius: 5px;
  box-shadow: 0 14px 24px rgba(212, 0, 8, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.login-form button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 18px 34px rgba(212, 0, 8, 0.32);
}

.login-note {
  justify-content: center;
  gap: 9px;
  margin: 18px 0 20px;
  color: #666a74;
  font-size: 0.98rem;
}

.login-links {
  justify-content: space-between;
  gap: 16px;
  padding-top: 17px;
  color: #595d66;
  border-top: 1px solid var(--line);
}

.login-links a:last-child {
  color: var(--red);
}

.content-section {
  background: #f8f9fb;
}

.content-inner {
  width: min(1360px, calc(100% - 120px));
  margin: 0 auto;
  padding: 14px 0 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  gap: 20px;
  min-height: 145px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #e1e4ea;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  place-items: center;
  color: #fff;
  border-radius: 999px;
}

.feature-icon svg {
  width: 42px;
  height: 42px;
}

.icon-red {
  background: linear-gradient(180deg, #e00008, #b90006);
}

.icon-black {
  background: #000;
}

.icon-yellow {
  background: var(--yellow);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.feature-card p {
  margin: 0;
  color: #333741;
  font-size: 0.98rem;
  line-height: 1.45;
}

.accounts-strip {
  gap: 26px;
  margin-top: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #dfe2e8;
  border-radius: 8px;
}

.accounts-heading {
  gap: 15px;
  min-width: 330px;
  color: var(--red);
}

.accounts-heading svg {
  width: 42px;
  height: 42px;
}

.accounts-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
}

.accounts-heading p {
  margin: 3px 0 0;
  color: #5b5f69;
}

.account-list {
  flex: 1;
  justify-content: space-between;
  gap: 12px;
}

.account-list a {
  position: relative;
  gap: 12px;
  min-width: 0;
  color: #22252c;
  font-size: 0.95rem;
  white-space: nowrap;
}

.account-list a + a {
  padding-left: 22px;
  border-left: 1px solid #c8ccd4;
}

.account-list svg {
  flex: 0 0 auto;
  color: var(--red);
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 20px clamp(22px, 5vw, 78px);
  color: rgba(255, 255, 255, 0.92);
  background: #000;
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 36px;
}

.site-footer a:first-child {
  color: var(--yellow);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: min(430px, calc(100% - 40px));
  padding: 14px 16px;
  color: #fff;
  font-weight: 800;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  animation: fadeUp 620ms ease both;
}

.mail-visual.fade-up {
  animation-delay: 80ms;
}

.login-card.fade-up {
  animation-delay: 130ms;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .hero-inner,
  .content-inner {
    width: min(100% - 44px, 940px);
  }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
    min-height: auto;
    padding: 46px 0;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .mail-visual {
    min-height: 290px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .accounts-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .account-list a {
    white-space: normal;
  }

  .account-list a + a {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    padding: 9px 14px;
  }

  .header-nav {
    justify-content: flex-end;
    gap: 10px;
    width: auto;
    margin-left: auto;
    font-size: 0.92rem;
  }

  .header-nav a:not(.header-action) {
    display: none;
  }

  .header-action {
    min-height: 38px;
    padding: 0 12px;
  }

  .brand-logo {
    width: min(158px, 48vw);
  }

  .hero-section {
    background:
      linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
      linear-gradient(145deg, #9b0004 0%, #5f0004 58%, #080808 58.3%, #050505 100%);
    background-size: 24px 24px, 24px 24px, auto;
  }

  .hero-inner,
  .content-inner {
    width: min(100% - 28px, 100%);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 36px 0;
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 11vw, 3.3rem);
  }

  .mail-visual {
    min-height: 260px;
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
  }

  .envelope {
    right: 40px;
    width: 220px;
    transform: scale(0.88);
    transform-origin: bottom center;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-card-brand {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .login-divider {
    display: none;
  }

  .login-card h2 {
    width: 100%;
    font-size: 1.75rem;
  }

  .login-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-card {
    align-items: flex-start;
  }

  .accounts-heading {
    min-width: 0;
  }

  .account-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }

  .site-footer div {
    justify-content: flex-start;
    gap: 18px;
  }
}

@media (max-width: 460px) {
  .header-action {
    justify-content: center;
    width: auto;
    font-size: 0.84rem;
  }

  .feature-card {
    flex-direction: column;
  }

  .feature-icon {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
