@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');

/* ----------------------------------------------------------------
   Able Subscriptions design tokens
   Motion: strong ease-out, short durations, no ease-in
   ---------------------------------------------------------------- */
:root {
  --blue: #135bec;
  --blue-hover: #0d4fd5;
  --ink: #15213a;
  --muted: #68758b;
  --line: #e6ebf3;
  --surface: #f6f9fe;
  --navy: #102850;
  --green: #15976a;
  --danger: #a92b3b;
  --radius: 18px;
  --shadow-soft: 0 18px 36px #193d7012;
  --shadow-lift: 0 28px 65px #17498424;

  /* Strong custom curves (built-in ease-out is too soft) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-hover: cubic-bezier(0.25, 1, 0.5, 1);

  --duration-press: 140ms;
  --duration-hover: 180ms;
  --duration-ui: 220ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 14px Manrope, system-ui, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Links only; button anchors set their own colors below */
a:not(.button) {
  color: var(--blue);
}

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */
.site-header {
  min-height: 76px;
  padding: 12px max(5vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffffed;
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-nav,
.header-actions,
footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.main-nav {
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
  min-width: 0;
}

.header-actions {
  gap: 10px;
  margin-left: auto;
}

.main-nav a,
footer a {
  color: #536179;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color var(--duration-hover) var(--ease-hover);
  white-space: nowrap;
}

.site-header .button {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover,
  footer a:hover {
    color: var(--blue);
  }
}

.site-header form {
  margin: 0;
}

.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  width: 29px;
  height: 29px;
}

.brand small {
  border-left: 1px solid #dbe2ed;
  padding-left: 9px;
  color: #7e899b;
  font-size: 9px;
  letter-spacing: 0.09em;
}

.language-toggle {
  border: 1px solid #dfe6f1;
  border-radius: 6px;
  padding: 5px 7px;
  color: var(--blue) !important;
  transition:
    border-color var(--duration-hover) var(--ease-hover),
    background-color var(--duration-hover) var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .language-toggle:hover {
    border-color: #b8c9e8;
    background: #f4f7fd;
  }
}

/* ----------------------------------------------------------------
   Buttons: clear colors on both <a> and <button>
   (beat global a { color: var(--blue) })
   ---------------------------------------------------------------- */
a.button,
button.button,
.button {
  border: 0;
  border-radius: 9px;
  padding: 12px 17px;
  font: 700 12px Manrope, system-ui, sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform var(--duration-press) var(--ease-out),
    background-color var(--duration-hover) var(--ease-hover),
    box-shadow var(--duration-hover) var(--ease-hover),
    border-color var(--duration-hover) var(--ease-hover),
    color var(--duration-hover) var(--ease-hover),
    opacity var(--duration-hover) var(--ease-hover);
  will-change: transform;
}

a.button:focus-visible,
button.button:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

a.button:active:not(:disabled),
button.button:active:not(:disabled),
.button:active:not(:disabled) {
  transform: scale(0.97);
}

a.button:disabled,
button.button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

/* Primary: white text on blue */
a.button.button-primary,
button.button.button-primary,
.button.button-primary,
a.button-primary,
button.button-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 16px #135bec28;
}

a.button.button-primary:visited,
a.button-primary:visited {
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  a.button.button-primary:hover:not(:disabled),
  button.button.button-primary:hover:not(:disabled),
  .button.button-primary:hover:not(:disabled),
  a.button-primary:hover:not(:disabled) {
    background: var(--blue-hover);
    color: #fff;
    transform: translateY(-1px);
  }

  a.button.button-primary:active:not(:disabled),
  button.button.button-primary:active:not(:disabled),
  .button.button-primary:active:not(:disabled) {
    color: #fff;
    transform: scale(0.97) translateY(0);
  }
}

/* Outline: blue text on white */
a.button.button-outline,
button.button.button-outline,
.button.button-outline,
a.button-outline,
button.button-outline {
  border: 1px solid #d5dfef;
  background: #fff;
  color: var(--blue);
}

a.button.button-outline:visited,
a.button-outline:visited {
  color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  a.button.button-outline:hover:not(:disabled),
  button.button.button-outline:hover:not(:disabled),
  .button.button-outline:hover:not(:disabled) {
    border-color: #b4c7e6;
    background: #f7faff;
    color: var(--blue);
  }
}

/* Quiet: dark blue text on light blue */
a.button.button-quiet,
button.button.button-quiet,
.button.button-quiet,
a.button-quiet,
button.button-quiet {
  background: #eef4ff;
  color: #31517e;
}

a.button.button-quiet:visited,
a.button-quiet:visited {
  color: #31517e;
}

@media (hover: hover) and (pointer: fine) {
  a.button.button-quiet:hover:not(:disabled),
  button.button.button-quiet:hover:not(:disabled),
  .button.button-quiet:hover:not(:disabled) {
    background: #e2ebff;
    color: #31517e;
  }
}

.button.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

/* ----------------------------------------------------------------
   Marketing / home
   ---------------------------------------------------------------- */
.hero {
  min-height: 620px;
  padding: 100px max(8vw, 38px);
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  gap: 80px;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 15%, #dceafe 0, transparent 27%),
    linear-gradient(110deg, #fbfdff, #f1f6ff);
}

.hero::before {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 70px solid #e5efff;
  right: -220px;
  bottom: -280px;
}

.hero > div,
.hero aside {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--blue);
  font-weight: 800;
  margin: 0 0 17px;
}

.hero h1,
.public-page h1 {
  font-size: clamp(44px, 5vw, 67px);
  line-height: 1.06;
  letter-spacing: -0.065em;
  margin: 0;
  max-width: 660px;
}

.hero h1 em,
.public-page h1 em,
h2 em {
  font: 500 italic 1em 'Playfair Display', serif;
  color: var(--blue);
}

.lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 555px;
  margin: 24px 0 30px;
}

