/* Pantry to Fork — marketing site.
   Design tokens copied from the Rails app (app/assets/stylesheets/00_tokens.css)
   so the landing page stays visually consistent with the product. */

:root {
  /* Brand Colours */
  --primary-colour: #4f785a;
  --background-colour: #f9f6f1;
  --text-colour: #2c2c2c;
  --secondary-colour: #e4572e;
  --neutral-colour: #e5e3dc;
  --highlight-colour: #f2b134;

  /* Extended Brand Palette */
  --white: #ffffff;
  --light-grey: #f8f9fa;
  --medium-grey: #6b6c6d;
  --text-secondary: #6b6c6d;

  /* Elevation */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);

  --app-url: "https://app.pantrytofork.app";
  --max-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Keep anchored sections (#features, #pricing) clear of the sticky nav. */
  scroll-padding-top: 5rem;
  scroll-behavior: smooth;
}

body {
  font-family: Nunito, Helvetica, sans-serif;
  background-color: var(--background-colour);
  color: var(--text-colour);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  color: var(--primary-colour);
  line-height: 1.2;
}

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

/* ---------- Buttons (from app/assets/stylesheets/40_buttons.css) ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  margin: 0.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.2;
  vertical-align: middle;
}

.btn:hover {
  background-color: var(--highlight-colour);
  color: var(--text-colour);
}

.btn--primary {
  background-color: var(--primary-colour);
  color: var(--white);
}

.btn--outlined {
  background-color: transparent;
  border: 1px solid var(--primary-colour);
  color: var(--primary-colour);
}

/* ---------- Nav (mirrors layouts/_nav + 20_layout.css) ---------- */

nav {
  display: flex;
  background-color: var(--neutral-colour);
  padding: 0.5rem 3rem;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-weight: bold;
  color: var(--text-colour);
  transition: background-color 0.2s ease;
}

.nav-links a:hover {
  background-color: var(--highlight-colour);
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  height: 3rem;
  width: auto;
}

/* ---------- Layout ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 3rem 2rem;
}

section {
  padding: 3.5rem 0;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding-top: 4rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 38rem;
  margin: 0.5rem auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Feature grid ---------- */

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

.card {
  background-color: var(--white);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card h3 {
  margin-top: 0;
}

/* Icon badge: the bare <div> wrapping each card's SVG. Soft tint of the brand
   green behind a primary-coloured icon. SVGs use fill="currentColor", so the
   colour is driven entirely from here. */
.card > div:has(> svg) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  background-color: rgba(79, 120, 90, 0.14); /* fallback: --primary-colour @ 14% */
  background-color: color-mix(in srgb, var(--primary-colour) 14%, transparent);
}

.card svg {
  width: 26px;
  height: 26px;
  color: var(--primary-colour);
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ---------- Pricing ---------- */

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.plan {
  background-color: var(--white);
  border: 2px solid var(--neutral-colour);
  border-radius: 0.75rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.plan--featured {
  border-color: var(--primary-colour);
  box-shadow: var(--shadow-md);
}

.plan .badge {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--highlight-colour);
  color: var(--text-colour);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}

.plan .price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-colour);
}

.plan .price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  flex-grow: 1;
}

.plan li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.plan li::before {
  content: "✓";
  color: var(--primary-colour);
  font-weight: 800;
  position: absolute;
  left: 0;
}

.plan .btn {
  width: 100%;
}

/* ---------- Call to action band ---------- */

.cta-band {
  background-color: var(--primary-colour);
  color: var(--white);
  text-align: center;
  border-radius: 1rem;
  padding: 3rem 2rem;
}

.cta-band h2 {
  color: var(--white);
  margin-top: 0;
}

/* ---------- Footer (mirrors layouts/_footer + 20_layout.css) ---------- */

.site-footer {
  background-color: var(--neutral-colour);
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  nav {
    padding: 0.5rem 1rem;
  }

  .nav-inner {
    flex-direction: column;
    gap: 1rem;
  }

  main {
    padding: 0 1rem 2rem;
  }

  .nav-logo {
    height: 2.5rem;
  }
}
