:root {
  color-scheme: light;
  --ink: #130f33;
  --muted: #716d83;
  --line: #d6dae4;
  --paper: #f5f6fa;
  --white: #fff;
  --aqua: #7ed0d6;
  --aqua-soft: #dff4f5;
  --lavender: #aaa5be;
  --lavender-soft: #e7e5ef;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(126, 208, 214, .28), transparent 28rem),
    var(--paper);
  font-family: Inter, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.page-shell {
  width: min(100% - 48px, 1240px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  padding: 10px 0;
  transition: opacity .2s ease;
}

.brand-lockup {
  align-items: center;
  gap: 38px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .2s ease;
}

.brand-lockup:hover { opacity: .66; }

.brand-product {
  min-width: max-content;
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.brand-product strong {
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 7px;
  font-size: 23px;
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.045em;
}

.brand-product span {
  margin-top: auto;
  margin-bottom: -1px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
}

.brand:hover { opacity: .66; }
.brand img {
  display: block;
  width: 148px;
  height: 50px;
  object-fit: contain;
  filter: invert(1);
}

.header-label,
footer {
  font-size: 12px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.user-area { display: flex; align-items: center; gap: 16px; }
.user-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.user-meta strong { font-size: 14px; font-weight: 700; }
.user-meta span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.logout-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.logout-button:hover { background: var(--white); }
.logout-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { flex: 1; }

.intro {
  padding: 74px 0 50px;
}

h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(52px, 6.5vw, 94px);
  font-weight: 550;
  line-height: .92;
  letter-spacing: -.065em;
}

.services {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 56px;
}

.service-card {
  min-height: 136px;
  padding: clamp(20px, 2vw, 26px);
  border: 1px solid rgba(21, 21, 21, .11);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  overflow: hidden;
}

.service-card--potential { background: var(--aqua-soft); }
.service-card--demand { background: var(--lavender-soft); }
.service-card--analytics { background: #e9efe9; }
.service-card--pages { background: #f2e9dc; }
.service-card--seo-express { background: #e7eef5; }
.service-card--keywords { background: #f1e8f3; }

.card-topline {
  width: 100px;
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.service-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
}

.service-icon svg {
  width: 35px;
  height: 35px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-number {
  color: rgba(21, 21, 21, .45);
  font-size: 13px;
  letter-spacing: .12em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.card-copy {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -.055em;
}

.card-copy p {
  margin: 0;
  max-width: 780px;
  color: rgba(19, 15, 51, .78);
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.45;
}

.service-link {
  width: min(100%, 235px);
  min-height: 56px;
  flex: 0 0 235px;
  padding: 0 22px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease;
}

.service-link:hover { transform: translateY(-3px); background: #302a58; }
.service-link:focus-visible, .brand:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.service-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

footer {
  min-height: 78px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

@media (max-width: 780px) {
  .page-shell { width: min(100% - 28px, 1240px); }
  .site-header { min-height: 88px; }
  .brand img { width: 124px; height: auto; }
  .brand-lockup { gap: 26px; }
  .brand-product { height: 42px; }
  .brand-product strong { margin-top: 6px; font-size: 19px; }
  .brand-product span { font-size: 8px; }
  .user-meta { display: none; }
  .intro { padding: 50px 0 34px; }
  h1 { font-size: clamp(44px, 13vw, 68px); }
  .services { padding-bottom: 36px; }
  .service-card {
    min-height: 0;
    padding: 22px;
    border-radius: 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .card-topline {
    width: 100%;
    flex: none;
  }
  .service-number {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .service-link {
    width: 100%;
    flex: none;
  }
  footer { min-height: 70px; font-size: 10px; }
}

/* Login */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 15%, rgba(126, 208, 214, .48), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(170, 165, 190, .45), transparent 30rem),
    var(--paper);
}

.login-shell { width: min(100%, 470px); }
.login-brand { display: inline-flex; margin-bottom: 34px; }
.login-brand img { display: block; width: 148px; height: 50px; }
.login-card {
  padding: clamp(30px, 7vw, 48px);
  border: 1px solid rgba(19, 15, 51, .12);
  border-radius: 28px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 26px 80px rgba(19, 15, 51, .1);
  backdrop-filter: blur(12px);
}
.login-card h1 { margin: 0 0 12px; font-size: clamp(30px, 6vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.login-intro { margin: 0 0 34px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.login-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field span { font-size: 13px; font-weight: 700; }
.form-field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.form-field input:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(126, 208, 214, .22); }
.login-submit {
  height: 58px;
  margin-top: 8px;
  border: 0;
  border-radius: 100px;
  color: var(--white);
  background: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-submit:hover { background: #302a58; }
.recovery-link {
  width: 100%;
  margin-top: 24px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.modal {
  width: min(calc(100% - 32px), 480px);
  padding: clamp(26px, 6vw, 40px);
  border: 1px solid rgba(19, 15, 51, .12);
  border-radius: 24px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 28px 100px rgba(19, 15, 51, .24);
}
.modal::backdrop { background: rgba(19, 15, 51, .54); backdrop-filter: blur(5px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal h2 { margin: 0; font-size: clamp(26px, 6vw, 34px); letter-spacing: -.035em; }
.modal p { margin: 16px 0 26px; color: var(--muted); line-height: 1.45; }
.modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.recovery-form { display: grid; gap: 16px; }
.alert-modal { text-align: center; }
.alert-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8e2342;
  background: #ffe3ea;
  font-size: 30px;
  font-weight: 700;
}
.alert-modal--success .alert-icon { color: #176269; background: var(--aqua-soft); }
.alert-modal h2 { margin-bottom: 10px; }
.alert-modal p { margin: 0 0 24px; }
.alert-modal button { width: 100%; }

.access-card { text-align: center; }
.access-card h1 { margin-bottom: 34px; font-size: clamp(25px, 4.5vw, 32px); line-height: 1.16; }
.access-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--aqua-soft);
}
.access-icon svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.access-submit { display: flex; align-items: center; justify-content: center; text-decoration: none; }

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