.overview {
  background: #fff;
  border: 1px solid #dfe8f5;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-lift);
  max-width: 430px;
  justify-self: end;
  width: 100%;
}

.overview-card {
  background: linear-gradient(135deg, #155be9, #4c8bff);
  border-radius: 13px;
  padding: 23px;
  color: #fff;
}

.status {
  display: inline-block;
  background: #e1f9ec;
  color: #128153;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.status.pending {
  background: #fff6e5;
  color: #9a6700;
}

.status.active {
  background: #e1f9ec;
  color: #128153;
}

.overview-card h3 {
  font-size: 14px;
  margin: 13px 0 4px;
}

.overview-card b {
  font-size: 32px;
  display: block;
  margin: 30px 0 0;
}

.overview-card small {
  font-size: 11px;
  font-weight: 500;
}

.progress {
  height: 5px;
  background: #95bafa;
  border-radius: 9px;
  margin: 15px 0;
  overflow: hidden;
}

.progress i {
  display: block;
  width: 59%;
  height: 100%;
  background: #fff;
  border-radius: 9px;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 21px 3px 1px;
  color: #7c899d;
  font-size: 10px;
}

.mini-stats b {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-top: 7px;
}

.section,
.dashboard,
.public-page {
  padding: 105px max(8vw, 38px);
}

.section {
  background: #fff;
}

.section h2 {
  font-size: 45px;
  letter-spacing: -0.055em;
  margin: 0 0 40px;
}

/* Plan cards: lift on hover only for fine pointers; specific props only */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 29px;
  background: #fff;
  transition:
    transform var(--duration-ui) var(--ease-out),
    box-shadow var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: #cddcf2;
  }
}

/* Occasional list entrance. Short stagger. Does not block interaction. */
.plan {
  animation: plan-enter var(--duration-ui) var(--ease-out) both;
}

.plan:nth-child(1) { animation-delay: 0ms; }
.plan:nth-child(2) { animation-delay: 45ms; }
.plan:nth-child(3) { animation-delay: 90ms; }

@keyframes plan-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.plan h2,
.plan h3 {
  font-size: 23px;
  letter-spacing: -0.04em;
  margin: 6px 0 11px;
}

.plan > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
  min-height: 48px;
}

.plan strong {
  display: block;
  font-size: 22px;
  margin: 28px 0;
}

.plan strong small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.plan ul {
  padding: 0;
  list-style: none;
  color: #526178;
  font-size: 12px;
  line-height: 2.15;
}

.plan li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  margin-right: 10px;
}

