/* Typography uses SF Pro system stack for an Apple-like feel */
:root {
  color-scheme: light;
  /* Warm light palette */
  --bg: #f6efe7;             /* warm beige background */
  --surface: #ffffff;        /* cards, inputs */
  --surface-2: #f6efe7;      /* header */
  --text: #2e261e;           /* deep cocoa */
  --text-secondary: #4a4a4a; /* supporting copy */
  --muted: #6b5748;          /* mocha */
  --border: #e8dccf;         /* light sand */
  --accent-rgb: 232 110 66;  /* base accent for reuse */
  --accent: rgb(var(--accent-rgb));
  --accent-2: rgb(196 124 80);
  --shadow: 0 8px 24px rgba(64, 46, 32, 0.12);
  --highlight-bg: rgba(232, 110, 66, 0.15);
  --highlight-text: var(--text);
  --placeholder: #8c7a6e;
  --toggle-bg: rgba(255, 255, 255, 0.78);
  --toggle-border: rgba(110, 93, 79, 0.24);
  --loader-base: rgba(0, 0, 0, 0.06);
  --loader-secondary: rgba(0, 0, 0, 0.08);
  --sun-color: #111111;
}

*::selection {
  background-color: rgba(255, 122, 50, 0.72);
  color: #2a1206;
}

*::-moz-selection {
  background-color: rgba(255, 122, 50, 0.72);
  color: #2a1206;
}

input::selection,
textarea::selection,
input::-moz-selection,
textarea::-moz-selection {
  background-color: rgba(255, 122, 50, 0.72);
  color: #2a1206;
}

html[data-theme="dark"] *::selection {
  background-color: rgba(248, 113, 113, 0.72);
  color: #1f0613;
}

html[data-theme="dark"] *::-moz-selection {
  background-color: rgba(248, 113, 113, 0.72);
  color: #1f0613;
}

html[data-theme="dark"] input::selection,
html[data-theme="dark"] input::-moz-selection,
html[data-theme="dark"] textarea::selection,
html[data-theme="dark"] textarea::-moz-selection {
  background-color: rgba(248, 113, 113, 0.72);
  color: #1f0613;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a1b;
  --surface: #171a1b;
  --surface-2: #171a1b;
  --text: #f6f8ff;
  --text-secondary: rgba(255, 255, 255, 0.88);
  --muted: #cad2e7;
  --border: rgba(255, 255, 255, 0.08);
  --accent-rgb: 236 72 153;
  --accent: rgb(var(--accent-rgb));
  --accent-2: rgb(248 113 113);
  --shadow: 0 26px 52px rgba(2, 6, 14, 0.6);
  --highlight-bg: rgba(236, 72, 153, 0.26);
  --highlight-text: #ffffff;
  --placeholder: rgba(202, 210, 227, 0.58);
  --toggle-bg: rgba(6, 8, 14, 0.88);
  --toggle-border: rgba(255, 255, 255, 0.12);
  --loader-base: rgba(255, 255, 255, 0.07);
  --loader-secondary: rgba(255, 255, 255, 0.11);
  --sun-color: #ffffff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background 0.4s ease, color 0.4s ease;
}

#app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  background: var(--bg);
  transition: background 0.4s ease;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.brand {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: center;
  position: relative;
  justify-self: center;
  transition: color 0.4s ease;
}

.brand-accent { color: var(--accent); font-style: italic; }
.brand-link { color: inherit; text-decoration: none; }

/* Plain logo variant: black text + icon */
.brand--plain {
  color: var(--text);
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.4s ease;
}
.brand--plain::after, .brand--plain::before { display: none; }
.logo-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
/* Make the logo icon the same visual height as the brand text */
.brand--plain .logo-ic svg {
  height: 1.15em; /* slightly larger than 1em to visually match text cap height */
  width: auto;
  display: block;
}
/* Slightly increase spacing between icon and text */
.brand--plain { gap: 12px; }

/* Playful but subtle underline and glow */
.brand::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 54%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: drop-shadow(0 2px 6px rgba(var(--accent-rgb), 0.35));
  border-radius: 4px;
}

