/* CookNook website: the app's look (dark marble, CookNook orange, rounded cards) on the web.
   Font: Manrope (SIL Open Font License) as a free stand-in for the app's Hellix. */

:root {
  --bg: #0b0a0a;
  --bg-raised: #151213;
  --card: #1a1617;
  --card-hover: #211c1d;
  --line: #383435;
  --text: #f6f3f1;
  --muted: #a39d9a;
  --orange: #ff6907;
  --orange-soft: #ff8107;
  --peach: #ffb267;
  --gold: #c99a3b;
  --ok: #3ccf6a;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--peach); text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.accent { color: var(--orange); }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--orange); color: #111; padding: 8px 14px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 10, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(56, 52, 53, 0.6);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 6px 10px; font: inherit; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-raised); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #140b03; }
.btn-primary:hover { background: var(--orange-soft); color: #140b03; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--text); }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(11,10,10,0.35) 0%, rgba(11,10,10,0.75) 70%, var(--bg) 100%),
              url('../img/marble-dark.jpg') center 30% / cover no-repeat;
  padding: 88px 0 72px;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: #ddd6d2; max-width: 34ch; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--peach); margin-bottom: 14px; }
@media (max-width: 880px) {
  .hero { padding: 56px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ---------- store badges (coming soon) ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 10px; }
.store {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 14px;
  background: rgba(26, 22, 23, 0.85); border: 1px solid var(--line); color: var(--text); min-width: 190px;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.store strong { display: block; font-size: 1.02rem; line-height: 1.2; }

/* ---------- forms ---------- */
.notify { display: flex; gap: 10px; max-width: 440px; margin-top: 18px; }
.notify input { flex: 1; }
input, textarea, select {
  width: 100%; background: #120f10; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font: inherit; font-size: 1rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 14px 0 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.form-msg { min-height: 1.4em; font-size: 0.92rem; margin-top: 8px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
@media (max-width: 520px) { .notify { flex-direction: column; } }

/* ---------- phone mock-ups ---------- */
.phones { position: relative; display: flex; justify-content: center; min-height: 520px; }
.phone {
  width: 250px; border-radius: 34px; padding: 8px;
  background: linear-gradient(145deg, #2b2627, #0d0b0b); box-shadow: var(--shadow), inset 0 0 0 1px #3d3738;
}
/* The frame takes the screenshot's own shape, so nothing is ever cropped. */
.phone img, .phone .screen { width: 100%; height: auto; display: block; border-radius: 27px; background: #000; }
.phone.back { position: absolute; transform: translate(-58%, 34px) rotate(-7deg) scale(0.9); opacity: 0.9; }
.phone.front { position: relative; transform: translate(22%, 0) rotate(4deg); }
@media (max-width: 880px) { .phones { min-height: 460px; } .phone { width: 210px; } }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } section { padding: 60px 0; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: background 0.2s, border-color 0.2s;
}
.card:hover { background: var(--card-hover); }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(255, 105, 7, 0.12); color: var(--orange);
}
.icon svg { width: 24px; height: 24px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row + .feature-row { margin-top: 84px; }
.feature-row.flip .feature-text { order: 2; }
.feature-row ul { padding-left: 1.1em; color: #ddd6d2; }
.feature-row li { margin-bottom: 6px; }
.quote {
  border-left: 3px solid var(--orange); padding: 6px 0 6px 16px; margin: 18px 0; font-style: italic; color: var(--peach);
}
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 32px; } .feature-row.flip .feature-text { order: 0; } }
.band {
  background: linear-gradient(120deg, rgba(255,105,7,0.16), rgba(201,154,59,0.08)), var(--bg-raised);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta { text-align: center; }
.cta .stores { justify-content: center; }
.cta .notify { margin-inline: auto; }

/* ---------- prose (legal pages) ---------- */
.page-hero { padding: 64px 0 24px; background: linear-gradient(180deg, rgba(11,10,10,0.5), var(--bg)), url('../img/marble-dark.jpg') center / cover; }
/* Wider than tall: the marble turned sideways (3248px wide), so it's never stretched. */
@media (min-aspect-ratio: 1/1) {
  .hero:not(.photo) {
    background: linear-gradient(180deg, rgba(11,10,10,0.35) 0%, rgba(11,10,10,0.75) 70%, var(--bg) 100%),
                url('../img/marble-dark-wide.jpg') center 30% / cover no-repeat;
  }
  .page-hero { background: linear-gradient(180deg, rgba(11,10,10,0.5), var(--bg)), url('../img/marble-dark-wide.jpg') center / cover; }
}
.prose { max-width: 760px; padding-bottom: 80px; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; color: var(--peach); }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
.notice { background: rgba(255,178,103,0.08); border: 1px solid rgba(255,178,103,0.35); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.92rem; color: #f3d7bd; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--orange); }
.site-footer img { height: 28px; width: auto; }

/* ---------- portal ---------- */
.portal-shell { min-height: calc(100vh - 68px - 120px); padding: 48px 0 72px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; max-width: 460px; margin: 0 auto; box-shadow: var(--shadow); }
.panel.wide { max-width: none; }
.tabs { display: flex; gap: 6px; background: #120f10; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 9px; border-radius: 999px; cursor: pointer; }
.tabs button.active { background: var(--orange); color: #140b03; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 28px; }
.stat { background: #120f10; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px 8px; border-bottom: 1px solid rgba(56,52,53,0.6); }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #2a2425; color: var(--muted); }
.pill.public { background: rgba(60, 207, 106, 0.14); color: var(--ok); }
.pill.pending { background: rgba(255, 178, 103, 0.14); color: var(--peach); }
.pill.hidden { background: rgba(255, 107, 107, 0.14); color: var(--danger); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.center { text-align: center; }

/* ---------- food photography (owner's own photos) ---------- */
.mosaic {
  display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px;
}
.mosaic figure { margin: 0; overflow: hidden; border-radius: var(--radius); position: relative; background: #000; }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mosaic figure:hover img { transform: scale(1.04); }
.mosaic figcaption {
  position: absolute; left: 12px; bottom: 10px; font-size: 0.82rem; font-weight: 700; color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
@media (max-width: 760px) {
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 160px 160px; }
  .mosaic figure:first-child { grid-column: span 2; grid-row: auto; }
}
.photo-band {
  background: linear-gradient(90deg, rgba(11,10,10,0.92) 0%, rgba(11,10,10,0.7) 55%, rgba(11,10,10,0.35) 100%),
              var(--photo) center / cover no-repeat;
}
.hero.photo {
  background: linear-gradient(90deg, rgba(11,10,10,0.92) 0%, rgba(11,10,10,0.75) 50%, rgba(11,10,10,0.45) 100%),
              var(--photo) center / cover no-repeat;
}

/* ---------- pricing ---------- */
.plan ul { padding-left: 1.1em; margin: 16px 0 0; color: #ddd6d2; }
.plan li { margin-bottom: 8px; }
.price { font-size: 2.2rem; font-weight: 800; margin: 6px 0 0; line-height: 1.1; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-alt { color: var(--peach); font-weight: 600; margin: 4px 0 0; }
.plan-premium { border-color: var(--gold); background: linear-gradient(160deg, rgba(201,154,59,0.14), transparent 60%), var(--card); }
.plan-premium h3 { color: var(--gold); }

/* Creator portal: bulk recipe uploader */
.up-progress { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.up-progress li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #120f10; }
.up-label { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; font-size: 0.9rem; }
.up-progress .hint { flex-basis: 100%; }
.up-check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 10px; }
.up-check input { width: auto; }
.up-drafts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.up-drafts li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #120f10; }
.up-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.up-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.up-actions .btn { padding: 8px 14px; }
.up-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #2a2425; flex: 0 0 auto; }
.up-thumb.big { width: 120px; height: 90px; }
.up-thumb.none { display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--muted); text-align: center; }
.up-editor .row > div { flex: 1 1 140px; }
/* Recipe editor in the portal (rows for ingredients and steps) */
.up-tabs { flex-wrap: wrap; border-radius: 18px; }
.up-tabs button { flex: 1 1 120px; white-space: nowrap; }
.ed-rows { display: grid; gap: 6px; }
.ed-ing { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 6px; align-items: center; }
.ed-ing input { min-width: 0; }
.btn.ed-x { padding: 6px 10px; line-height: 1; min-width: 34px; }
.btn.ed-x[disabled] { opacity: 0.35; cursor: default; }
.ed-paste { margin: 6px 0 10px; }
.ed-paste summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.ed-paste textarea { margin: 8px 0; }
.ed-steps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.ed-step { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #120f10; padding: 10px; display: grid; gap: 8px; }
.ed-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-step-head input { flex: 1 1 160px; min-width: 0; }
.ed-step-tools { display: flex; gap: 4px; margin-left: auto; }
.ed-step-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-step-foot .btn { padding: 6px 12px; }
.ed-step-foot .up-thumb { width: 48px; height: 48px; }
.ed-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.ed-inline input { width: 80px; }
@media (max-width: 520px) { .ed-ing { grid-template-columns: 90px 1fr auto; } }
