/* machat.app's front page, in the design system "Čepel" v0.3 (the canvas "MaChat — návrh appky pro macOS",
   System.dc.html): steel neutrals and one cold accent, the Edge; everything MaChat owns has one cut
   corner, top right. Dark is the default; light follows the system with the same roles.
   The logo is the clean Ma / Chat (LogoFinal.dc.html): Gintronic Black as outlines, inline in the page,
   never set as a font. The glitch is an accent, not the logo: the header logo glitches once after the
   page loads and again on hover, and the blade behind the app carries the cyan and magenta split. */

:root {
  color-scheme: dark light;
  --ink: #111215;
  --graphite: #1a1c20;
  --card: #1d2025;
  --control: #262a31;
  --line: #2a2d33;
  --border: #3a3e45;
  --text-strong: #f4f5f7;
  --text: #e6e8eb;
  --text-secondary: #a3a9b1;
  --text-tertiary: #8a9099;
  --nav: #c4c9d0;
  --edge: #7fd1ff;
  --on-edge: #0e0f11;
  --live: #30d158;
  --glitch-cyan: #00d1ff;
  --glitch-magenta: #ff2e97;
  --blade: #22252b;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  /* The app pictured in the hero: light on the dark page, so it stands out. */
  --app-bg: #f7f8fa;
  --app-side: #eceef1;
  --app-side-line: #dadde2;
  --app-text: #121316;
  --app-strong: #0b0c0e;
  --app-sec: #545a63;
  --app-ter: #6b717a;
  --app-nav: #33373e;
  --app-faint: #6b717a;
  --app-line: #dadde2;
  --app-msg: #121316;
  --app-active: #dcebf4;
  --app-edge: #0874a8;
  --app-on-edge: #ffffff;
  --app-mention: rgba(8, 116, 168, 0.12);
  --app-guest: #c9ced5;
  --app-card: #ffffff;
  --app-card-line: #c9ced5;
  --app-deal-bg: rgba(178, 96, 0, 0.12);
  --app-deal: #9a5b00;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #f7f8fa;
    --graphite: #eceef1;
    --card: #ffffff;
    --control: #e4e7eb;
    --line: #dadde2;
    --border: #c9ced5;
    --text-strong: #0b0c0e;
    --text: #121316;
    --text-secondary: #545a63;
    --text-tertiary: #6b717a;
    --nav: #33373e;
    --edge: #0874a8;
    --on-edge: #ffffff;
    --live: #1a7a3d;
    --glitch-cyan: #00a9d6;
    --glitch-magenta: #e0157f;
    --blade: #e4e7eb;
    /* ... and dark on the light page. */
    --app-bg: #111215;
    --app-side: #1a1c20;
    --app-side-line: rgba(255, 255, 255, 0.06);
    --app-text: #e6e8eb;
    --app-strong: #f4f5f7;
    --app-sec: #a3a9b1;
    --app-ter: #8a9099;
    --app-nav: #c4c9d0;
    --app-faint: #7d838c;
    --app-line: #2a2d33;
    --app-msg: #dde1e6;
    --app-active: rgba(127, 209, 255, 0.14);
    --app-edge: #7fd1ff;
    --app-on-edge: #0e0f11;
    --app-mention: rgba(127, 209, 255, 0.16);
    --app-guest: #3a3e45;
    --app-card: #1d2025;
    --app-card-line: #2e3238;
    --app-deal-bg: rgba(255, 179, 64, 0.14);
    --app-deal: #ffb340;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--edge); }
a:hover { color: var(--text-strong); }

.wrap {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

/* The cut: one corner, top right, growing with the object. */
.cut-8 { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.cut-5 { clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); }
.cut-16 { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.cut-22 { clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }

/* The logo: the letters in the strongest text colour, the blade in the Edge. */
.logo { display: block; height: auto; overflow: visible; }
.logo-ink { fill: var(--text-strong); }
.logo-slash { fill: var(--edge); }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
/* 150 px wide: never under the 120 px the logo sheet allows for the wordmark. */
.brand { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.brand .logo { width: 150px; }
.brand .glitch { position: absolute; left: 0; top: 50%; transform: translateY(-50%); opacity: 0; pointer-events: none; }
.brand .glitch.light { display: none; }
.glitch .scan { fill: var(--ink); }
@media (prefers-color-scheme: light) {
  .brand .glitch.dark { display: none; }
  .brand .glitch.light { display: block; }
}
/* The accent: a short broken-signal flicker, once after the page loads and on every hover. */
@media (prefers-reduced-motion: no-preference) {
  .brand > .logo:not(.glitch) { animation: logo-hide 0.5s steps(1) 0.9s 1; }
  .brand .glitch { animation: logo-glitch 0.5s steps(1) 0.9s 1; }
  .brand:hover > .logo:not(.glitch), .brand:focus-visible > .logo:not(.glitch) { animation: logo-hide-hover 0.5s steps(1) 1; }
  .brand:hover .glitch, .brand:focus-visible .glitch { animation: logo-glitch-hover 0.5s steps(1) 1; }
}
@keyframes logo-hide { 0% { opacity: 0; } 30% { opacity: 1; } 46% { opacity: 0; } 72% { opacity: 1; } }
@keyframes logo-hide-hover { 0% { opacity: 0; } 30% { opacity: 1; } 46% { opacity: 0; } 72% { opacity: 1; } }
@keyframes logo-glitch {
  0% { opacity: 1; transform: translate(-3px, -50%); }
  30% { opacity: 0; }
  46% { opacity: 1; transform: translate(2px, -50%); }
  72% { opacity: 0; }
}
@keyframes logo-glitch-hover {
  0% { opacity: 1; transform: translate(-3px, -50%); }
  30% { opacity: 0; }
  46% { opacity: 1; transform: translate(2px, -50%); }
  72% { opacity: 0; }
}

.top nav { display: flex; align-items: center; gap: 8px; font-size: 14px; }
/* 44 px tall, so a finger hits them. */
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--nav); text-decoration: none; font-weight: 500; white-space: nowrap; }
.top nav a:hover { color: var(--text-strong); }
.top nav .nav-cta { min-height: 36px; padding: 0 14px; background: var(--control); color: var(--text-strong); }
/* Phones keep the brand and the one link that matters. */
@media (max-width: 419px) {
  .top nav a[href="#inside"] { display: none; }
}

/* Hero: the text on the left, the app on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(56px, 9vw, 112px);
  /* The blade stays inside the hero: never over the motto below, never wider than the page. */
  overflow: hidden;
  overflow: clip;
}
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 12px 0 10px;
  background: var(--control);
  color: var(--text);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  text-wrap: balance;
}
.lead {
  max-width: 560px;
  margin: 0;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px 0 18px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.button.primary { background: var(--edge); color: var(--on-edge); }
.button.primary:hover { color: var(--on-edge); filter: brightness(1.08); }
.button.secondary { background: var(--control); color: var(--text); font-weight: 500; }
.button.secondary:hover { color: var(--text-strong); }
.button:focus-visible, .top nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--text-strong); outline-offset: 2px; }

