/* Havren sign-in experience
   Centered desktop auth shell with a focused mobile-first fallback.
   Scoped to .havren-login so signup/reset/MFA screens retain their existing UI. */

.havren-login{
  --login-navy:#0a3143;
  --login-navy-2:#0f4053;
  --login-teal:#0b9189;
  --login-teal-dark:#087b75;
  --login-mint:#dff6f2;
  --login-soft:#f5faf9;
  --login-text:#173443;
  --login-muted:#607985;
  --login-border:#d5e4e7;
  --login-danger:#b94755;
  position:relative;
  width:100%;
  min-height:100vh;
  min-height:100dvh;
  overflow:hidden;
  display:grid;
  place-items:center;
  padding:clamp(24px,4vw,52px) clamp(18px,3vw,44px);
  box-sizing:border-box;
  isolation:isolate;
  background:
    radial-gradient(circle at 16% 24%,rgba(149,222,214,.17),transparent 30%),
    radial-gradient(circle at 86% 16%,rgba(158,221,211,.22),transparent 28%),
    linear-gradient(135deg,#f8fbfa 0%,#f2f8f7 48%,#f7fbfa 100%);
  color:var(--login-text);
}

.havren-login *,
.havren-login *::before,
.havren-login *::after{box-sizing:border-box}

.login-backdrop{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.login-orb{position:absolute;border-radius:50%;filter:blur(1px)}
.login-orb-a{width:500px;height:500px;left:-250px;bottom:-255px;background:rgba(134,215,205,.12);border:1px solid rgba(99,183,174,.10)}
.login-orb-b{width:430px;height:430px;right:-250px;bottom:-160px;background:rgba(148,216,209,.11);border:1px solid rgba(99,183,174,.09)}

.login-leaf{
  position:absolute;
  width:128px;
  height:44px;
  border-radius:100% 0 100% 0;
  background:linear-gradient(135deg,rgba(65,151,135,.12),rgba(131,213,200,.04));
  border:1px solid rgba(84,166,151,.12);
  transform-origin:100% 100%;
}
.login-leaf-a{right:-18px;top:36px;transform:rotate(-27deg) scale(1.75)}
.login-leaf-b{right:55px;top:170px;transform:rotate(-48deg) scale(1.25)}
.login-leaf-c{left:-34px;bottom:130px;transform:rotate(34deg) scale(1.65)}

.login-stage{
  width:min(100%,1020px);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:24px;
}

.login-shell{
  width:100%;
  min-height:590px;
  display:grid;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  overflow:hidden;
  border:1px solid rgba(180,207,212,.76);
  border-radius:26px;
  background:rgba(255,255,255,.94);
  box-shadow:0 26px 70px rgba(20,61,75,.14),0 4px 16px rgba(20,61,75,.06);
  backdrop-filter:blur(12px);
}

.login-story{
  position:relative;
  overflow:hidden;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:42px 42px 34px;
  background:
    radial-gradient(circle at 20% 16%,rgba(255,255,255,.72),transparent 30%),
    linear-gradient(155deg,#eef9f7 0%,#e7f5f3 53%,#dcefeb 100%);
  border-right:1px solid rgba(187,211,215,.64);
}

.login-story::before{
  content:"";
  position:absolute;
  inset:auto -100px -165px 40px;
  height:330px;
  border-radius:50%;
  background:rgba(255,255,255,.42);
  transform:rotate(-10deg);
}

.login-story-brand,.login-form-brand{display:flex;align-items:center;gap:13px;position:relative;z-index:2}
.login-brand-mark{
  width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;
  border-radius:17px;
  background:linear-gradient(145deg,#24b8ab,#79dcd3);
  color:#07384a;font-weight:900;font-size:22px;
  box-shadow:0 10px 26px rgba(9,126,118,.16);
}
.login-brand-mark.small{width:42px;height:42px;flex-basis:42px;border-radius:12px;font-size:16px}
.login-story-brand strong,.login-form-brand strong{display:block;font-size:20px;letter-spacing:.045em;color:var(--login-navy);line-height:1}
.login-story-brand small,.login-form-brand small{display:block;margin-top:5px;font-size:10px;letter-spacing:.36em;font-weight:800;color:#39bdb2}
.login-form-brand strong{font-size:15px}.login-form-brand small{font-size:8px;letter-spacing:.3em}

.login-story-copy{position:relative;z-index:2;margin:54px 0 auto}
.login-eyebrow{display:block;margin-bottom:14px;font-size:10px;letter-spacing:.24em;font-weight:800;color:var(--login-teal)}
.login-story-copy h2{margin:0;max-width:330px;font-size:clamp(34px,3.3vw,44px);line-height:1.02;letter-spacing:-.035em;color:var(--login-navy)}
.login-story-copy>p{margin:18px 0 0;max-width:300px;font-size:15px;line-height:1.55;color:var(--login-muted)}

.login-benefits{list-style:none;margin:32px 0 0;padding:0;display:grid;gap:15px;max-width:330px}
.login-benefits li{display:grid;grid-template-columns:38px 1fr;align-items:center;gap:12px}
.login-benefits li>span{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.72);border:1px solid rgba(150,200,193,.46);color:var(--login-teal);font-weight:900}
.login-benefits strong{display:block;font-size:13px;color:var(--login-text)}
.login-benefits small{display:block;margin-top:2px;font-size:10.5px;line-height:1.35;color:var(--login-muted)}

.login-story-art{position:absolute;right:-4px;bottom:-8px;width:245px;height:180px;opacity:.75;pointer-events:none}
.story-stem{position:absolute;height:2px;background:rgba(44,145,132,.42);transform-origin:left center;border-radius:999px}
.stem-main{width:190px;left:10px;bottom:30px;transform:rotate(-38deg)}
.stem-branch{width:105px;left:68px;bottom:90px;transform:rotate(-73deg)}
.story-leaf{position:absolute;width:48px;height:19px;border-radius:100% 0 100% 0;background:rgba(64,166,151,.18);border:1px solid rgba(53,151,137,.26)}
.story-leaf-1{left:58px;bottom:56px;transform:rotate(5deg)}
.story-leaf-2{left:98px;bottom:88px;transform:rotate(-36deg)}
.story-leaf-3{left:137px;bottom:113px;transform:rotate(-10deg)}
.story-leaf-4{left:160px;bottom:73px;transform:rotate(29deg)}

.login-form-panel{display:flex;align-items:center;justify-content:center;padding:42px 48px;background:rgba(255,255,255,.97)}
.login-form-inner{width:min(100%,410px)}
.login-form-brand{width:max-content;margin:0 auto 26px}
.login-heading{text-align:center;margin-bottom:20px}
.login-heading h1{margin:0;color:var(--login-navy);font-size:34px;line-height:1.08;letter-spacing:-.035em}
.login-heading p{margin:9px 0 0;color:var(--login-muted);font-size:13.5px;line-height:1.45}

.login-notice{margin:0 0 18px;padding:11px 13px;border:1px solid #efc8cd;border-radius:10px;background:#fff5f6;color:#9d3d49;font-size:12px;line-height:1.4}

.login-form{display:grid;gap:16px}
.login-field{display:grid;gap:7px;color:#435f6b;font-size:12px;font-weight:750}
.login-input-wrap{position:relative;display:block}
.login-input-wrap>svg{position:absolute;left:14px;top:50%;width:18px;height:18px;transform:translateY(-50%);fill:none;stroke:#50707d;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;z-index:2}
.login-input-wrap input{
  width:100%;height:48px;margin:0;padding:0 42px 0 42px;
  border:1px solid #c9dade;border-radius:11px;background:#fff;
  color:var(--login-text);font:inherit;font-size:14px;font-weight:500;
  outline:none;box-shadow:0 1px 2px rgba(12,48,61,.02);
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.login-input-wrap input::placeholder{color:#82949c;opacity:1}
.login-input-wrap input:hover{border-color:#acc8cc}
.login-input-wrap input:focus{border-color:#27a99f;box-shadow:0 0 0 4px rgba(43,177,165,.12);background:#fff}
.login-input-wrap input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;-webkit-text-fill-color:var(--login-text)}

.login-submit{
  min-height:49px;margin-top:2px;border:0;border-radius:11px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px;
  background:linear-gradient(135deg,#078c84,#10a095);color:#fff;
  font-size:14px;font-weight:850;letter-spacing:.005em;
  box-shadow:0 11px 24px rgba(7,134,126,.19);
  transition:transform .14s ease,box-shadow .14s ease,filter .14s ease;
}
.login-submit:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(7,134,126,.23);filter:saturate(1.04)}
.login-submit:active{transform:translateY(0)}
.login-submit:focus-visible{outline:3px solid rgba(21,162,151,.28);outline-offset:3px}
.login-submit span{font-size:19px;line-height:1}

.login-help,.login-switch{text-align:center;margin:15px 0 0;font-size:12.5px;color:var(--login-muted)}
.login-help a,.login-switch a{color:var(--login-teal-dark);font-weight:800;text-decoration:none;text-underline-offset:3px}
.login-help a:hover,.login-switch a:hover{text-decoration:underline}
.login-divider{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:20px 0 0;color:#7d919a}
.login-divider span{height:1px;background:#dae5e7}.login-divider small{font-size:11px}
.login-switch{margin-top:18px}

.login-trust{width:min(100%,800px);text-align:center;color:var(--login-muted)}
.login-trust-title{display:block;margin-bottom:13px;font-size:8.5px;letter-spacing:.28em;font-weight:850;color:#718893}
.login-trust-items{display:grid;grid-template-columns:repeat(3,1fr);align-items:center;gap:0;font-size:11px}
.login-trust-items>span{display:flex;align-items:center;justify-content:center;gap:8px;min-height:24px;padding:0 18px;border-right:1px solid #d4e1e4}
.login-trust-items>span:last-child{border-right:0}
.login-trust-items b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:var(--login-teal);font-size:15px}

/* Medium screens keep the two-column character but reduce ornament and spacing. */
@media (max-width:980px){
  .havren-login{padding:24px}
  .login-stage{width:min(100%,860px)}
  .login-shell{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);min-height:560px}
  .login-story{padding:34px 30px 28px}
  .login-story-copy{margin-top:42px}
  .login-story-copy h2{font-size:34px}
  .login-benefits small{display:none}
  .login-form-panel{padding:36px 38px}
}

/* Mobile/tablet: prioritize the task. Marketing panel disappears, the form becomes
   a single centered card, and touch targets remain at least 48px high. */
@media (max-width:760px){
  .havren-login{
    display:block;
    min-height:100vh;
    min-height:100svh;
    overflow:auto;
    padding:max(24px,env(safe-area-inset-top)) 18px max(28px,env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 85% 0%,rgba(139,218,208,.22),transparent 34%),
      radial-gradient(circle at 8% 100%,rgba(139,218,208,.14),transparent 30%),
      linear-gradient(150deg,#f7fbfa,#f1f8f7);
  }
  .login-stage{width:100%;min-height:calc(100svh - 52px);justify-content:center;gap:18px}
  .login-shell{
    width:min(100%,500px);min-height:0;margin:auto;
    display:block;border-radius:22px;
    box-shadow:0 18px 44px rgba(20,61,75,.13),0 3px 10px rgba(20,61,75,.05);
  }
  .login-story{display:none}
  .login-form-panel{padding:34px 28px 30px;border:0}
  .login-form-inner{width:100%;max-width:420px}
  .login-form-brand{margin-bottom:24px}
  .login-heading h1{font-size:31px}
  .login-heading p{font-size:13px}
  .login-input-wrap input{height:50px;font-size:16px}
  .login-submit{min-height:51px;font-size:15px}
  .login-trust{width:min(100%,500px);margin:auto}
  .login-trust-title{margin-bottom:10px;font-size:8px}
  .login-trust-items{grid-template-columns:1fr;gap:7px}
  .login-trust-items>span{min-height:20px;border:0;padding:0;font-size:10.5px}
  .login-trust-items>span:nth-child(n+2){display:none}
  .login-orb-a{width:320px;height:320px;left:-200px;bottom:-170px}
  .login-orb-b{width:260px;height:260px;right:-160px;top:-80px;bottom:auto}
  .login-leaf{opacity:.58}
  .login-leaf-a{right:-48px;top:36px;transform:rotate(-31deg) scale(1.05)}
  .login-leaf-b{display:none}
  .login-leaf-c{left:-50px;bottom:80px;transform:rotate(32deg) scale(1.05)}
}

@media (max-width:420px){
  .havren-login{padding-left:12px;padding-right:12px}
  .login-form-panel{padding:28px 20px 26px}
  .login-form-brand{margin-bottom:21px}
  .login-brand-mark.small{width:39px;height:39px;flex-basis:39px}
  .login-heading{margin-bottom:18px}
  .login-heading h1{font-size:28px}
  .login-heading p{max-width:285px;margin:8px auto 0}
  .login-notice{margin-bottom:16px}
  .login-form{gap:14px}
  .login-divider{margin-top:18px}
  .login-switch{margin-top:16px}
}

@media (max-height:700px) and (min-width:761px){
  .havren-login{padding-top:20px;padding-bottom:20px;place-items:start center;overflow:auto}
  .login-stage{gap:15px}
  .login-shell{min-height:520px}
  .login-story{padding-top:30px;padding-bottom:26px}
  .login-story-copy{margin-top:32px}
  .login-benefits{margin-top:24px;gap:11px}
  .login-form-panel{padding-top:28px;padding-bottom:28px}
  .login-form-brand{margin-bottom:20px}
  .login-heading{margin-bottom:17px}
  .login-trust{padding-bottom:4px}
}

@media (prefers-reduced-motion:reduce){
  .login-submit,.login-input-wrap input{transition:none!important}
}
