
:root {
  --bg: #f7f0e5;
  --surface: #fffaf3;
  --surface2: #eee2d3;
  --text: #302329;
  --muted: #78666a;
  --line: #dfcfc5;
  --lime: #7d2638;
  --lime2: #9b3448;
  --danger: #c84c4c;
  --yellow: #c28b32;
  --shadow: 0 20px 60px #51232b12;
}

:root[data-theme="dark"] {
  --bg: #241a20;
  --surface: #30232a;
  --surface2: #3b2a32;
  --text: #fff4e9;
  --muted: #c3adb1;
  --line: #57404a;
  --lime: #d76b76;
  --lime2: #f09a9e;
  --shadow: 0 20px 60px #0005;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.nav {
  height: 76px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  z-index: 10;
}

.brand {
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 15px;
}

.brand span,
.hero em {
  color: var(--lime2);
}

button,
a {
  font: inherit;
}

.nav button,
.brand {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.nav nav button {
  font-size: 13px;
}

.primary {
  background: var(--lime) !important;
  color: #fffaf3 !important;
  border: 0;
  border-radius: 6px;
  padding: 13px 19px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary:hover {
  background: var(--lime2) !important;
  transform: translateY(-1px);
}

.primary.small {
  padding: 9px 14px;
}

.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 19px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.secondary:hover {
  border-color: var(--lime2);
  background: var(--surface2);
}

.theme {
  border: 1px solid var(--line) !important;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.hero {
  min-height: 650px;
  padding: 110px clamp(24px, 9vw, 140px) 80px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at 80% 30%,
    color-mix(in srgb, var(--lime) 12%, transparent),
    transparent 28%
  );
}

.hero:after {
  content: "PG";
  position: absolute;
  right: -30px;
  bottom: -140px;
  font-size: 420px;
  font-weight: 900;
  color: color-mix(in srgb, var(--text) 3%, transparent);
  letter-spacing: -0.12em;
  z-index: 0;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.heading > span,
.portal-head > div > span,
.auth-card > span,
.next span {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--muted);
}

.hero i,
.active i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime2) 15%, transparent);
  margin-right: 10px;
}

.hero h1 {
  font-size: clamp(64px, 9vw, 124px);
  letter-spacing: -0.07em;
  line-height: 0.92;
  margin: 30px 0;
  max-width: 1000px;
}

.hero h1 em {
  font-style: normal;
}

.hero p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 650px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.browsers {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-top: 70px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.browsers b {
  color: var(--lime2);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 20px;
}

.risks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.risks div {
  padding: 28px clamp(24px, 5vw, 70px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-right: 1px solid var(--line);
}

.risks div:last-child {
  border: 0;
}

.risks strong {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.risks div:nth-child(1) strong {
  color: var(--lime2);
}

.risks div:nth-child(2) strong {
  color: var(--yellow);
}

.risks div:nth-child(3) strong {
  color: var(--danger);
}

.risks span {
  font-size: 12px;
  color: var(--muted);
}

.features,
.portal {
  padding: 95px clamp(24px, 7vw, 110px);
  min-height: 650px;
}

.heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.heading h2 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.05em;
  margin: 14px 0;
}

.heading p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}

.feature-grid article {
  padding: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 240px;
  transition: background 0.2s ease;
}

.feature-grid article:hover {
  background: var(--surface2);
}

.feature-grid article:nth-child(even) {
  border-right: 0;
}

.feature-grid article:nth-child(n + 3) {
  border-bottom: 0;
}

.feature-grid b {
  color: var(--lime2);
  font-size: 11px;
}

.feature-grid h3 {
  font-size: 23px;
  margin: 35px 0 13px;
}

.feature-grid p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.auth {
  min-height: 720px;
  display: grid;
  place-items: center;
  padding: 70px 20px;
  background: radial-gradient(
    circle at 50% 15%,
    color-mix(in srgb, var(--lime) 10%, transparent),
    transparent 34%
  );
}

.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.mark {
  color: var(--lime2);
  font-size: 28px;
  margin-bottom: 20px;
}

.auth-card h1 {
  font-size: 36px;
  letter-spacing: -0.04em;
  margin: 12px 0;
}

.auth-card > p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 27px;
}

.auth-card form,
.profile {
  display: grid;
  gap: 15px;
}

