:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e3e5e8;
  --text: #15171a;
  --muted: #7a808a;
  --blue: #0b84ff;
  --blue-dark: #0071e3;
  --radius: 5px;
  --shadow: 0 6px 22px rgba(20, 30, 50, .10);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background-color: var(--bg);
  /* faint paper texture, fading out toward the bottom */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' seed='4'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.58  0 0 0 0 0.62  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(#f4f5f6, #ffffff 70%);
  background-size: 600px 600px, 100% 100%;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 460px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
}

.logo {
  justify-self: start;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .08em;
}

.nav-search { position: relative; }

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 13px 46px 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  box-shadow: var(--shadow);
}

#search::placeholder { color: var(--muted); }

#search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 132, 255, .18), var(--shadow);
}

#results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(60vh, 380px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(20, 30, 50, .16);
}

#results[hidden] { display: none; }

#results li {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

#results li.active,
#results li:hover { background: #eef5ff; }

#results li.note { color: var(--muted); cursor: default; }
#results li.note:hover { background: none; }

.nav-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
}

.btn {
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

/* "Sign in" is the solid blue one, like Log In on the reference */
.btn-ghost { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 500; }
.btn-ghost:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-solid { background: #fff; color: var(--text); border-color: var(--line); }
.btn-solid:hover { border-color: #c5c9cf; background: #fafafa; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(11, 132, 255, .5);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 78px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px 20px 110px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 10.5vw, 7.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.accent { color: var(--blue); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 34px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(11, 132, 255, .30);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.cta svg { transition: transform .18s ease; }
.cta:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(11, 132, 255, .38); }
.cta:hover svg { transform: translateX(4px); }

/* entrance animation */
.hero h1, .hero .cta { animation: rise .6s ease-out both; }
.hero .cta { animation-delay: .1s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 14px 34px rgba(20, 30, 50, .25);
  z-index: 30;
}

.toast[hidden] { display: none; }

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  .nav {
    grid-template-columns: auto 1fr;
    padding: 14px 16px;
  }
  .nav-search { grid-column: 1 / -1; grid-row: 2; }
  .nav-actions { grid-column: 2; grid-row: 1; }
  .hero { min-height: calc(100vh - 124px); padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero .cta { animation: none; }
  .cta, .cta svg, .btn { transition: none; }
}
