/* emailinbox360 | site styles */
:root {
  --bg: #f8fafd;
  --ink: #121c31;
  --muted: #5d697d;
  --eyebrow: #064a9b;
  --accent: #098cfa;
  --cta: #0a5fd6;
  --cta-hover: #0852bb;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p, h1 { margin: 0; }
img { display: block; }

/* ============ 1440 (base) ============ */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 42px max(72px, calc((100% - 1296px) / 2)) 54px;
}

.brand-header {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.logo {
  width: 160px;
  height: 120px;
  object-fit: cover;
  flex-shrink: 0;
}
.descriptor {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.category {
  font-weight: 600;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* The hero fills the space between header and footer and centers its
   content. padding-top reproduces the Figma gap at the design height
   (900px), shrinks to 0 on shorter viewports, and never grows past it. */
.intro {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
  padding-top: clamp(0px, calc(100dvh - 836px), 64px);
}
.copy {
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
.eyebrow {
  font-weight: 400;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--eyebrow);
  white-space: nowrap;
}
.headline {
  font-weight: 400;
  font-size: 68px;
  line-height: 1.04;
  letter-spacing: -3.2px;
  color: var(--ink);
  width: 100%;
}
.description {
  font-weight: 400;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: -0.25px;
  color: var(--muted);
  width: 540px;
  max-width: 100%;
}
.illustration {
  --ill-w: 640.075px;
  --ill-reserve: 290px;
  width: max(180px, min(var(--ill-w), calc((100dvh - var(--ill-reserve)) * 1.2192)));
  height: auto;
  aspect-ratio: 1385 / 1136;
  max-width: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  flex-shrink: 0;
}

.quiet-note { display: none; }

/* ============ Invite form ============ */
.invite {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.invite-row {
  display: flex;
  gap: 10px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.invite-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  font: 400 16px/1 var(--font);
  letter-spacing: -0.1px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #d5dce8;
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.invite-input::placeholder { color: #8a94a6; }
.invite-input:hover { border-color: #b9c3d3; }
.invite-input:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(10, 95, 214, 0.18);
}
.invite-input[aria-invalid="true"],
.invite-input[aria-invalid="true"]:focus {
  border-color: #c62d3a;
  box-shadow: 0 0 0 3px rgba(198, 45, 58, 0.12);
}
.invite-button {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 24px;
  font: 600 15px/1 var(--font);
  letter-spacing: -0.1px;
  color: #ffffff;
  background: var(--cta);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.invite-button:hover { background: var(--cta-hover); }
.invite-button:active { background: var(--eyebrow); }
.invite-button:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
}
.invite-hint {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--muted);
}
.invite-error {
  font-size: 13px;
  line-height: 1.45;
  color: #c62d3a;
}
.invite-error:empty { display: none; }
.invite-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #eef5ff;
  border: 1px solid #cfe2fd;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.invite-success strong { font-weight: 600; }
.invite-success .check {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--cta);
  display: grid; place-items: center;
}
.invite-success[hidden], .invite[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .invite-input, .invite-button { transition: none; }
}

/* ============ Header actions ============ */
.logo-link { display: block; flex-shrink: 0; border-radius: 8px; }
.logo-link:focus-visible { outline: 2px solid var(--cta); outline-offset: 4px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  font: 600 14px/1 var(--font);
  letter-spacing: -0.1px;
  color: var(--ink);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #d5dce8;
  border-radius: 10px;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease;
}
.header-button:hover { border-color: #b9c3d3; background: #fdfdfe; }
.header-button:focus-visible { outline: 2px solid var(--cta); outline-offset: 3px; }

/* ============ Views ============ */
[data-view][hidden], [data-show-on][hidden], .auth-form[hidden] { display: none !important; }

/* ============ Login page ============ */
.auth {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}
.auth-panel {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.auth-heading {
  font-weight: 400;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -1.6px;
  color: var(--ink);
  outline: none;
}
.auth-sub {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.15px;
  color: var(--muted);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.field-label {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}
.text-link {
  font-weight: 500;
  font-size: 14px;
  color: var(--cta);
  text-decoration: none;
  border-radius: 4px;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.password-wrap { position: relative; display: flex; }
.password-wrap .invite-input { width: 100%; padding-right: 72px; }
.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 36px;
  padding: 0 12px;
  font: 500 13px/1 var(--font);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.toggle-password:hover { color: var(--ink); background: #f1f4f9; }
.toggle-password:focus-visible { outline: 2px solid var(--cta); outline-offset: 0; }
.field-error {
  font-size: 13px;
  line-height: 1.45;
  color: #c62d3a;
}
.field-error:empty { display: none; }
.auth-form .invite-button { width: 100%; margin-top: 4px; }
.form-alert {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #8f1f29;
  background: #fdf0f1;
  border: 1px solid #f4c9cd;
  border-radius: 12px;
}
.form-alert[hidden] { display: none; }
.form-alert .text-link { color: #8f1f29; text-decoration: underline; text-underline-offset: 3px; }
.auth-back { font-size: 14px; }
.invite-button[disabled] { opacity: .7; cursor: progress; }
.auth-foot {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid #e3e8f0;
}

/* ============ 1280 ============ */
@media (max-width: 1439px) {
  .page { padding: 30px 64px 40px; }
  .brand-header { height: 110px; }
  .logo { width: 144px; height: 108px; }
  .intro { gap: 38px; padding-top: clamp(0px, calc(100dvh - 728px), 72px); }
  .copy { gap: 52px; }
  .eyebrow { font-weight: 500; }
  .headline { font-size: 60px; letter-spacing: -2.8px; }
  .description { font-size: 18px; line-height: 1.52; letter-spacing: -0.2px; width: 490px; }
  .illustration { --ill-w: 576.677px; --ill-reserve: 270px; }
}

/* ============ 1024 ============ */
@media (max-width: 1279px) {
  .page { padding: 30px 52px 40px; }
  .intro { padding-top: clamp(0px, calc(100dvh - 696px), 72px); }
  .headline { font-size: 52px; }
  .description { width: 410px; }
  .illustration { --ill-w: 425.497px; }
}

/* ============ 768 ============ */
@media (max-width: 1023px) {
  .page { padding: 24px 48px 28px; }
  .brand-header { height: 100px; }
  .logo { width: 132px; height: 99px; }
  .descriptor { display: none; }
  .intro {
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding-top: clamp(0px, calc(100dvh - 932px), 92px);
  }
  .copy { flex: none; width: 100%; gap: 18px; }
  .eyebrow { white-space: normal; width: 100%; }
  .headline { font-size: 54px; }
  .description { font-size: 19px; width: 100%; }
  .illustration { --ill-w: 468.169px; --ill-reserve: 575px; }
}

/* ============ 480 ============ */
@media (max-width: 767px) {
  .page { padding: 24px 30px 28px; }
  .brand-header { height: 90px; }
  .auth-heading { font-size: 34px; letter-spacing: -1.2px; }
  .auth-sub { font-size: 16px; }
  .auth-panel { gap: 28px; }
  .logo { width: 116px; height: 87px; }
  .intro { padding-top: 0; }
  .copy { gap: 16px; }
  .headline { font-size: 46px; }
  .description { font-size: 17px; }
  .illustration { --ill-w: 329.181px; --ill-reserve: 560px; }

  .quiet-note {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
  }
  .rule {
    width: 42px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
  }
  .note {
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    letter-spacing: 0.3px;
    color: var(--muted);
    white-space: nowrap;
  }
}

/* ============ 360 ============ */
@media (max-width: 479px) {
  .page { padding: 24px 24px 28px; }
  .logo { width: 104px; height: 78px; }
  .copy { gap: 14px; }
  .eyebrow { font-size: 11px; letter-spacing: 1.5px; }
  .headline { font-size: 40px; letter-spacing: -1.8px; }
  .description { font-size: 16px; line-height: 1.45; }
  .illustration { --ill-w: 252.372px; --ill-reserve: 630px; }
  .quiet-note { gap: 12px; }
  .rule { width: 32px; }
  .note { font-size: 11px; white-space: normal; }
  .invite-row { flex-direction: column; }
  .invite-button { width: 100%; }
}

/* =====================================================================
   AI theme layer: ambient gradients, glass surfaces, gradient CTAs
   ===================================================================== */
:root {
  --grad-cta: linear-gradient(115deg, #1e5ef0 0%, #4a4ff0 45%, #7a3fe8 100%);
  --grad-cta-hover: linear-gradient(115deg, #1a54d8 0%, #4146dc 45%, #6c34d6 100%);
  --grad-text: linear-gradient(100deg, #1d6bf3 0%, #5a4ff2 55%, #9a4de6 100%);
  --grad-border: linear-gradient(120deg, rgba(30,94,240,.55), rgba(122,63,232,.45), rgba(9,180,250,.5));
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --hairline: rgba(18, 28, 49, 0.09);
}

body { position: relative; overflow-x: hidden; }
.page { position: relative; z-index: 1; }

/* Ambient aurora */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 78% 38%, rgba(64, 120, 255, 0.20), transparent 70%),
    radial-gradient(30vmax 26vmax at 92% 12%, rgba(140, 92, 255, 0.16), transparent 70%),
    radial-gradient(34vmax 28vmax at 12% 92%, rgba(9, 180, 250, 0.14), transparent 70%),
    radial-gradient(26vmax 22vmax at 40% 8%, rgba(120, 150, 255, 0.10), transparent 70%);
  filter: blur(8px);
  animation: aurora 22s ease-in-out infinite alternate;
}
/* Faint grid, faded toward the edges */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(18, 28, 49, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 28, 49, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2vmax, 1.5vmax, 0) scale(1.04); }
  100% { transform: translate3d(1.5vmax, -1vmax, 0) scale(1.02); }
}

/* Eyebrow pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    var(--grad-border) border-box;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px -8px rgba(40, 70, 200, 0.35);
  width: auto;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad-text);
  box-shadow: 0 0 0 3px rgba(74, 79, 240, 0.14);
  flex-shrink: 0;
}

/* Gradient headline words */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #3a54ee;
}

/* Illustration glow */
.intro { position: relative; }
.ill-glow { display: none; }
.illustration { position: relative; filter: drop-shadow(0 30px 60px rgba(30, 94, 240, 0.22)); }

/* Primary CTA */
.invite-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--grad-cta);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 8px 24px -8px rgba(74, 79, 240, 0.65),
    0 2px 6px -2px rgba(30, 94, 240, 0.4);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.invite-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-cta-hover);
  opacity: 0;
  transition: opacity .18s ease;
}
.invite-button::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.invite-button:hover { background: var(--grad-cta); transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 14px 30px -10px rgba(74, 79, 240, 0.75),
    0 3px 8px -2px rgba(30, 94, 240, 0.45); }
.invite-button:hover::before { opacity: 1; }
.invite-button:hover::after { left: 120%; }
.invite-button:active { background: var(--grad-cta); transform: translateY(0); }
.invite-button[disabled] { transform: none; }

/* Header / secondary button: glass with gradient border */
.header-button {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    var(--grad-border) border-box;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px -10px rgba(40, 70, 200, 0.45);
  transition: box-shadow .18s ease, transform .18s ease;
}
.header-button:hover {
  border-color: transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    var(--grad-border) border-box;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(74, 79, 240, 0.55);
}

/* Glass inputs */
.invite-input {
  background: var(--glass-strong);
  border-color: var(--hairline);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(18, 28, 49, 0.04);
}
.invite-input:hover { border-color: rgba(74, 79, 240, 0.28); }
.invite-input:focus {
  background: #ffffff;
  border-color: rgba(74, 79, 240, 0.7);
  box-shadow: 0 0 0 4px rgba(74, 79, 240, 0.14), 0 8px 24px -12px rgba(74, 79, 240, 0.45);
}

/* Success and alert panels */
.invite-success {
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(243, 246, 255, 0.9), rgba(243, 246, 255, 0.9)) padding-box,
    var(--grad-border) border-box;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
.invite-success .check { background: var(--grad-cta); }
.text-link { color: #3f4fe8; }

/* Login / reset as a glass card */
/* Site footer */
.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.copyright { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-links a:focus-visible { outline: 2px solid var(--cta); outline-offset: 3px; }
@media (max-width: 767px) {
  .site-footer { flex-direction: column-reverse; align-items: flex-start; gap: 10px; padding-top: 16px; font-size: 12px; }
  .footer-links { gap: 6px 20px; }
}
.link-button {
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: #3f4fe8;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover { color: var(--ink); }
.link-button:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.description-em { font-weight: 500; color: var(--ink); }
.auth { padding: 0; }
.auth-panel {
  gap: 24px;
  padding: 28px 32px;
  max-width: 448px;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.66)) padding-box,
    linear-gradient(140deg, rgba(255,255,255,.9), rgba(74,79,240,.28), rgba(9,180,250,.3)) border-box;
  -webkit-backdrop-filter: blur(20px) saturate(140%);
          backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(40, 60, 180, 0.35), 0 2px 8px rgba(18, 28, 49, 0.04);
}
.auth-foot { border-top-color: var(--hairline); }

@media (max-width: 479px) {
  .auth-panel { padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .eyebrow { padding: 6px 12px 6px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .invite-button, .invite-button::before, .invite-button::after, .header-button { transition: none; }
  .invite-button:hover, .header-button:hover { transform: none; }
}

/* Long addresses wrap instead of widening the confirmation box */
.invite-success { max-width: 100%; box-sizing: border-box; }
.invite-success p { min-width: 0; overflow-wrap: anywhere; }
