:root {
  --ak-field: #0a4846;
  --ak-field-dark: #063330;
  --ak-red: #eb003d;
  --ak-harvest: #ffb953;
  --ak-ground: #efeae4;
  --ak-paper: #f8f9f6;
  --ak-growth: #7fd383;
  --ak-grey: #5c747c;
  --ak-line: rgba(10, 72, 70, 0.2);
}

.agroak-case {
  background: var(--ak-paper);
  color: var(--ak-field-dark);
}

.agroak-case::selection {
  background: var(--ak-harvest);
  color: var(--ak-field-dark);
}

.agroak-case .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: rgba(6, 51, 48, 0.96);
}

.agroak-case .button {
  background: var(--ak-red);
}

.agroak-case .button:hover {
  background: #cc0035;
}

.agroak-case figure,
.agroak-case blockquote {
  margin: 0;
}

.ak-shell {
  width: min(100%, 1680px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ak-section {
  padding-block: clamp(104px, 10vw, 176px);
}

.ak-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ak-heading-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  margin-bottom: clamp(64px, 7vw, 120px);
}

.ak-heading-grid > .ak-eyebrow {
  grid-column: 1 / span 3;
  padding-top: 11px;
  color: rgba(6, 51, 48, 0.58);
}

.ak-heading-grid > h2 {
  grid-column: 4 / -1;
  max-width: 1280px;
  margin-bottom: clamp(38px, 4vw, 68px);
  color: var(--ak-field);
  font-size: clamp(62px, 7vw, 122px);
  line-height: 0.9;
}

.ak-heading-grid > .ak-copy {
  grid-column: 7 / -1;
  max-width: 760px;
}

.ak-copy {
  color: rgba(6, 51, 48, 0.8);
  font-size: clamp(17px, 1.2vw, 22px);
  line-height: 1.55;
}

.ak-copy p {
  margin-bottom: 1em;
}

.ak-copy p:last-child {
  margin-bottom: 0;
}

.ak-heading-grid--light > .ak-eyebrow,
.ak-heading-grid--light > h2,
.ak-heading-grid--light > .ak-copy {
  color: white;
}

.ak-heading-grid--light > .ak-copy {
  color: rgba(255, 255, 255, 0.78);
}

/* Hero: the photograph keeps its complete, source-authored frame. */

.ak-hero {
  position: relative;
  overflow: hidden;
  background: #70a9d4;
}

.ak-hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.ak-hero__meta {
  position: absolute;
  z-index: 2;
  top: clamp(24px, 2.4vw, 46px);
  right: var(--gutter);
  left: var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: rgba(6, 51, 48, 0.74);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ak-hero__card {
  position: absolute;
  z-index: 2;
  top: clamp(96px, 10vw, 176px);
  left: var(--gutter);
  width: min(640px, 42vw);
  padding: clamp(28px, 3.2vw, 56px);
  background: rgba(239, 234, 228, 0.94);
  color: var(--ak-field-dark);
  box-shadow: 0 24px 70px rgba(4, 40, 38, 0.12);
  backdrop-filter: blur(8px);
}

.ak-hero__logo {
  width: clamp(150px, 13vw, 250px);
  height: auto;
  margin-bottom: clamp(28px, 3.3vw, 54px);
}

.ak-hero__headline {
  max-width: 580px;
  margin-bottom: 26px;
  font: 400 clamp(52px, 4.8vw, 88px)/0.88 var(--display);
  letter-spacing: -0.045em;
}

.ak-hero__lead {
  max-width: 510px;
  margin: 0;
  font-size: clamp(16px, 1.15vw, 21px);
  line-height: 1.5;
}

.ak-hero__scroll {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(22px, 3vw, 48px);
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

/* Section index */

.ak-index {
  position: sticky;
  z-index: 30;
  top: var(--header-h);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--ak-line);
  background: rgba(248, 249, 246, 0.96);
  backdrop-filter: blur(14px);
}

.ak-index a {
  min-height: 76px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-right: 1px solid var(--ak-line);
  color: var(--ak-field-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.ak-index a:last-child {
  border-right: 0;
}

.ak-index a span {
  color: var(--ak-red);
  font-size: 9px;
}

.ak-index a:is(:hover, :focus-visible),
.ak-index a[aria-current="true"] {
  background: var(--ak-field);
  color: white;
}

.ak-index a:is(:hover, :focus-visible) span,
.ak-index a[aria-current="true"] span {
  color: var(--ak-harvest);
}

/* Shared image layouts */

.ak-wide-figure,
.ak-edge-figure {
  width: min(calc(100% - (var(--gutter) * 2)), 1680px);
  margin-inline: auto !important;
}

.ak-edge-figure {
  width: 100%;
}

.ak-wide-figure img,
.ak-edge-figure img,
.ak-architecture figure img,
.ak-applications figure img {
  width: 100%;
  height: auto;
}

.agroak-case figcaption {
  padding-top: 13px;
  color: rgba(6, 51, 48, 0.56);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ak-edge-figure figcaption {
  padding-inline: var(--gutter);
}

/* Context */

.ak-context {
  background: var(--ak-paper);
}

/* Category */

.ak-category {
  background: var(--ak-ground);
}

.ak-category__intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.ak-category__intro > .ak-eyebrow {
  grid-column: 1 / span 3;
  padding-top: 10px;
  color: rgba(6, 51, 48, 0.6);
}

.ak-category__intro h2 {
  grid-column: 4 / -1;
  max-width: 1240px;
  margin-bottom: clamp(54px, 7vw, 108px);
  color: var(--ak-field);
  font-size: clamp(62px, 7vw, 122px);
  line-height: 0.9;
}

.ak-category__copy {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 72px);
  color: rgba(6, 51, 48, 0.82);
  font-size: clamp(17px, 1.2vw, 22px);
  line-height: 1.55;
}

.ak-category__copy p {
  margin: 0;
}

.ak-category__board {
  margin-top: clamp(70px, 8vw, 130px) !important;
}

.ak-category__board img {
  width: 100%;
  height: auto;
}

.ak-category__quote {
  margin-top: clamp(74px, 8vw, 138px) !important;
  padding-top: clamp(42px, 5vw, 76px);
  border-top: 1px solid var(--ak-field);
}

.ak-category__quote p {
  max-width: 1480px;
  margin: 0;
  color: var(--ak-field);
  font: 400 clamp(58px, 7.6vw, 136px)/0.88 var(--display);
  letter-spacing: -0.045em;
}

/* Identity */

.ak-identity {
  position: relative;
  overflow: hidden;
  background: var(--ak-field);
  color: white;
}

.ak-logo-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ak-logo-stage > div {
  min-height: clamp(420px, 43vw, 760px);
  display: grid;
  place-items: center;
  padding: clamp(54px, 8vw, 138px);
}

.ak-logo-stage img {
  width: min(100%, 440px);
  height: auto;
}

.ak-logo-stage__light {
  background: var(--ak-ground);
}

.ak-logo-stage__dark {
  background: var(--ak-field-dark);
}

.ak-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(64px, 7vw, 116px);
}

.ak-palette span {
  min-height: clamp(150px, 15vw, 240px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 1.8vw, 28px);
  background: var(--color);
  color: white;
}

.ak-palette span:nth-child(3),
.ak-palette span:nth-child(4),
.ak-palette span:nth-child(5) {
  color: var(--ak-field-dark);
}

.ak-palette b,
.ak-palette i {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ak-identity-board {
  margin-top: clamp(64px, 7vw, 116px) !important;
}

.ak-identity-board img {
  width: 100%;
  height: auto;
}

.ak-identity .ak-identity-board figcaption {
  color: rgba(255, 255, 255, 0.58);
}

.ak-pattern-band {
  height: clamp(210px, 24vw, 390px);
  margin-top: clamp(74px, 8vw, 138px);
  overflow: hidden;
  background: var(--ak-harvest);
}

.ak-pattern-band img {
  width: 100%;
  height: 100%;
  padding: clamp(28px, 4vw, 68px);
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(20%) sepia(26%) saturate(1440%) hue-rotate(128deg) brightness(91%);
}

/* Architecture */

.ak-architecture {
  padding-bottom: clamp(112px, 12vw, 200px);
  background: #f1f2ed;
}

.ak-architecture .ak-edge-figure {
  margin-top: 0 !important;
}

.ak-architecture__pair {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(18px, 2.3vw, 38px);
  align-items: start;
  margin-block: clamp(74px, 8vw, 130px);
}

.ak-architecture__pair figure:nth-child(2) {
  padding-top: clamp(50px, 7vw, 124px);
}

.ak-tractor-figure {
  width: min(100%, 1300px);
  margin-top: clamp(74px, 8vw, 130px) !important;
}

/* Packaging */

.ak-packaging {
  background: var(--ak-field-dark);
  color: white;
}

.ak-packaging .ak-edge-figure figcaption {
  color: rgba(255, 255, 255, 0.56);
}

.ak-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(70px, 8vw, 130px);
  background: rgba(255, 255, 255, 0.2);
}

.ak-products figure {
  background: var(--ak-ground);
}

.ak-products figure > div {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: clamp(18px, 2.6vw, 46px);
}

.ak-products img {
  width: 100%;
  height: auto;
  max-height: 100%;
}

.ak-products figcaption {
  min-height: 58px;
  padding: 18px;
  border-top: 1px solid var(--ak-line);
  color: rgba(6, 51, 48, 0.62);
}

/* Applications */

.ak-applications {
  background: var(--ak-paper);
}

.ak-applications__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 7vw, 110px) clamp(18px, 2.3vw, 38px);
  align-items: start;
}

.ak-applications__media .ak-applications__wide {
  grid-column: 1 / -1;
}

.ak-object-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(80px, 9vw, 148px);
  background: var(--ak-line);
}

