/* =============================================================
   RINNOTECH – landing page styles
   Sections: 1 tokens · 2 base · 3 shared pieces · 4 header
             5 hero · 6 section basics · 7 department colours
             8 ticker · 9 departments · 10 how it works
             11 security · 12 activity log · 13 call to action
             14 footer · 15 animations
   ============================================================= */


/* ---------- 1. Design tokens ---------- */

:root {
  /* Colours (from the brief) */
  --ink:       #16163F;  /* text, borders, dark buttons (never pure black) */
  --ink-soft:  #3E4068;  /* body text on white */
  --ink-muted: #5A5C80;  /* small captions, notes */
  --white:     #FFFFFF;  /* page background */
  --wash:      #EEF1FF;  /* hero frame background */
  --band:      #F3F4FB;  /* "How it works" section background */
  --line:      #E4E6F3;  /* light dividers */
  --cobalt:    #2F5BEA;  /* primary buttons, Legal; white text on it */
  --sun:       #FFC53D;  /* Finance; ink text on it */
  --coral:     #FF5D73;  /* HR, "Blocked" status; ink text on it */
  --mint:      #2BD9A3;  /* Sales, "Done" status; ink text on it */
  --lilac:     #C9B8FF;  /* Operations; ink text on it */

  --cobalt-dark: #1E3FB5; /* hover state for cobalt */

  /* Type */
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 32px);

  /* Shapes */
  --r-pill: 999px;
  --stroke: 3px;
}


/* ---------- 2. Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance; /* even line lengths, no single word left alone */
}

a {
  color: var(--cobalt);
}