.dark-section {
  background: var(--navy);
  color: #fff;
  padding: 95px max(8vw, 38px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
}

.dark-section h2 {
  font-size: 42px;
  letter-spacing: -0.055em;
  margin: 0;
}

.dark-section ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #385273;
}

.dark-section li {
  padding: 19px 0;
  border-bottom: 1px solid #385273;
  font-weight: 600;
}

.dark-section b {
  color: #91b9ff;
  margin-right: 16px;
}

/* ----------------------------------------------------------------
   Public pages / forms
   ---------------------------------------------------------------- */
.public-page {
  min-height: 72vh;
  background: linear-gradient(180deg, #f9fbff, #fff 380px);
}

.public-page h1 {
  max-width: 800px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 19px;
  margin-top: 45px;
}

.content-grid article,
.legal-copy {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 25px;
  color: var(--muted);
  line-height: 1.75;
}

.content-grid h2,
.legal-copy h2 {
  color: var(--ink);
  margin-top: 0;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 700px;
  margin-top: 38px;
  padding: 27px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 15px 35px #1b477512;
}

.contact-form label {
  font-weight: 700;
  font-size: 12px;
  color: #40506b;
}

.contact-form label:nth-of-type(3),
.contact-form label:nth-of-type(4),
.contact-form label:nth-of-type(5),
.contact-form button {
  grid-column: span 2;
}

.contact-form input,
.contact-form textarea,
.auth input,
.auth select,
.dashboard select {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 7px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  transition:
    border-color var(--duration-hover) var(--ease-hover),
    box-shadow var(--duration-hover) var(--ease-hover);
}

.auth input,
.auth select,
.dashboard select {
  margin-top: 6px;
  padding: 11px;
  border-color: #d6e0ed;
  border-radius: 7px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.auth input:focus,
.auth select:focus,
.dashboard select:focus {
  outline: none;
  border-color: #9bb6ef;
  box-shadow: 0 0 0 3px #135bec22;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.alert {
  background: #e7f0ff;
  color: #164caa;
  padding: 12px 14px;
  border-radius: 8px;
  /* Enter with opacity and a slight lift. Avoid scale(0). */
  animation: alert-in var(--duration-ui) var(--ease-out) both;
}

.alert.error {
  background: #fff0f1;
  color: var(--danger);
}

.checkout-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  animation: alert-in var(--duration-ui) var(--ease-out) both;
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----------------------------------------------------------------
   Auth + dashboard
   ---------------------------------------------------------------- */
.auth {
  background: var(--surface);
  min-height: calc(100vh - 135px);
  padding: 70px 20px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 18px 45px #1b477512;
  animation: alert-in 240ms var(--ease-out) both;
}

.auth-card h1 {
  font-size: 34px;
}

.auth-card form,
.dashboard form {
  display: grid;
  gap: 14px;
  margin: 25px 0;
}

.auth label,
.dashboard label {
  font-size: 12px;
  font-weight: 700;
  color: #43516a;
}

.dashboard h1 {
  font-size: 40px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
  margin-top: 38px;
}

.dashboard-grid > section,
.dashboard-grid > aside {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
}

.subscription {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  transition: background-color var(--duration-hover) var(--ease-hover);
}

.subscription:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.subscription h3 {
  margin: 10px 0 5px;
}

.subscription p {
  color: var(--muted);
  font-size: 12px;
}

footer {
  padding: 26px max(5vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #7c899d;
  font-size: 11px;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .site-header {
    min-height: 66px;
    padding: 10px 16px;
  }

  .header-actions {
    gap: 8px;
  }

  .site-header .button {
    padding: 10px 12px;
  }

  .hero,
  .dark-section,
  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 65px 24px;
    gap: 36px;
  }

  .overview {
    justify-self: start;
  }

  .section,
  .dashboard,
  .public-page {
    padding: 65px 24px;
  }

  .plans,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form label,
  .contact-form label:nth-of-type(3),
  .contact-form label:nth-of-type(4),
  .contact-form label:nth-of-type(5),
  .contact-form button {
    grid-column: span 1;
  }

  .dark-section {
    padding: 65px 24px;
  }

  footer {
    display: block;
  }

  footer nav {
    margin-top: 13px;
  }

  /* Shorter stagger on mobile list */
  .plan:nth-child(n) {
    animation-delay: 0ms;
  }
}