.ak-object-grid figure {
  background: var(--ak-ground);
}

.ak-object-grid figure > div {
  min-height: clamp(360px, 42vw, 700px);
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 86px);
  overflow: hidden;
}

.ak-object-grid img {
  width: 100%;
  height: auto;
  max-height: clamp(320px, 36vw, 620px);
  object-fit: contain;
}

.ak-object-grid figure:nth-child(2) img {
  width: auto;
}

.ak-object-grid figcaption {
  padding: 18px;
  border-top: 1px solid var(--ak-line);
}

/* Result */

.ak-result {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ak-harvest);
  color: var(--ak-field-dark);
}

.ak-result::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -12vw;
  bottom: -18vw;
  width: min(70vw, 1120px);
  aspect-ratio: 1.5;
  background: url("/ru-v1-case-agroak-v1/assets/pattern.svg") center / contain no-repeat;
  opacity: 0.15;
  transform: rotate(-8deg);
}

.ak-result__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
  gap: clamp(54px, 9vw, 150px);
  align-items: end;
}

.ak-result__grid h2 {
  max-width: 1120px;
  margin: clamp(28px, 3vw, 52px) 0 34px;
  color: var(--ak-field);
  font-size: clamp(62px, 7vw, 122px);
  line-height: 0.9;
}

