@font-face {
  font-display: swap;
  font-family: "Alliance";
  src: url("https://infisical.com/_next/static/media/1ffe07d363e628e4-s.p.otf") format("opentype");
}

:root {
  --parchment: #f2e8cd;
  --parchment-light: #faf4e3;
  --ink: #17382d;
  --pine: #1a5140;
  --pine-light: #496d54;
  --terracotta: #a65e30;
  --line: rgba(50, 66, 43, 0.34);
  --error: #8e3424;
  --font: "Alliance", "Alliance No. 2", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--parchment); color: var(--ink); font-family: var(--font); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

.auth-layout {
  background-image:
    linear-gradient(90deg, rgba(247, 242, 225, 0.96) 0%, rgba(247, 242, 225, 0.82) 32%, rgba(247, 242, 225, 0.24) 55%, rgba(247, 242, 225, 0.03) 72%),
    url("/auth-watchtower-desktop.jpg");
  background-position: center;
  background-size: cover;
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}
.auth-layout::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E");
  content: "";
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.16;
  pointer-events: none;
  position: absolute;
  z-index: 4;
}

.auth-brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 20px;
  font-weight: 500;
  left: clamp(24px, 5vw, 72px);
  letter-spacing: -0.045em;
  position: absolute;
  text-decoration: none;
  top: 30px;
  z-index: 6;
}
.auth-brand svg { height: 31px; margin-right: 9px; width: 31px; }
.auth-brand path { fill: none; stroke: var(--terracotta); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.auth-brand circle { fill: var(--terracotta); }

.auth-panel {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: 86px clamp(24px, 6vw, 96px) 44px;
  position: relative;
  z-index: 5;
}
.auth-card {
  background: rgba(247, 239, 215, 0.91);
  border: 1px solid rgba(60, 69, 43, 0.48);
  box-shadow: inset 0 0 0 4px rgba(117, 91, 50, 0.08), 0 20px 55px rgba(48, 65, 43, 0.14);
  margin-right: auto;
  max-width: 410px;
  padding: 41px 38px 35px;
  position: relative;
  width: 100%;
}
.auth-card::before, .auth-card::after {
  border-color: var(--terracotta);
  border-style: solid;
  content: "";
  height: 13px;
  opacity: 0.65;
  pointer-events: none;
  position: absolute;
  width: 13px;
}
.auth-card::before { border-width: 1px 0 0 1px; left: 9px; top: 9px; }
.auth-card::after { border-width: 0 1px 1px 0; bottom: 9px; right: 9px; }
.auth-card h1 { font-size: 43px; font-weight: 400; letter-spacing: -0.05em; line-height: 1; margin: 0; }
.auth-subtitle { color: rgba(23, 56, 45, 0.68); font-size: 12px; line-height: 1.5; margin: 11px 0 24px; }
.auth-subtitle:empty { display: none; }

.google-button, .email-toggle-button, .submit-button {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 47px;
  width: 100%;
}
.google-button {
  background: #fff;
  border: 1px solid #9aa0a6;
  border-radius: 11px;
  box-shadow: none;
  color: #202124;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  justify-content: center;
  margin-bottom: 1em;
  min-height: 58px;
  overflow: hidden;
  padding: 0 18px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.google-button-content { align-items: center; display: flex; gap: 10px; justify-content: center; left: 50%; line-height: 20px; position: absolute; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.google-logo { display: block; height: 20px; width: 20px; }
.google-button-content [data-button-label] { display: block; line-height: 20px; }
.google-button:hover { background: #f8faff; border-color: #d2e3fc; box-shadow: 0 1px 4px rgba(66, 133, 244, 0.2); }
.google-button:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.auth-divider { align-items: center; color: rgba(23, 56, 45, 0.54); display: flex; font-size: 10px; gap: 12px; margin: 3px 0 19px; }
.auth-divider::before, .auth-divider::after { background: var(--line); content: ""; flex: 1; height: 1px; }
.email-toggle-button { background: var(--pine); border: 1px solid var(--pine); border-radius: 11px; color: var(--parchment-light); font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 20px; min-height: 58px; }
.email-toggle-button:hover { background: var(--pine-light); }
form { display: grid; }
input {
  background: rgba(255, 252, 240, 0.62);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  margin-bottom: 13px;
  min-height: 47px;
  outline: none;
  padding: 0 13px;
}
input::placeholder { color: rgba(23, 56, 45, 0.54); }
input:focus { background: rgba(255, 252, 240, 0.9); border-color: var(--terracotta); }
.submit-button { background: var(--pine); border: 1px solid var(--pine); border-radius: 0; color: var(--parchment-light); margin-top: 4px; }
.submit-button:hover { background: var(--pine-light); }
button:disabled { cursor: not-allowed; opacity: 0.55; }
.text-button, .back-button { background: transparent; border: 0; color: var(--pine); font-size: 12px; padding: 0; }
.text-button { margin-top: 15px; }
.back-button { justify-self: start; margin-bottom: 19px; }
.field-note { color: rgba(23, 56, 45, 0.68); font-size: 12px; line-height: 1.5; margin: 0 0 10px; }
.auth-message { color: var(--pine); font-size: 11px; line-height: 1.45; margin: 13px 0 0; min-height: 16px; text-align: center; }
.auth-message.error { color: var(--error); }
.auth-error { background: #efd9ce; border: 1px solid #c78571; color: #783327; font-size: 11px; line-height: 1.5; margin: 0 0 17px; padding: 11px; }

@media (max-width: 780px) {
  .auth-layout {
    background-image:
      linear-gradient(180deg, rgba(247, 242, 225, 0.9) 0%, rgba(247, 242, 225, 0.62) 42%, rgba(247, 242, 225, 0.04) 70%),
      url("/auth-watchtower-mobile.jpg");
    overflow: auto;
  }
  .auth-panel { align-items: flex-start; padding: 116px 18px 48vh; }
  .auth-card { margin: 0 auto; max-width: 430px; padding: 34px 26px 30px; }
  .auth-card h1 { font-size: 38px; }
}
