:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #16171a;
  --muted: #666a73;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --border: #e6e6e9;
  --card-bg: #f7f7f9;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.05), 0 1px 1px rgba(20, 20, 30, 0.04);
  --shadow-md: 0 8px 20px rgba(20, 20, 30, 0.08), 0 2px 6px rgba(20, 20, 30, 0.05);
  --shadow-lg: 0 16px 40px rgba(20, 20, 30, 0.14), 0 4px 10px rgba(20, 20, 30, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --fg: #f1f1f3;
    --muted: #a3a6ad;
    --accent: #5b9bff;
    --accent-2: #a78bfa;
    --accent-soft: rgba(91, 155, 255, 0.16);
    --border: #26282e;
    --card-bg: #17181c;
    --nav-bg: rgba(16, 17, 20, 0.72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

.brand-icon {
  width: 3px;
  height: 3px;
  border-radius: 1px;
  box-shadow: var(--shadow-sm);
}

nav a {
  color: var(--fg);
  text-decoration: none;
  opacity: 0.75;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}

nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

nav a.nav-cta {
  opacity: 1;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
}

nav a.nav-cta:hover {
  opacity: 0.9;
  text-decoration: none;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.3rem;
  font-weight: 650;
  margin-top: 2rem;
}

a {
  color: var(--accent);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 340px;
  padding: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  box-shadow: none;
}

button.secondary:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--accent);
  color: var(--accent);
}

.error-message {
  color: #e5484d;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.signed-in-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#product-list {
  display: grid;
  gap: 1rem;
}

.product-card {
  display: flex;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--border);
}

.product-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.product-description {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.product-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-message {
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Landing page */

main.landing {
  max-width: 920px;
}

.hero {
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 750;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--fg) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 1.75rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.availability {
  text-align: center;
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  margin: 2rem 0 1rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}

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