/*
 * Styles of nekokitchen.uk. Colours come from tokens.css, which `npm run site:build` generates
 * from the app theme. Design: docs/design/website-mockup.html.
 */

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/m-plus-rounded-1c-400.woff2') format('woff2');
}

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/m-plus-rounded-1c-700.woff2') format('woff2');
}

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/m-plus-rounded-1c-800.woff2') format('woff2');
}

/* The hero uses the gradient of the app icon, which is not a theme token. */
:root {
  --hero-from: #d3f0e2;
  --hero-to: #dfe0f5;
  --hero-dot: rgba(255, 255, 255, 0.7);
  --phone-body: #3a3550;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
}

@media (prefers-color-scheme: dark) {
  :root {
    --hero-from: #16261f;
    --hero-to: #1d1a36;
    --hero-dot: rgba(255, 255, 255, 0.07);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'M PLUS Rounded 1c', ui-rounded, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(var(--background-dot) 1.4px, transparent 1.7px) 0 0 / 18px 18px,
    var(--background);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.small {
  font-size: 0.85rem;
}

.cat {
  flex: none;
}

.card {
  padding: 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 var(--depth) 0 var(--border);
}

.facts {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
}

.facts li {
  display: flex;
  gap: 10px;
}

.facts li::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--accent);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand .cat {
  width: 44px;
  height: 44px;
}

.nav-link {
  padding: 10px 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
}

.segmented a {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 99px;
  color: var(--ink-muted);
  font-weight: 800;
  font-size: 0.78rem;
  text-decoration: none;
}

.segmented a[aria-current='true'] {
  background: var(--accent-soft);
  color: var(--ink);
}

/* Hero */
.hero {
  background:
    radial-gradient(var(--hero-dot) 2px, transparent 2.4px) 0 0 / 22px 22px,
    linear-gradient(135deg, var(--hero-from) 55%, var(--hero-to));
  border-bottom: 2px solid var(--border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 56px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  max-width: 30rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
}

.hero-copy > p {
  font-size: 1.1rem;
}

.hero-copy > .small {
  font-size: 0.85rem;
}

.soon {
  justify-self: start;
  padding: 10px 18px;
  border-radius: 99px;
  background: var(--butter);
  color: var(--butter-ink);
  font-weight: 800;
}

.hero-art {
  position: relative;
  justify-self: center;
  padding: 0 50px 0 0;
}

/* The cat sits where the app has its floating "New recipe" cat button. */
.hero-cat {
  position: absolute;
  right: -6px;
  bottom: -30px;
  width: 150px;
  height: auto;
}

/* Phone: a small copy of the Recipes tab */
.phone {
  width: 240px;
  padding: 9px;
  border-radius: 42px;
  background: var(--phone-body);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  transform: rotate(-3deg);
}

.screen {
  display: grid;
  gap: 10px;
  padding: 22px 12px 72px;
  border-radius: 34px;
  background:
    radial-gradient(var(--background-dot) 1.4px, transparent 1.7px) 0 0 / 18px 18px,
    var(--background);
}

.screen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.3rem;
}

.screen-title .cat {
  width: 34px;
  height: 34px;
}

.search {
  padding: 9px 14px;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.recipe-card {
  padding: 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 var(--depth) 0 var(--border);
  font-weight: 800;
  font-size: 0.74rem;
  line-height: 1.25;
}

.recipe-card .thumb {
  display: grid;
  place-items: center;
  height: 70px;
  margin-bottom: 6px;
  border-radius: 17px;
  font-size: 2.1rem;
}

.recipe-card span {
  display: block;
  padding: 0 4px 2px;
}

/* Home sections */
section {
  padding: 56px 0;
}

section h2 {
  margin-bottom: 24px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
}

.feature h3 {
  font-size: 1.05rem;
}

.feature p {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Icon tiles stay pastel with dark ink in both schemes, like the app's stickers and chips. */
.icon-tile {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.icon-tile svg {
  width: 38px;
  height: 38px;
  fill: #fff;
  stroke: var(--cat-ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Cook mode band */
.cook {
  border-block: 2px solid var(--cook-border);
  background:
    radial-gradient(var(--cook-dot) 1.4px, transparent 1.7px) 0 0 / 18px 18px,
    var(--cook-background);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 32px;
}

.split h2 {
  margin-bottom: 12px;
}

.step-card {
  display: grid;
  gap: 12px;
  border-color: var(--cook-border);
  box-shadow: 0 var(--depth) 0 var(--cook-shadow);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.85rem;
}

.step-head .cat {
  width: 52px;
  height: 52px;
}

.step-text {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.35;
}

.paws {
  display: flex;
  gap: 6px;
}

.paws svg {
  flex: 1;
  max-width: 34px;
  fill: var(--cook-track);
}

.paws svg.done {
  fill: var(--accent);
}

/* Share */
.link-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 2px dashed var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.link-pill svg {
  flex: none;
  width: 26px;
  height: 26px;
  stroke: var(--accent-strong);
  stroke-width: 3.6;
  stroke-linecap: round;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-top: 20px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 2px dotted var(--border);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.site-footer .cat {
  width: 40px;
  height: 40px;
}

.site-footer .spacer {
  margin-right: auto;
}

/* Privacy page */
.policy {
  display: grid;
  gap: 28px;
  max-width: 720px;
  padding-top: 16px;
  padding-bottom: 48px;
}

.policy h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
}

.policy-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.policy-summary .cat {
  width: 84px;
}

.policy-summary .facts {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.policy-block {
  display: grid;
  gap: 10px;
  padding: 0;
}

.policy-block h2 {
  margin: 0;
  font-size: 1.25rem;
}

.policy-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.2em;
}

.policy-block dl {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  margin: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.policy-block dt,
.policy-block dd {
  margin: 0;
  padding: 12px 16px;
  border-top: 2px dotted var(--border);
}

.policy-block dt:first-of-type,
.policy-block dt:first-of-type + dd {
  border-top: 0;
}

.policy-block dt {
  font-weight: 800;
}

.policy-block dd {
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }

  .nav-link {
    display: none;
  }

  section {
    padding: 40px 0;
  }

  .policy-block {
    padding: 0;
  }
}

@media (max-width: 520px) {
  .policy-block dl {
    grid-template-columns: 1fr;
  }

  .policy-block dd {
    padding-top: 0;
    border-top: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-cat {
    animation: bob 3.2s ease-in-out infinite;
  }

  @keyframes bob {
    50% {
      transform: translateY(-8px) rotate(2deg);
    }
  }
}
