/* Order Hive marketing site. Colours and fonts from web/app/styles/tokens.css and the logo
   (web/components/Logo.tsx); the food pattern and white panels follow the ordering page (DEC-177). */

:root {
  /* The logo's six cells */
  --crimson: #d00142;
  --teal: #2ab7ca;
  --gold: #fac320;
  --pink: #fc60ab;
  --orange: #ff6a1a;
  --blue: #2a4d8f;

  --crimson-hover: #b3013a;
  --crimson-50: #fdeff3;
  --teal-50: #e7f8fa;
  --teal-700: #186f7c;
  --pink-50: #ffeff7;
  --pink-700: #bc2a70;
  --blue-50: #ebf0f8;
  --ink: #271e24;
  --body: #3a2e35;
  --muted: #685862;
  --line: #e6e6ea;

  /* Schibsted Grotesk throughout, Outfit for the logo only, as the app (DEC-434) */
  --font-logo: "Outfit", system-ui, sans-serif;
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-heading: "Schibsted Grotesk", system-ui, sans-serif;
  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --panel-radius: 28px;
  --tap: 44px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Pale food drawings on white, as behind the ordering page */
body {
  margin: 0;
  background: #fff url("patterns/food.svg") repeat;
  color: var(--body);
  font: 400 17px/1.6 var(--font-sans);
}

h1, h2 { color: var(--ink); margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h1 { font-size: clamp(36px, 5.6vw, 64px); max-width: 11em; }
/* Section headings uppercase, as Huddle's site does */
h2 { font: 800 clamp(24px, 3.2vw, 38px)/1.05 var(--font-heading); text-transform: uppercase; letter-spacing: 0.01em; }
p { margin: 0; }
a { color: var(--crimson-hover); }
a:focus-visible, .btn:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero a:focus-visible, .demo-inner > div a:focus-visible { outline-color: var(--gold); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

.small { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--crimson);
  color: #fff;
  font: 700 17px/1 var(--font-heading);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--crimson-hover); }
.btn-small { min-height: var(--tap); padding: 0 18px; font-size: 15px; }

/* Logo: the hexagon "O" with "rder" tucked in, as the app's full lockup */
.logo { display: inline-flex; align-items: center; min-height: var(--tap); color: #161616; text-decoration: none; }
/* Sizes follow Logo.tsx: text 0.379 of the mark, tucked in by half the mark less 0.42 of the text */
.logo-mark { width: 60px; height: 60px; flex: none; position: relative; z-index: 1; }
.logo-word { position: relative; z-index: 2; margin-left: -20.4px; font: 800 22.7px/1 var(--font-logo); letter-spacing: -0.03em; color: var(--ink); }
.logo-word span { font-size: 0.82em; color: var(--crimson); }

.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }

/* Panels: each section sits on white (or a brand colour) over the pattern */
.hero, .section, .demo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 16px 12px;
  border-radius: var(--panel-radius);
  background: #fff;
  box-shadow: 0 4px 12px rgba(39, 30, 36, 0.08), 0 2px 4px rgba(39, 30, 36, 0.04);
}
.section { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 960px) { .section { padding-top: 60px; padding-bottom: 60px; } }
@media (min-width: 1124px) { .hero, .section, .demo { margin: 24px auto; } }