/* The app, drawn rather than pictured, in the look opposite the page's (--app-* above). */
.shot { position: relative; margin: 0; }
.shot .blade {
  position: absolute;
  right: -14%;
  bottom: -34%;
  width: 64%;
  height: auto;
  z-index: 0;
}
.blade .body { fill: var(--blade); }
.blade .cyan { fill: var(--glitch-cyan); opacity: 0.35; }
.blade .magenta { fill: var(--glitch-magenta); opacity: 0.3; }
.blade pattern rect { fill: var(--ink); opacity: 0.55; }
.blade .streak.cyan { opacity: 0.28; }
.blade .streak.magenta { opacity: 0.22; }
.blade .streak.edge { fill: var(--edge); opacity: 0.2; }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 380px;
  border-radius: 12px;
  background: var(--app-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  color: var(--app-text);
  font: 12.5px/1.45 var(--body);
}
.app-side { display: flex; flex-direction: column; background: var(--app-side); border-right: 1px solid var(--app-side-line); }
.lights { display: flex; gap: 6px; padding: 12px 12px 10px; }
.lights span { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.lights span:nth-child(2) { background: #febc2e; }
.lights span:nth-child(3) { background: #28c840; }
.side-body { display: flex; flex: 1; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 44px; padding: 2px 0 10px; }
.ws {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--ws);
  color: var(--ws-ink, #ffffff);
  font-size: 10px;
  font-weight: 800;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
}
.side-list { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding: 0 8px 10px 2px; }
.ws-name { padding: 2px 6px 8px; font-size: 13.5px; font-weight: 700; color: var(--app-strong); }
.group { padding: 8px 6px 3px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-ter); }
.item { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 6px; border-radius: 6px; color: var(--app-nav); white-space: nowrap; overflow: hidden; }
.item i { font-style: normal; color: var(--app-faint); }
.item.active { background: var(--app-active); color: var(--app-strong); font-weight: 600; }
.item em { margin-left: auto; padding: 0 5px; border-radius: 8px; background: #d70015; color: #ffffff; font-size: 9.5px; font-style: normal; font-weight: 700; }
.co {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 15px;
  height: 15px;
  background: var(--co);
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
}
.co.big { width: 22px; height: 22px; font-size: 11px; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.chan { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--app-line); }
.chan-name { display: flex; flex-direction: column; min-width: 0; }
.chan-name strong { font-size: 13.5px; color: var(--app-strong); }
.chan-name small { font-size: 11px; color: var(--app-sec); }
.deal { margin-left: auto; padding: 2px 8px; background: var(--app-deal-bg); color: var(--app-deal); font-size: 10.5px; font-weight: 600; clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); }
.msgs { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; flex: 1; padding: 14px 16px; }
.msg { display: flex; gap: 10px; }
.av { display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--av); color: #ffffff; font-size: 10px; font-weight: 700; }
.msg p { margin: 0; color: var(--app-msg); }
.msg .who { display: flex; align-items: center; gap: 6px; }
.msg .who strong { color: var(--app-strong); }
.msg time { font-size: 10.5px; color: var(--app-ter); }
.guest { padding: 0 5px; border: 1px solid var(--app-guest); border-radius: 4px; font-size: 10px; color: var(--app-nav); }
.mention { padding: 0 3px; border-radius: 4px; background: var(--app-mention); color: var(--app-edge); }
.thread { margin-top: 3px !important; font-size: 11px; font-weight: 600; color: var(--app-edge) !important; }
.composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 14px;
  padding: 9px 8px 9px 12px;
  background: var(--app-card);
  box-shadow: inset 0 0 0 1px var(--app-card-line);
  color: var(--app-faint);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.send { display: flex; align-items: center; justify-content: center; width: 26px; height: 22px; background: var(--app-edge); color: var(--app-on-edge); font-weight: 700; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); }

/* Phones: the conversation alone, without the sidebar or the blade. */
@media (max-width: 699px) {
  .app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .app-side { display: none; }
  .shot .blade { display: none; }
  .deal { display: none; }
}

/* The headline's slash: the logo's own, the same slant and weight against the letters, in the Edge. */
.h1-slash { display: inline-block; width: 0.456em; height: 0.768em; margin: 0 0.04em; vertical-align: -0.032em; fill: var(--edge); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sharp. Fast. Native.: the tagline in the logo's letters (outlines, like the logo), right below the hero. */
.motto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding: clamp(32px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .motto-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
.motto-item { display: flex; flex-direction: column; gap: 14px; }
.motto h3 { margin: 0; }
.motto svg { display: block; width: auto; height: clamp(46px, 5vw, 60px); }
.motto p { margin: 0; max-width: 320px; color: var(--text-secondary); }

/* Sections */
section { margin-bottom: clamp(56px, 8vw, 96px); }
section > h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
section > .intro { margin: 0 0 28px; max-width: 640px; color: var(--text-secondary); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.next {
  margin: 40px 0 16px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px 26px 24px;
  background: var(--card);
}
.card.coming { background: var(--graphite); }
.card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text-strong);
}
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.card svg { flex: none; color: var(--edge); }
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  background: rgba(138, 144, 153, 0.18);
  color: var(--text-secondary);
  font: 600 11px/1 var(--mono);
}

/* The keyboard strip */
.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}
.key-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  background: var(--graphite);
}
.key-row .combo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
kbd {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font: 600 13px/26px var(--mono);
  text-align: center;
}
code.command { font: 14px var(--mono); color: var(--edge); }
.key-row span.what { font-size: 14px; color: var(--text-secondary); }

/* Early access */
.access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
}
.access h2 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.01em; color: var(--text-strong); }
.access p { margin: 0; max-width: 560px; color: var(--text-secondary); }

/* Footer: the logo and the tagline, then who makes MaChat. */
footer {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  padding-bottom: 40px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 48px; }
.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand .logo { width: 120px; }
.tagline { margin: 0; font: 600 12px/1 var(--mono); letter-spacing: 0.04em; color: var(--text-secondary); }
.foot-legal { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
footer p { margin: 0; }
footer a { color: var(--text-secondary); }
