/* HomeLabCore — public site
   Plain CSS, no framework, no build step.

   Two intentional accent identities:
     HomeLabCore  -> blue / navy (from the logo)   [default]
     CookFrom     -> warm orange                   [data-brand="cookfrom"]
*/

:root {
  color-scheme: dark;

  /* shared surfaces */
  --bg: #0b0d10;
  --bg-elevated: #101318;
  --surface: #14171d;
  --surface-2: #1a1e25;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #eef0f3;
  --text-muted: #a1a8b4;
  --text-faint: #747c89;

  /* HomeLabCore identity — derived from the supplied logo */
  --hlc-navy: #0f2350;
  --hlc-blue: #3f74d8;
  --hlc-blue-hover: #5c8ce8;
  --hlc-blue-soft: rgba(63, 116, 216, 0.16);

  /* CookFrom identity */
  --cf-orange: #ff7a33;
  --cf-orange-hover: #ff9457;
  --cf-orange-soft: rgba(255, 122, 51, 0.16);

  /* active accent (defaults to HomeLabCore) */
  --accent: var(--hlc-blue);
  --accent-hover: var(--hlc-blue-hover);
  --accent-soft: var(--hlc-blue-soft);
  --accent-contrast: #ffffff;
  --focus-ring: #93b4f2;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --maxw: 1080px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 50px rgba(0, 0, 0, 0.35);
}

[data-brand="cookfrom"] {
  --accent: var(--cf-orange);
  --accent-hover: var(--cf-orange-hover);
  --accent-soft: var(--cf-orange-soft);
  --accent-contrast: #241206;
  --focus-ring: #ffb37f;
}

/* ---------- base ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.3rem 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section--tight {
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head {
  max-width: 52ch;
  margin-bottom: 2.25rem;
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.eyebrow--muted {
  color: var(--text-faint);
}

.lead {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 58ch;
}

.muted {
  color: var(--text-muted);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--accent-contrast);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  font-size: 1.08rem;
}

.brand:hover {
  color: var(--text);
}

.brand__core {
  color: var(--hlc-blue);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav__toggle svg {
  width: 20px;
  height: 20px;
}

.nav__toggle .icon-close {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 720px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 0.75rem 0.8rem;
    font-size: 1rem;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn--primary:hover {
  color: var(--accent-contrast);
  background: var(--accent-hover);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding-block: clamp(2.25rem, 5.5vw, 3.75rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% 45% auto -15%;
  height: 460px;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 800px) {
  .hero__grid {
    grid-template-columns: 1.02fr 0.98fr;
  }
}

.hero__title {
  margin: 0.1rem 0 0.75rem;
  text-wrap: balance;
}

.hero .lead {
  margin-bottom: 0;
}

/* ---------- app preview composition ---------- */

.appcard {
  position: relative;
  width: min(340px, 100%);
  margin-inline: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-elevated));
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.appcard::before {
  content: "";
  position: absolute;
  inset: 22% 0 -18% 0;
  z-index: -1;
  background: radial-gradient(70% 60% at 50% 40%, var(--cf-orange-soft), transparent 70%);
  filter: blur(28px);
}

.appcard__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.appcard__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cf-orange);
  flex: none;
}

.appcard__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.35rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.appflow {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.appflow__arrow {
  justify-self: center;
  color: var(--text-faint);
  line-height: 1;
}

.appstep {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  font-size: 0.9rem;
}

.appstep--accent {
  border-color: color-mix(in srgb, var(--cf-orange) 40%, transparent);
}

/* ---------- cards / grid ---------- */

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* principle cards */

.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.principle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.principle__icon svg {
  width: 20px;
  height: 20px;
}

.principle h3 {
  margin-bottom: 0.3rem;
}

.principle p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- featured product showcase ---------- */

.showcase {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  background: linear-gradient(180deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}

@media (min-width: 780px) {
  .showcase {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 0.95rem;
}

.showcase__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cf-orange);
}

.showcase h3 {
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  margin-bottom: 0.2rem;
}

.showcase__tagline {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.flow {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: step;
}

.flow li {
  position: relative;
  margin: 0;
  padding: 0.7rem 0.9rem 0.7rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.94rem;
  counter-increment: step;
}

.flow li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.tag-list li {
  margin: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* homepage featured product — tighter vertical footprint */

.featured {
  padding-block: clamp(1.5rem, 3.5vw, 2.4rem);
}

.featured .section-head {
  margin-bottom: 1.1rem;
}

.featured .showcase {
  gap: clamp(1.25rem, 3vw, 1.75rem);
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

.featured .showcase__badge {
  margin-bottom: 0.6rem;
}

.featured .showcase__tagline {
  margin-bottom: 0.6rem;
}

.featured .flow {
  margin-bottom: 0.85rem;
  gap: 0.35rem;
}

.featured .flow li {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.featured .tag-list {
  margin-bottom: 0.3rem;
}

.featured .btn-row {
  margin-top: 1rem;
}

/* ---------- brand band (full supplied logo) ---------- */

.brandband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 2.75rem);
  max-width: 780px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.brandband__logo {
  flex: none;
  width: min(232px, 60vw);
  background: #ffffff;
  border-radius: 16px;
  padding: 0.85rem 1rem;
}

.brandband__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.brandband__text {
  flex: 1 1 16rem;
  max-width: 40ch;
}

.brandband__text p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.brandband__text p:last-child {
  margin-bottom: 0;
}

/* ---------- prose (legal / support) ---------- */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.4rem;
  scroll-margin-top: 5rem;
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose ul {
  color: var(--text-muted);
}

.doc-meta {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.5rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.toc p {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.toc ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

@media (max-width: 560px) {
  .toc ul {
    columns: 1;
  }
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 2.5rem;
  margin-top: 1.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand {
  font-weight: 650;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.footer-inner .muted {
  margin: 0;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-faint);
}