.brand::before {
  content: '';
  position: absolute;
  inset: -10px -20px;
  background: radial-gradient(40% 40% at 50% 60%, rgba(var(--accent-rgb), 0.12), transparent 70%);
  pointer-events: none;
}

.nav { display: flex; gap: 16px; align-items: center; justify-content: flex-end; }
.nav { justify-self: end; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(15px, 2.2vw, 18px);
  padding: 10px 18px;
  border-radius: 999px;
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}
.nav-link:hover {
  color: var(--text);
  background-color: rgba(var(--accent-rgb), 0.14);
  transform: translateY(-1px);
}

.nav-area {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.nav-mobile {
  display: none;
}

.nav-select {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

[data-theme="dark"] .nav-select {
  background: rgba(23, 26, 27, 0.78);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 4px;
  border-radius: 50%;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--text);
  cursor: pointer;
  justify-self: start;
}
.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--sun-color);
}
.theme-toggle__icon .sun-icon {
  width: 1.45em;
  height: 1.45em;
  display: block;
}
.theme-toggle__icon .sun-icon circle,
.theme-toggle__icon .sun-icon path {
  stroke: currentColor;
}

.main {
  width: 100%;
  margin: 0 auto;
  max-width: 1000px;
  padding: 24px 16px 32px;
}

/* Generic page content containers */
.page {
  width: 100%;
  max-width: 900px;
  margin: 32px auto 64px;
  padding: 0 16px;
  text-align: center;
}
.page h1 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 5vw, 40px);
  margin: 8px 0 18px;
}
.page h2 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(22px, 3.8vw, 28px);
  margin: 24px 0 12px;
}
.page h3 {
  text-align: center;
}
.page p, .page li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}
.page ul, .page ol {
  text-align: left;
  display: inline-block;
  max-width: 100%;
}
.about-page .page p,
.about-page .page li {
  font-size: 22px;
  line-height: 1.8;
}
.info-page .page p,
.info-page .page li,
.info-page .text-section p,
.info-page .text-section__list,
.info-page .text-section__list li {
  font-size: 22px;
  line-height: 1.8;
}
.page a { color: var(--accent); text-decoration: none; }
.page a:hover { text-decoration: underline; }

/* Search */
.search-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 22px auto 28px;
  width: min(1000px, 92%);
}

/* Hero marketing section */
.hero {
  text-align: center;
  margin: 8px auto 8px;
  max-width: 900px;
  padding: 0 10px;
}
.headline {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 4.4vw, 36px);
  line-height: 1.18;
  margin: 8px 0 8px;
}
.sub {
  color: var(--muted);
  margin: 0 0 10px;
}
.accent { color: var(--accent); }

.search {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(16px, 2.2vw, 20px);
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.search::placeholder { color: var(--placeholder); }

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

.loader {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--loader-base);
  border-top-color: var(--accent);
  border-right-color: var(--loader-secondary);
  animation: spin 0.9s linear infinite;
}

[aria-hidden="true"].loader { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Grid of results */
.grid {
  display: grid;
  grid-template-columns: 1fr; /* wide, stacked vertically */
  gap: 14px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(246, 239, 231, 0.45);
  border: 1px solid rgba(232, 220, 207, 0.45);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

[data-theme="dark"] .card {
  background: rgba(23, 26, 27, 0.58);
  border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px) scale(1.01);
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.55);
}

/* Soft accent sweep on hover */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(var(--accent-rgb), 0.08) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  pointer-events: none;
}
.card:hover::after { transform: translateX(120%); }

/* Hover CTA overlay */
.card::before {
  content: 'Buy This Cologne';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; transform: translateY(0); }

/* Pop-in animation for dynamic results */
@keyframes popIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.pop-in {
  animation: popIn 380ms ease forwards;
}

/* Badge for popular items */
.badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(236,72,153,0.25);
}

/* Removed decorative gradients */

/* No labels; just names */