.auth-card label,
.profile label {
  font-size: 12px;
  font-weight: 700;
  display: grid;
  gap: 7px;
}

.auth-card input,
.profile input {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  outline: 0;
}

.auth-card input:focus,
.profile input:focus {
  border-color: var(--lime2);
}

.full {
  width: 100%;
  margin-top: 5px;
}

.link,
.auth-card form p button {
  background: transparent;
  border: 0;
  color: var(--lime2);
  cursor: pointer;
}

.link {
  text-align: right;
  font-size: 12px;
}

.auth-card form > p {
  text-align: center;
  font-size: 12px;
  margin: 4px;
}

.status {
  font-size: 12px;
  line-height: 1.5;
  border-left: 3px solid var(--lime2);
  padding: 10px;
  background: var(--surface2);
  overflow-wrap: anywhere;
}

.portal-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 50px;
}

.portal-head h1 {
  font-size: clamp(40px, 5vw, 70px);
  letter-spacing: -0.05em;
  margin: 12px 0;
}

.portal-head p {
  color: var(--muted);
}

.active {
  display: flex;
  align-items: center;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 280px;
}

.active div {
  display: grid;
  gap: 5px;
}

.active b {
  font-size: 11px;
  letter-spacing: 0.1em;
}

.active small {
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.metrics article {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
}

.metrics span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metrics strong {
  font-size: 32px;
}

.metrics small {
  color: var(--muted);
}

.next {
  margin-top: 35px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--surface2);
}

.next h2 {
  margin: 10px 0;
}

.next p {
  color: var(--muted);
  margin: 0;
}

.narrow {
  max-width: 800px;
  margin: auto;
}

.profile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 38px;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.downloads article {
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.downloads article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.downloads article > div {
  font-size: 30px;
  color: var(--lime2);
}

.downloads h3 {
  font-size: 22px;
  margin: 30px 0 8px;
}

.downloads p {
  color: var(--muted);
  min-height: 48px;
  font-size: 13px;
  line-height: 1.5;
}

.downloads a {
  margin-top: 20px;
}

.notice {
  border-left: 4px solid var(--yellow);
  background: var(--surface2);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin-top: 28px;
}

.notice p {
  color: var(--muted);
  margin: 6px 0 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(24px, 5vw, 76px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

footer b {
  color: var(--text);
}

footer a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

footer a:hover {
  color: var(--lime2);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.nav nav > span {
  display: contents;
}

.global-status {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 30;
  max-width: 420px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lime2);
  outline-offset: 3px;
}

#browser-list {
  line-height: 1.8;
}

.form-status {
  overflow-wrap: anywhere;
}

.brand img {
  vertical-align: middle;
  margin-right: 8px;
}

@media (max-width: 850px) {
  .nav {
    height: auto;
    padding: 18px 22px;
    align-items: flex-start;
    gap: 16px;
  }

  .nav nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    padding-top: 80px;
  }

  .hero h1 {
    font-size: clamp(52px, 12vw, 84px);
  }

  .actions,
  .portal-head,
  .next {
    align-items: stretch;
    flex-direction: column;
  }

  .risks,
  .metrics,
  .downloads {
    grid-template-columns: 1fr;
  }

  .risks div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article,
  .feature-grid article:nth-child(even),
  .feature-grid article:nth-child(n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-grid article:last-child {
    border-bottom: 0;
  }

  .browsers {
    flex-wrap: wrap;
    margin-top: 45px;
  }

  .active {
    min-width: 0;
  }

  .auth-card {
    padding: 30px 24px;
  }

  .features,
  .portal {
    padding: 70px 24px;
  }

  .feature-grid article {
    padding: 30px 24px;
  }

  .profile {
    padding: 26px 20px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* PhishGuard navbar branding */
.nav {
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  flex-shrink: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 1.5px;
}

.brand-text small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
}

.nav nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav nav button {
  transition: color 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

.nav nav button:hover {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .nav nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }
}


/* PhishGuard official project logo */
.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .brand-logo {
    width: 46px;
    height: 46px;
  }
}

/* Footer project and institution branding */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footer-brand strong {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 1.5px;
}

.institution-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.institution-brand img {
  width: 150px;
  max-width: 60vw;
  height: auto;
  object-fit: contain;
}

.institution-brand small {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 480px) {
  .institution-brand img {
    width: 125px;
  }
}
