/* Cocode Guard product page. The page opens at night (the hero: the box on watch while you
   sleep) and turns to day below. Status colours carry meaning everywhere: green = handled
   quietly, amber = you get a message, red = you get an urgent message. */
:root {
  --night: #0f1e36; --night-2: #172b4c; --on-night: #e8eef6; --on-night-quiet: #a3b3ca;
  --ink: #122033; --quiet: #56637a; --day: #fff; --mist: #eef2f6; --line: #d5dde7;
  --ok: #35c47c; --notice: #f0a43a; --urgent: #e5484d;
  --max: 1120px; --gutter: 24px;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--day); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ok); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
cocode-head, cocode-foot { --cocode-max: var(--max); --cocode-gutter: var(--gutter); }

/* Night: hero and the closing band */
.night { background: var(--night); color: var(--on-night); }
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center;
  padding-top: 72px; padding-bottom: 104px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -0.035em;
  max-width: 13ch; }
.lede { margin-top: 24px; max-width: 34em; font-size: 1.1875rem; color: var(--on-night-quiet); }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.btn { display: inline-block; padding: 15px 26px; border-radius: 999px; background: var(--ok);
  color: var(--night); font-weight: 700; text-decoration: none; }
.btn:hover { background: #4fd690; }
.more { color: var(--on-night); font-weight: 500; text-underline-offset: 5px; }

/* The night log: the one bold element */
.log { margin: 0; padding: 30px 32px 26px; border-radius: 22px; background: var(--night-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.log figcaption { display: flex; justify-content: space-between; align-items: baseline;
  color: var(--on-night-quiet); font-size: 0.9375rem; }
.log figcaption b { color: var(--on-night); font-size: 1.0625rem; font-weight: 700; }
.log ol { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.log ol::before { content: ""; position: absolute; left: 62px; top: 10px; bottom: 10px;
  width: 1px; background: rgba(163, 179, 202, 0.25); }
.log li { display: grid; grid-template-columns: 48px 28px 1fr; align-items: start; padding: 11px 0; }
.log time { color: var(--on-night-quiet); font-size: 0.9375rem;
  padding-top: 1px; }
.log .dot { width: 11px; height: 11px; margin: 7px 0 0 9px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 4px var(--night-2); position: relative; }
.log .notice .dot { background: var(--notice); }
.log .urgent .dot { background: var(--urgent); }
.log li p { font-size: 1rem; line-height: 1.45; }
.log li small { display: block; margin-top: 3px; color: var(--on-night-quiet); font-size: 0.875rem; }
.log .notice small { color: var(--notice); }
@media (prefers-reduced-motion: no-preference) {
  .log li { animation: arrive 0.5s ease-out both; }
  .log li:nth-child(2) { animation-delay: 0.35s; } .log li:nth-child(3) { animation-delay: 0.7s; }
  .log li:nth-child(4) { animation-delay: 1.05s; } .log li:nth-child(5) { animation-delay: 1.4s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
}

/* Day sections */
.day { padding: 104px 0; }
.day + .day { border-top: 1px solid var(--line); }
.day.mist { background: var(--mist); border-top: 0; }
.intro { margin-top: 16px; max-width: 36em; color: var(--quiet); font-size: 1.125rem; }
.watch-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 64px; margin-top: 48px;
  align-items: start; }
.watch { margin: 0; }
.watch > div { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 22px 0;
  border-top: 1px solid var(--line); }
.watch > div:last-child { border-bottom: 1px solid var(--line); }
.watch dt { font-weight: 700; font-size: 1.125rem; }
.watch dd { margin: 0; grid-column: 1; color: var(--quiet); max-width: 36em; }
.watch dd.how { grid-column: 2; grid-row: 1 / span 2; align-self: start; display: flex;
  flex-direction: column; align-items: flex-end; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px;
  border-radius: 999px; font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  background: #d9f4e6; color: #11603a; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pill.notice { background: #fdecd2; color: #7a4a06; }
.pill.notice::before { background: var(--notice); }
.pill.urgent { background: #fbdcdd; color: #8c1d22; }
.pill.urgent::before { background: var(--urgent); }
.legend { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--quiet);
  font-size: 0.9375rem; }

/* A real urgent message, as it arrives in Telegram */
.phone { position: sticky; top: 32px; margin: 0; }
.phone figcaption { color: var(--quiet); font-size: 0.9375rem; margin-top: 14px; }
.chat { padding: 22px 18px; border-radius: 28px; background: #dbe4ee; }
.bubble { background: var(--day); border-radius: 16px 16px 16px 4px; padding: 12px 14px 8px;
  font-size: 0.9375rem; line-height: 1.5; box-shadow: 0 1px 1px rgba(18, 32, 51, 0.12); }
.bubble b { display: block; color: #2c6fb7; font-size: 0.875rem; margin-bottom: 4px; }
.bubble time { display: block; text-align: right; color: var(--quiet); font-size: 0.75rem;
  margin-top: 4px; }
.bubble code { font: inherit; }

/* Steps: a real sequence, so they are numbered */
.steps { list-style: none; margin: 48px 0 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px;
  height: 40px; border-radius: 50%; background: var(--night); color: var(--on-night);
  font-weight: 700; margin-bottom: 20px; }
.steps p { margin-top: 8px; color: var(--quiet); }

/* In the box */
.box-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.contents { list-style: none; margin: 28px 0 0; padding: 0; }
.contents li { padding: 14px 0 14px 34px; border-top: 1px solid var(--line); position: relative; }
.contents li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 14px;
  height: 8px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok);
  transform: rotate(-45deg); }
.device { width: 100%; height: auto; display: block; }

/* Questions */
.faq { margin-top: 40px; max-width: 46em; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 700; font-size: 1.125rem;
  list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.5rem;
  font-weight: 400; color: var(--quiet); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--quiet); max-width: 40em; }

/* Closing band */
.close { padding-top: 96px; padding-bottom: 72px; }
.close h2 { color: var(--on-night); }
.close p { margin-top: 14px; max-width: 34em; color: var(--on-night-quiet); font-size: 1.125rem; }
.close .btn { margin-top: 32px; }
.close address { margin-top: 18px; font-style: normal; color: var(--on-night-quiet); }

@media (max-width: 900px) {
  .hero, .watch-grid, .box-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 40px; padding-bottom: 72px; }
  .phone { position: static; max-width: 420px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .day { padding: 72px 0; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .log { padding: 24px 18px 18px; }
  .log li { grid-template-columns: 44px 26px 1fr; }
  .log ol::before { left: 57px; }
  .log .dot { margin-left: 8px; }
  .watch > div { grid-template-columns: 1fr; }
  .watch dd.how { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap;
    align-items: flex-start; margin-top: 6px; }
}