.card .name {
  font-size: clamp(18px, 3.2vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.card .dupe {
  font-size: clamp(15px, 2.8vw, 18px);
  font-weight: 600;
  color: var(--accent);
}

.card .chips {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.chip { display: none; }

@media (hover: none) {
  .card:hover { transform: none; }
}

/* Highlight for matched query */
.hl {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Content sections */

.content-section {
  text-align: center;
}

.content-section article {
  text-align: center;
}

.content-section h2 {
  text-align: center;
}

.content-section p {
  text-align: center;
}

.results-placeholder {
  display: grid;
  gap: 16px;
  padding: 8px 4px 0;
  color: var(--muted);
}

.results-placeholder h2 {
  margin: 0;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  color: var(--text);
}

.results-placeholder ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 18px;
  line-height: 1.6;
}

.results-placeholder__note {
  margin: 0;
  font-size: 0.92rem;
}

.text-section {
  max-width: 880px;
  margin: 48px auto;
  padding: 0 18px;
  display: grid;
  gap: 18px;
  text-align: center;
}

.text-section h2 {
  margin: 0;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(28px, 5vw, 40px);
}

.text-section h3 {
  text-align: center;
}

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

.text-section__list {
  margin: 0 auto;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.7;
  text-align: left;
  max-width: fit-content;
}

.text-section__list--numbered {
  list-style: decimal;
  padding-left: 22px;
}

.text-section__list--numbered strong {
  color: var(--text);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.98rem;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table th {
  font-weight: 700;
  color: var(--text);
}

.comparison-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.comparison-table a:hover {
  text-decoration: underline;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  text-align: left;
  max-width: 100%;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.faq-list details:last-child {
  border-bottom: none;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-list summary::after {
  content: '▾';
  font-size: 0.9em;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(180deg);
}

.faq-list p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.faq-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.faq-list a:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: 32px;
  padding: 36px 18px 28px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__content {
  display: grid;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .site-footer__content {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.site-footer__content p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer__links {
  display: grid;
  gap: 10px;
}

.site-footer__links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__legal {
  margin: 24px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.noscript-warning {
  margin: 32px auto;
  max-width: 600px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background: rgba(var(--accent-rgb), 0.06);
  padding: 24px 28px;
  text-align: center;
}

.noscript-warning h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 4vw, 24px);
}

.noscript-warning p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Blog pages */
.blog-list {
  display: grid;
  gap: 24px;
  text-align: center;
}

.blog-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(246, 239, 231, 0.45);
  border: 1px solid rgba(232, 220, 207, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .blog-card {
  background: rgba(23, 26, 27, 0.58);
  border-color: rgba(255, 255, 255, 0.05);
}

.blog-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.blog-card h2 {
  margin: 0 0 8px;
  font-size: clamp(18px, 3.2vw, 24px);
}

.blog-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-card .post-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}

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

/* Blog post pages */
.blog-post {
  text-align: center;
}

.blog-post header {
  margin-bottom: 32px;
}

.blog-post h1 {
  margin: 0 0 12px;
}

.blog-post .post-meta {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.blog-post h2 {
  margin: 32px 0 16px;
  text-align: center;
}

.blog-post h3 {
  margin: 24px 0 12px;
  text-align: center;
}

.blog-post p {
  margin: 16px 0;
  line-height: 1.8;
}

.blog-post ul,
.blog-post ol {
  text-align: left;
  display: inline-block;
  max-width: 100%;
  margin: 16px auto;
}

.blog-post hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 14px 16px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    padding: 2px;
  }

  .theme-toggle__icon {
    font-size: 1.15rem;
  }

  .theme-toggle__icon .sun-icon {
    width: 1.3em;
    height: 1.3em;
  }

  .nav-area {
    gap: 8px;
  }

  .nav {
    display: none;
  }

  .nav-mobile {
    display: block;
  }

  .nav-select {
    font-size: 14px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.7);
  }

  [data-theme="dark"] .nav-select {
    background: rgba(23, 26, 27, 0.64);
  }

  .text-section {
    margin: 40px auto;
    padding: 0 12px;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 12px 10px;
  }
}