a:hover {
  color: var(--cobalt-dark);
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

/* Sections that receive focus after an in-page link don't need a ring */
[tabindex="-1"]:focus {
  outline: none;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}


/* ---------- 3. Shared pieces ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Colour helpers for small dots */
.bg-cobalt { background: var(--cobalt); }
.bg-sun    { background: var(--sun); }
.bg-coral  { background: var(--coral); }
.bg-mint   { background: var(--mint); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: var(--stroke) solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-lg {
  min-height: 60px;
  padding: 0 32px;
  font-size: 19px;
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: var(--white);
}

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

.btn-primary:hover {
  background: var(--cobalt-dark);
  border-color: var(--cobalt-dark);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}


/* ---------- 4. Header ---------- */

.site-header {
  position: relative;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  flex: none;
  width: 24px;
  height: 48px;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding-block: 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration-line: underline;
}

/* Menu button: only shown on narrow screens when JavaScript is on */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px 0 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.menu-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.menu-icon-close,
.menu-toggle[aria-expanded="true"] .menu-icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon-close {
  display: block;
}

@media (max-width: 959px) {
  /* Without JavaScript the links simply wrap under the logo */
  .header-inner {
    flex-wrap: wrap;
  }

  .js .header-inner {
    flex-wrap: nowrap;
  }

  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: calc(100% - 12px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    border: var(--stroke) solid var(--ink);
    border-radius: 28px;
    background: var(--white);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .nav-links {
    flex-direction: column;
    gap: 2px;
  }

  .js .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 19px;
    font-weight: 600; /* same weight as the buttons, so it is already loaded */
  }

  .js .nav-links a:hover {
    background: var(--wash);
    text-decoration-line: none;
  }

  .js .site-nav .btn {
    min-height: 56px;
  }
}

@media (max-width: 400px) {
  .logo {
    gap: 10px;
  }

  .logo-word {
    font-size: 19px;
  }
}


/* ---------- 5. Hero ---------- */

.hero {
  padding-block: 48px 80px;
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
}

.hero-copy {
  flex: 1 1 440px;
  min-width: 0;
}

.hero-title {
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* Text and picture sit side by side from here up */
@media (min-width: 1068px) {
  .hero-title {
    font-size: clamp(42px, 5.2vw, 76px);
  }
}

.hero-lead {
  margin-top: 28px;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: clamp(18px, 1rem + 0.4vw, 21px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-note {
  margin-top: 28px;
  color: var(--ink-muted);
  font-size: 16px;
}

@media (max-width: 520px) {
  .hero {
    padding-top: 24px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* The illustration */
.hero-art {
  flex: 1 1 500px;
  min-width: 0;
  max-width: 620px;
  margin-inline: auto;
  padding: 28px 8px 40px;
  container-type: inline-size;
}

.company-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  border: 6px solid var(--ink);
  border-radius: clamp(32px, 9cqi, 56px);
  background: var(--wash);
}

/* .drop is the moving part, .shape is the coloured part inside it */
.drop {
  position: absolute;
  animation: drop-in 0.9s cubic-bezier(0.34, 1.56, 0.5, 1) both;
}

.shape {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  color: var(--ink);
}

.shape-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

.shape-task {
  margin-top: 6px;
  line-height: 1.25;
}

/* Legal: cobalt circle */
.drop-legal {
  left: 7%;
  top: 10%;
  width: 47%;
  aspect-ratio: 1;
  animation-delay: 0.1s;
}

.shape-legal {
  padding: 0 17%;
  border-radius: 50%;
  background: var(--cobalt);
  color: var(--white);
}

.shape-legal .shape-name { font-size: clamp(15px, 4.6cqi, 28px); }
.shape-legal .shape-task { font-size: clamp(12px, 2.6cqi, 16px); }

/* Finance: sun rounded square, slightly tilted */
.drop-finance {
  right: 7%;
  top: 7%;
  width: 32%;
  aspect-ratio: 1;
  animation-delay: 0.28s;
}

.shape-finance {
  padding: 0 10%;
  border-radius: 16%;
  background: var(--sun);
  transform: rotate(-8deg);
}

.shape-finance .shape-name { font-size: clamp(14px, 3.7cqi, 22px); }
.shape-finance .shape-task { font-size: clamp(11px, 2.5cqi, 15px); }

/* HR: coral pill */
.drop-hr {
  left: 8%;
  bottom: 9%;
  width: 56%;
  height: 23%;
  animation-delay: 0.46s;
}

.shape-hr {
  padding: 0 8%;
  border-radius: var(--r-pill);
  background: var(--coral);
}

.shape-hr .shape-name { font-size: clamp(14px, 3.7cqi, 22px); }
.shape-hr .shape-task { margin-top: 4px; font-size: clamp(11px, 2.5cqi, 15px); }

/* Sales: mint circle */
.drop-sales {
  right: 6%;
  bottom: 32%;
  width: 20%;
  aspect-ratio: 1;
  animation-delay: 0.62s;
}

.shape-sales {
  border-radius: 50%;
  background: var(--mint);
}

.shape-sales .shape-name { font-size: clamp(12px, 2.8cqi, 17px); }

/* Russian page (index_ru.html): longer words need smaller labels to fit the shapes */
:lang(ru) .shape-finance .shape-name { font-size: clamp(12px, 3.2cqi, 20px); }
:lang(ru) .shape-sales .shape-name { font-size: clamp(9px, 2.3cqi, 14px); }

/* Chips sitting on the frame edge */
.frame-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.chip-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.chip-top {
  position: absolute;
  top: -24px;
  left: 40px;
  animation: fade-up 0.5s ease-out 1.1s both;
}

.chips-bottom {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  animation: fade-up 0.5s ease-out 1.3s both;
}

/* Narrow illustration (phones): taller frame so the chips have room */
@container (max-width: 500px) {
  .company-frame {
    aspect-ratio: 1 / 1.12;
  }

  .drop-hr {
    bottom: 21%;
  }

  .frame-chip {
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .chip-top {
    top: -20px;
    left: 20px;
  }

  .chips-bottom {
    left: 12px;
    right: 12px;
    bottom: -20px;
  }

  /* When the two chips wrap, push the second one to the right */
  .chips-bottom .frame-chip:last-child {
    margin-left: auto;
  }
}


/* ---------- 6. Section basics ---------- */

section[id] {
  scroll-margin-top: 24px;
}

.section-title {
  max-width: 18ch;
  font-size: clamp(32px, 3.8vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.section-intro {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: clamp(17px, 1rem + 0.2vw, 19px);
  line-height: 1.55;
}

/* Row of toggle buttons (department tabs, activity filters) */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.choice:hover {
  background: var(--wash);
}

.choice[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}


/* ---------- 7. Department colours and shapes ---------- */
/* A department always shows its colour together with its shape:
   Finance and Operations = rounded square, Legal and Sales = circle, HR = pill. */

.dept-finance { --dept: var(--sun);    --dept-shade: #FFD978; --dot-r: 4px;   --big-r: 72px; }
.dept-legal   { --dept: var(--cobalt); --dept-shade: #4467EE; --dot-r: 50%;   --big-r: 50%; --dept-fg: var(--white); }
.dept-hr      { --dept: var(--coral);  --dept-shade: #FF8C9C; --dot-r: 999px; --big-r: 999px; --big-h: 200px; --dot-w: 1.6; }
.dept-sales   { --dept: var(--mint);   --dept-shade: #7DEBC7; --dot-r: 50%;   --big-r: 50%; }
.dept-ops     { --dept: var(--lilac);  --dept-shade: #DDD2FF; --dot-r: 4px;   --big-r: 72px; }

/* Small shape used in tabs, chips and the activity log */
.dept-dot {
  flex: none;
  width: calc(var(--dot-size, 16px) * var(--dot-w, 1));
  height: var(--dot-size, 16px);
  border: 2px solid var(--ink);
  border-radius: var(--dot-r);
  background: var(--dept);
}


/* ---------- 8. Task ticker ---------- */

.ticker {
  overflow: hidden;
  margin-bottom: clamp(72px, 10vw, 128px);
  padding-block: 18px;
  border-block: var(--stroke) solid var(--ink);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 45s linear infinite;
}

.ticker-chip {
  --dot-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px; /* margin, not gap, so the loop has no jump */
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}


/* ---------- 9. Departments ---------- */

.departments {
  padding-bottom: clamp(72px, 10vw, 128px);
}

#dept-tabs {
  margin-top: 40px;
}

.dept-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: 24px;
  padding: 56px;
  border-radius: 48px;
  background: var(--dept);
  color: var(--dept-fg, var(--ink));
}

.dept-panel-shape {
  position: absolute;
  left: -90px;
  bottom: -130px;
  width: 400px;
  height: var(--big-h, 400px);
  border-radius: var(--big-r);
  background: var(--dept-shade);
}

.dept-info {
  position: relative;
  flex: 1 1 320px;
  min-width: 0;
}

.dept-name {
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.dept-pitch {
  margin-top: 18px;
  max-width: 26ch;
  font-size: clamp(19px, 1rem + 0.4vw, 21px);
  font-weight: 500;
  line-height: 1.45;
}

.dept-label {
  font-size: 16px;
  font-weight: 700;
}

.dept-info .dept-label {
  margin-top: 32px;
}

.dept-tools {
  margin-top: 6px;
  max-width: 30ch;
  font-size: 17px;
  line-height: 1.5;
}

.dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.dept-badge svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dept-tasks {
  position: relative;
  flex: 1.4 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dept-tasks .dept-label {
  font-size: 17px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.task {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border: var(--stroke) solid var(--ink);
  border-radius: 28px;
  background: var(--white);
  color: var(--ink);
}

.task-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
  background: var(--dept);
  color: var(--dept-fg, var(--ink));
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.task-who {
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
}

.task-text {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .dept-panel {
    gap: 32px;
    padding: 32px 22px;
    border-radius: 32px;
  }

  .dept-tasks {
    flex-basis: 100%;
  }

  /* Avatar and name on one line, the quote full width below */
  .task {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 12px;
    padding: 18px;
    border-radius: 24px;
  }

  .task > div {
    display: contents;
  }

  .task-avatar {
    width: 38px;
    height: 38px;
  }

  .task-text {
    grid-column: 1 / -1;
    margin-top: 10px;
    font-size: 17px;
  }
}


/* ---------- 10. How it works ---------- */

.how {
  background: var(--band);
}

.how .container {
  padding-block: clamp(64px, 9vw, 112px);
}

.section-title-wide {
  max-width: 20ch;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 32px;
  margin-top: 56px;
  padding: 0;
  list-style: none;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
}

.step-num.bg-cobalt { color: var(--white); }
.num-circle { border-radius: 50%; }
.num-square { border-radius: 28px; }
.num-pill   { width: 140px; border-radius: var(--r-pill); }

.step-title {
  margin-top: 28px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.step-text {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
}


/* ---------- 11. Security, records and safety ---------- */

.platform {
  padding-block: clamp(72px, 10vw, 128px);
}

.sec-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 56px;
}

.sec-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 320px;
  min-width: 0;
  min-height: 380px;
  padding: 48px 40px;
  border-radius: 40px;
  color: var(--ink);
  container-type: inline-size; /* lets the decoration adapt to the card's width */
}

.sec-teams,
.sec-control {
  flex: 2 1 560px;
  padding: 48px;
}

.sec-teams,
.sec-security {
  min-height: 420px;
}

.sec-teams    { background: var(--cobalt); color: var(--white); }
.sec-security { background: var(--sun); }
.sec-records  { background: var(--mint); }
.sec-control  { background: var(--coral); }

.sec-body {
  position: relative;
  max-width: 28rem;
}

.sec-card h3 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.12;
}

.sec-teams h3,
.sec-control h3 {
  font-size: 34px;
}

.sec-body p {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.55;
}

.sec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
}

.sec-list-dots {
  margin-top: 28px;
}

.sec-list-dots li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sec-list-dots li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

/* Decorations, partly cropped off the card edge */
.deco-grid {
  position: absolute;
  right: -60px;
  bottom: -60px;
  display: grid;
  grid-template-columns: repeat(2, 130px);
  grid-auto-rows: 130px;
  align-items: center;
  gap: 16px;
  transform: rotate(-8deg);
}

.deco-grid span { height: 100%; }
.deco-grid span:nth-child(1) { border-radius: 50%;  background: #5B7FF2; }       /* Legal circle */
.deco-grid span:nth-child(2) { border-radius: 32px; background: var(--sun); }   /* Finance square */
.deco-grid span:nth-child(3) { height: 56%; border-radius: var(--r-pill); background: var(--coral); } /* HR pill */
.deco-grid span:nth-child(4) { border-radius: 50%;  background: var(--mint); }  /* Sales circle */

.deco-frame {
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 190px;
  height: 190px;
  border: 18px solid var(--ink);
  border-radius: 44px;
  transform: rotate(-10deg);
}

.deco-bars {
  position: absolute;
  right: 32px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 150px;
}

.deco-bars span {
  height: 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
}

.deco-bars span:nth-child(2) { width: 75%; }
.deco-bars span:nth-child(3) { width: 90%; }

.deco-toggle {
  position: absolute;
  right: -40px;
  top: 50%;
  display: flex;
  align-items: center;
  width: 300px;
  height: 150px;
  padding-left: 20px;
  border-radius: var(--r-pill);
  background: var(--white);
  transform: translateY(-50%);
}

.deco-toggle span {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--ink);
}

/* Narrow cards: smaller decorations, kept below the text.
   (Measured inside the card's padding; below this the big shapes would touch the text.) */
@container (max-width: 659px) {
  .sec-body {
    max-width: none;
    padding-bottom: var(--deco-room, 0);
  }

  .deco-grid {
    right: -20px;
    bottom: -20px;
    grid-template-columns: repeat(2, 84px);
    grid-auto-rows: 84px;
    gap: 12px;
  }

  .deco-grid span:nth-child(2) { border-radius: 22px; }

  .deco-frame {
    right: -30px;
    bottom: -30px;
    width: 130px;
    height: 130px;
    border-width: 14px;
    border-radius: 32px;
  }

  .deco-bars {
    right: 28px;
    bottom: 28px;
    gap: 10px;
    width: 120px;
  }

  .deco-bars span {
    height: 14px;
  }

  .deco-toggle {
    top: auto;
    bottom: -24px;
    width: 220px;
    height: 110px;
    padding-left: 16px;
    transform: none;
  }

  .deco-toggle span {
    width: 80px;
    height: 80px;
  }
}

.sec-teams    { --deco-room: 150px; }
.sec-security { --deco-room: 90px; }
.sec-records  { --deco-room: 70px; }
.sec-control  { --deco-room: 70px; }

@media (max-width: 640px) {
  .sec-card,
  .sec-teams,
  .sec-control {
    min-height: 0;
    padding: 32px 24px;
    border-radius: 32px;
  }

  .sec-card h3 {
    font-size: 26px;
  }

  .sec-teams h3,
  .sec-control h3 {
    font-size: 28px;
  }
}


/* ---------- 12. Company activity ---------- */

.log {
  padding-bottom: clamp(72px, 10vw, 128px);
}

.log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}

.log-intro {
  flex: 1 1 420px;
  min-width: 0;
}

.log-intro .section-intro {
  max-width: 48ch;
}

.choice-sm {
  min-height: 48px;
  padding: 0 22px;
  font-size: 16px;
}

.log-card {
  margin-top: 40px;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 32px;
  background: var(--white);
}

.log-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  background: var(--ink);
  color: var(--white);
}

.log-bar-title {
  font-size: 18px;
  font-weight: 700;
}

.log-live {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
}

.log-list {
  padding: 0;
  list-style: none;
}

.log-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 20px 24px;
  border-top: 2px solid var(--line);
}

.log-time {
  flex: 0 0 56px;
  color: var(--ink-muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.log-dept {
  flex: 0 0 140px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.log-main {
  flex: 1 1 300px;
  min-width: 0;
}

.log-task {
  font-size: 17px;
  font-weight: 500;
}

.log-note {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 14px;
}

.status {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.status-done     { background: var(--mint); }
.status-approval { background: var(--sun); }
.status-blocked  { background: var(--coral); }

@media (max-width: 640px) {
  .choice-sm {
    padding: 0 16px;
    font-size: 15px;
  }

  .log-card {
    border-radius: 24px;
  }

  .log-row {
    padding: 18px 20px;
  }
}


/* ---------- 13. Call to action ---------- */

.cta {
  padding-bottom: clamp(64px, 9vw, 112px);
}

.cta-box {
  position: relative;
  overflow: hidden;
  padding: 88px 64px;
  border-radius: 48px;
  background: var(--cobalt);
  color: var(--white);
}

/* White focus ring, because the usual cobalt one would vanish here */
.cta-box :focus-visible {
  outline-color: var(--white);
}

.cta-sun {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--sun);
}

.cta-pill {
  position: absolute;
  right: 180px;
  bottom: -60px;
  width: 260px;
  height: 120px;
  border-radius: var(--r-pill);
  background: var(--mint);
}

.cta-body {
  position: relative;
  max-width: 42rem;
}

.cta-title {
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.cta-text {
  margin-top: 20px;
  max-width: 42ch;
  font-size: clamp(17px, 1rem + 0.2vw, 19px);
  line-height: 1.55;
}

.demo-form {
  margin-top: 36px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.field {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 16px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 60px;
  padding: 0 24px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
}

.field input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

/* On the cobalt box the dark button turns white on hover (cobalt would disappear) */
.cta-box .btn-dark:hover {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}

/* Error message: empty (and invisible) until there is something to say */
.form-error {
  display: inline-block;
  border-radius: 20px; /* not a full pill: the message can wrap on phones */
  background: var(--sun);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.form-error:not(:empty) {
  margin-top: 14px;
  padding: 8px 18px;
}

.form-success {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding: 18px 26px;
  border: var(--stroke) solid var(--ink);
  border-radius: 28px;
  background: var(--white);
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.form-success::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mint);
}

/* Medium screens: smaller shapes, kept clear of the text */
@media (max-width: 1099px) {
  .cta-box {
    padding: 72px 56px;
  }

  .cta-title {
    max-width: calc(100% - 100px);
  }

  .cta-sun {
    right: -90px;
    top: -90px;
    width: 240px;
    height: 240px;
  }

  .cta-pill {
    right: 120px;
    width: 200px;
    height: 100px;
  }
}

/* Phones: the sun sits above the heading, the pill below the button */
@media (max-width: 640px) {
  .cta-box {
    padding: 104px 24px 48px;
    border-radius: 32px;
  }

  .cta-title {
    max-width: none;
  }

  .cta-sun {
    right: -50px;
    top: -70px;
    width: 160px;
    height: 160px;
  }

  .cta-pill {
    right: 32px;
    bottom: -50px;
    width: 150px;
    height: 80px;
  }

  .form-row .btn {
    flex: 1 1 100%;
  }
}


/* ---------- 14. Footer ---------- */

.site-footer {
  border-top: 2px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 40px 56px;
}

.logo-sm .logo-mark {
  width: 18px;
  height: 36px;
}

.logo-sm .logo-word {
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 8px;
  color: var(--ink-soft);
  font-size: 16px;
  text-decoration: none;
  text-underline-offset: 4px;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration-line: underline;
}

.footer-copy {
  color: var(--ink-muted);
  font-size: 15px;
}


/* ---------- 15. Animations ---------- */

@keyframes drop-in {
  0%   { opacity: 0; transform: translateY(-70px) scale(0.85); }
  100% { opacity: 1; transform: none; }
}

@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: none; }
}

/* The chip list is doubled, so moving it by half loops seamlessly */
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* Visitors who ask for less motion: no drop-in, no ticker, no smooth scroll */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