.ak-result__grid > div > p:last-child {
  max-width: 700px;
  margin: 0;
  font-size: clamp(17px, 1.2vw, 22px);
}

.ak-result__grid ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ak-field);
  list-style: none;
}

.ak-result__grid li {
  padding: 14px 0;
  border-bottom: 1px solid var(--ak-field);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Contact */

.ak-contact {
  background: var(--ak-field-dark);
}

.ak-contact .gradient-text {
  background-image: linear-gradient(105deg, var(--ak-harvest), var(--ak-growth), #dbe8c5);
}

.ak-contact .button {
  color: white;
}

/* Reveal */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.22, 1, .36, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .ak-hero__card {
    width: min(610px, 50vw);
  }

  .ak-hero__headline {
    font-size: clamp(46px, 5vw, 70px);
  }

  .ak-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ak-object-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ak-object-grid figure:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .ak-section {
    padding-block: 80px;
  }

  .ak-heading-grid,
  .ak-category__intro {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 52px;
  }

  .ak-heading-grid > .ak-eyebrow,
  .ak-heading-grid > h2,
  .ak-heading-grid > .ak-copy,
  .ak-category__intro > .ak-eyebrow,
  .ak-category__intro h2,
  .ak-category__copy {
    grid-column: auto;
  }

  .ak-heading-grid > .ak-eyebrow,
  .ak-category__intro > .ak-eyebrow {
    padding-top: 0;
    margin-bottom: 28px;
  }

  .ak-heading-grid > h2,
  .ak-category__intro h2 {
    margin-bottom: 34px;
    font-size: clamp(52px, 15vw, 74px);
  }

  .ak-copy,
  .ak-category__copy {
    font-size: 17px;
  }

  .ak-category__copy {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ak-hero {
    display: flex;
    flex-direction: column;
    background: var(--ak-ground);
  }

  .ak-hero__meta {
    position: relative;
    inset: auto;
    order: 0;
    padding: 20px var(--gutter);
    color: rgba(6, 51, 48, 0.66);
  }

  .ak-hero__meta span:last-child {
    display: none;
  }

  .ak-hero__card {
    position: relative;
    inset: auto;
    order: 1;
    width: auto;
    padding: 44px var(--gutter) 52px;
    background: var(--ak-ground);
    box-shadow: none;
    backdrop-filter: none;
  }

  .ak-hero__logo {
    width: 148px;
    margin-bottom: 34px;
  }

  .ak-hero__headline {
    font-size: clamp(56px, 16vw, 80px);
  }

  .ak-hero__image {
    order: 2;
  }

  .ak-hero__scroll {
    display: none;
  }

  .ak-index {
    grid-template-columns: none;
    grid-auto-columns: minmax(146px, 42vw);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .ak-index::-webkit-scrollbar {
    display: none;
  }

  .ak-index a {
    min-height: 58px;
  }

  .ak-category__board,
  .ak-category__quote,
  .ak-identity-board,
  .ak-pattern-band,
  .ak-architecture__pair,
  .ak-tractor-figure,
  .ak-products,
  .ak-object-grid {
    margin-top: 56px !important;
  }

  .ak-category__quote p {
    font-size: clamp(50px, 15vw, 74px);
  }

  .ak-logo-stage {
    grid-template-columns: 1fr;
  }

  .ak-logo-stage > div {
    min-height: 320px;
    padding: 70px var(--gutter);
  }

  .ak-logo-stage img {
    width: min(100%, 280px);
  }

  .ak-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0;
  }

  .ak-palette span {
    min-height: 150px;
  }

  .ak-palette span:first-child {
    grid-column: 1 / -1;
  }

  .ak-architecture__pair {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .ak-architecture__pair figure:nth-child(2) {
    padding-top: 0;
  }

  .ak-products {
    grid-template-columns: 1fr;
    padding-inline: var(--gutter);
    background: transparent;
    gap: 14px;
  }

  .ak-applications__media,
  .ak-object-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    background: transparent;
  }

  .ak-applications__media .ak-applications__wide,
  .ak-object-grid figure:last-child {
    grid-column: auto;
  }

  .ak-object-grid figure > div {
    min-height: 420px;
  }

  .ak-result__grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .ak-result__grid h2 {
    font-size: clamp(52px, 15vw, 74px);
  }

  .ak-result::before {
    width: 130vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