/* Hero and demo: the ordering page's crimson to plum banner */
.hero, .demo { background: linear-gradient(135deg, var(--crimson), var(--ink)); color: rgba(255, 255, 255, 0.9); }
.hero h1, .demo h2 { color: #fff; }
.hero a:not(.btn) { color: #fff; }
.hero .btn { background: var(--gold); color: var(--ink); }
.hero .btn:hover { background: #fbd968; }

.hero { padding-top: 44px; padding-bottom: 44px; }
@media (min-width: 960px) { .hero { padding-top: 72px; padding-bottom: 72px; } }
.hl { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 0.12em; text-underline-offset: 0.08em; }
.lede { position: relative; font-size: 18px; margin-top: 22px; max-width: 32em; }
.actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.actions span a { display: inline-flex; align-items: center; min-height: var(--tap); }
/* The logo's honeycomb, large in the corner */
.hero-mark { position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; color: #fff; }
.hero h1 { position: relative; }
@media (min-width: 768px) {
  .hero-mark { right: 40px; top: 50%; width: 300px; height: 300px; transform: translateY(-50%); }
  .hero h1, .lede { max-width: calc(100% - 300px); }
}
@media (max-width: 767px) { .hero h1 { margin-top: 120px; } }

/* A gold hexagon sticker in the hero, like Huddle's round menu badge */
.sticker {
  position: absolute;
  left: 20px;
  top: 28px;
  width: 111px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); /* flat-topped, as the logo's cells */
  background: var(--gold);
  color: var(--ink);
  font: 800 13px/1.15 var(--font-heading);
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-10deg);
}
.sticker span { padding: 0 20px; }
@media (min-width: 768px) { .sticker { left: auto; top: 24px; right: 24px; width: 139px; height: 120px; font-size: 15px; } }

/* Hexagon confetti, in the logo's colours, in the corner of some panels */
.hive-section::after, #engine::after, .next::after, .story::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -60px;
  top: -40px;
  width: 300px;
  height: 220px;
  background: url("patterns/hex-confetti.svg") no-repeat 0 0 / 300px auto;
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 767px) {
  .hive-section::after, #engine::after, .next::after, .story::after { right: -30px; top: -20px; width: 150px; height: 110px; background-size: 150px auto; }
}

/* The dark panel, scattered with confetti, as Huddle's black sections */
/* The confetti is dimmed so text over it stays readable */
.dark { background: linear-gradient(rgba(39, 30, 36, 0.75), rgba(39, 30, 36, 0.75)), url("patterns/hex-confetti.svg") repeat, var(--ink); color: rgba(255, 255, 255, 0.85); }
.dark h2, .dark .pain, .dark .payoff, .dark .parts dt { color: #fff; }
.dark .parts { border-top-color: #fff; }
.dark .parts div { border-bottom-color: rgba(255, 255, 255, 0.18); }
.dark .why-close { color: var(--pink); }
.dark .shot.missing { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); color: rgba(255, 255, 255, 0.8); }

/* DEC-447: a "Launching soon" strip, until launch */
.preview-strip { margin: 0; padding: 8px 16px; background: var(--gold); color: var(--ink); font: 700 14px/1.3 var(--font-heading); text-align: center; }

/* In-page links land below the sticky header */
[id] { scroll-margin-top: 90px; }

/* The hive: every feature as a cell of a honeycomb (flat-topped cells, as the logo's,
   every other column dropped by half a cell), one small honeycomb per group */
.c-sales { --c: var(--crimson); --t: #fff; }
.c-kitchen { --c: var(--teal-700); --t: #fff; }
.c-demand { --c: var(--pink); --t: var(--ink); } /* the logo's light pink; ink text, as white is too faint on it */
.c-ops { --c: var(--blue); --t: #fff; }
.c-soon { --c: #d6d4dd; --t: var(--ink); }

.hive-section { container-type: inline-size; }
.hive-group { margin-top: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hive-group h3 { margin: 0; font-size: 24px; }
.hive-group h3::before { content: ""; display: inline-block; width: 22px; height: 19px; margin-right: 12px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--c); }
.hive-group h3 span { display: inline-block; margin: 4px 0 0 12px; padding: 2px 10px; border-radius: 999px; background: var(--c); color: var(--t); font: 700 13px/1.5 var(--font-sans); vertical-align: 4px; }
/* --n columns (always even, so every other cell is in a dropped column on every row);
   each cell is --w wide and overlaps the next column by a quarter of itself. */
.hive {
  --w: calc(100cqw / (var(--n) * 0.75 + 0.25));
  --h: calc(var(--w) * 0.866);
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 calc(var(--h) * 0.5);
  display: grid;
  grid-template-columns: repeat(var(--n), calc(var(--w) * 0.75));
  grid-auto-rows: var(--h);
}
.hive li { width: var(--w); height: var(--h); }
.hive li:nth-child(even) { transform: translateY(50%); }
.hive a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 18%;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--c);
  color: var(--t);
  font: 700 clamp(12px, calc(var(--w) * 0.12), 17px)/1.15 var(--font-heading);
  text-align: center;
  text-decoration: none;
  transform: scale(0.94);
  transition: transform 160ms;
}
.hive a:hover, .hive a:focus-visible { transform: scale(1.04) rotate(-4deg); outline: none; filter: brightness(1.08); }
.hive a:focus-visible { text-decoration: underline 3px; text-underline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .hive a { transition: none; } .hive a:hover, .hive a:focus-visible { transform: scale(1); } }
/* Four cells a row on phones, six on tablets, eight on wider screens */
.hive { --n: 4; }
@media (min-width: 600px) { .hive { --n: 6; } }
@media (min-width: 960px) { .hive { --n: 8; } }

/* Until the videos exist: a plain placeholder at video shape */
.video {
  aspect-ratio: 16 / 9;
  max-height: 560px;
  width: 100%;
  border-radius: var(--panel-radius);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
}

.section-lede { font-size: 18px; margin-top: 14px; max-width: 34em; }

/* Too many systems */
.pain { margin-top: 24px; max-width: 34em; font-size: 22px; line-height: 1.5; color: var(--ink); }
.payoff { margin: 56px 0 0; font: 800 clamp(24px, 3vw, 32px)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--ink); max-width: 20em; }

/* Ruled lists with a honeycomb cell in the logo's colours before each name */
.parts { margin: 32px 0 0; border-top: 3px solid var(--ink); }
.payoff + .parts { margin-top: 24px; }
.parts div { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.parts dt { font: 700 20px/1.3 var(--font-heading); color: var(--ink); display: flex; align-items: center; gap: 12px; }
.parts dt::before {
  content: "";
  flex: none;
  width: 18px;
  height: 16px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--crimson);
}
.parts div:nth-child(6n + 2) dt::before { background: var(--teal); }
.parts div:nth-child(6n + 3) dt::before { background: var(--gold); }
.parts div:nth-child(6n + 4) dt::before { background: var(--pink); }
.parts div:nth-child(6n + 5) dt::before { background: var(--orange); }
.parts div:nth-child(6n + 6) dt::before { background: var(--blue); }
.parts dd { margin: 0; padding-left: 30px; }
@media (min-width: 768px) { .parts div { grid-template-columns: 300px 1fr; gap: 24px; } .parts dd { padding-left: 0; } }

/* Screenshots and photos; an image not added yet shows a dashed box with what goes there */
.shot { margin: 12px 0 0; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(39, 30, 36, 0.12); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot img[src$=".svg"] { object-position: center; }
.shot.missing { display: flex; align-items: center; justify-content: center; padding: 16px; border: 2px dashed var(--muted); box-shadow: none; background: rgba(255, 255, 255, 0.7); color: var(--muted); font: 600 14px/1.4 var(--font-sans); text-align: center; }
.shot.missing img { display: none; }
.shot.missing::before { content: attr(data-label); }
.engine li .shot { margin: 0 0 12px; }
.parts dd .shot { max-width: 460px; }
.shot-wide { margin-top: 28px; aspect-ratio: 21 / 9; }
.shot-tall { aspect-ratio: 3 / 4; max-width: 300px; }
.shot-portrait { float: right; width: min(40%, 320px); aspect-ratio: 4 / 5; margin: 28px 0 16px 32px; }
@media (max-width: 767px) { .shot-portrait { float: none; width: 100%; margin: 24px 0 0; } }
.demo .shot { margin-top: 28px; }

.why-close { margin-top: 32px; font: 700 clamp(22px, 2.6vw, 28px)/1.3 var(--font-heading); color: var(--crimson); max-width: 26em; }

/* Four engines: sales in crimson, production in teal, demand in pink, operations in blue */
.engines { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 900px) { .engines { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.engine { border-radius: 20px; padding: 24px 20px; background: var(--crimson-50); }
.engine:nth-child(2) { background: var(--teal-50); }
.engine:nth-child(3) { background: var(--pink-50); }
.engine:nth-child(4) { background: var(--blue-50); }
.engine h3 { margin: 0 0 8px; display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--crimson); color: #fff; font: 700 19px/1.2 var(--font-heading); }
.engine:nth-child(2) h3 { background: var(--teal-700); }
.engine:nth-child(3) h3 { background: var(--pink); color: var(--ink); }
.engine:nth-child(4) h3 { background: var(--blue); }
.soon { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #fff; color: var(--pink-700); font: 700 12px/1.5 var(--font-sans); vertical-align: 2px; }
.engine ul { list-style: none; margin: 0; padding: 0; }
.engine li { padding: 14px 0; border-bottom: 1px solid rgba(39, 30, 36, 0.1); }
.engine li:last-child { border-bottom: 0; }
.engine strong { display: block; font: 700 18px/1.3 var(--font-heading); color: var(--ink); }

/* So why wouldn't you? In gold */
.why { background: var(--gold); }
.why .parts div { border-bottom-color: rgba(39, 30, 36, 0.18); }
.why .parts dt::before { background: var(--ink); }
.why .why-close { color: var(--ink); }

/* Coming next: plainly marked as not built */
.next-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.next-list li { border: 2px dashed var(--line); border-radius: 16px; padding: 16px 18px; font-size: 16px; color: var(--muted); background: #fff; }
.next-list strong { display: block; margin-bottom: 4px; font: 700 18px/1.3 var(--font-heading); color: var(--ink); }
.next-list strong::after { content: "Coming next"; display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--pink-50); color: var(--pink-700); font: 700 12px/1.5 var(--font-sans); vertical-align: 2px; }

/* The founder's story */
.story-copy { margin-top: 28px; max-width: 34em; padding-left: 24px; border-left: 6px solid var(--pink); }
.story-copy p + p { margin-top: 18px; }
.story-copy p:first-child { font-size: 22px; line-height: 1.5; color: var(--ink); }
.signoff { font: 700 18px var(--font-heading); color: var(--ink); }

/* The demo form, in the crimson banner */
.demo { max-width: 1100px; padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 960px) { .demo { padding-top: 88px; padding-bottom: 88px; } }
.demo h2 + p { margin-top: 20px; max-width: 28em; }
.demo-inner { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .demo-inner { grid-template-columns: 1fr 1fr; gap: 72px; } }

.form { display: grid; gap: 16px; padding: 24px; border-radius: 20px; background: #fff; color: var(--body); }
.form label { display: grid; gap: 6px; font: 600 15px/1.2 var(--font-heading); color: var(--ink); }
.form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--muted);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 400 17px var(--font-sans);
}
.form input:focus { border-color: var(--crimson); }
.form .btn { justify-self: start; }
.sent { border-left: 4px solid var(--teal); padding-left: 14px; color: var(--ink); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin: 16px auto 24px; padding-top: 16px; padding-bottom: 16px; font-size: 15px; color: var(--ink); }
.foot span { background: #fff; padding: 2px 8px; border-radius: 6px; }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); background: #fff; padding: 0 8px; border-radius: 6px; }
