﻿/* =========================================================
   NOCTURNE — dedicated download page
   ========================================================= */

body.download-page {
  min-height: 100svh;
  background: #2b0710;
}

/* ---------------------------------------------------------
   Backdrop: a quiet mosaic of current covers
   --------------------------------------------------------- */

.dl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 5px;
  overflow: hidden;
  pointer-events: none;
}

.dl-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(0.82) brightness(0.72);
}

.dl-bg img:nth-child(4n + 2) {
  object-position: center 28%;
}

.dl-bg img:nth-child(4n + 3) {
  object-position: center 38%;
}

.dl-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 48%, rgba(117, 28, 40, 0.4), transparent 58%),
    linear-gradient(90deg, rgba(25, 4, 9, 0.95), rgba(34, 6, 12, 0.58) 48%, rgba(25, 4, 9, 0.92)),
    linear-gradient(180deg, rgba(25, 4, 9, 0.9), rgba(27, 5, 10, 0.5) 42%, rgba(19, 3, 7, 0.95));
  pointer-events: none;
}

.dl-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 238, 219, 0.045) 1px, transparent 1px);
  background-size: 100% 25%;
  opacity: 0.4;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.dl-header {
  position: relative;
  z-index: 4;
  padding: clamp(18px, 3vh, 30px) var(--gutter) 0;
}

.dl-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1240px);
  margin-inline: auto;
}

.dl-header .brand {
  color: var(--ink);
}

.dl-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dl-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.35s var(--ease);
}

.dl-back svg {
  width: 17px;
  height: 17px;
}

.dl-back:hover {
  border-color: rgba(255, 229, 205, 0.48);
  background: rgba(255, 236, 220, 0.07);
  color: var(--ink);
  transform: translateX(-2px);
}

[dir="rtl"] .dl-back svg,
[dir="rtl"] .dl-download > svg:last-child {
  transform: scaleX(-1);
}

[dir="rtl"] .dl-back:hover {
  transform: translateX(2px);
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.dl-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, calc(1120px + (var(--gutter) * 2)));
  min-height: calc(100svh - 144px);
  margin-inline: auto;
  padding: clamp(14px, 2.6vh, 28px) var(--gutter) 24px;
}

.dl-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  width: 100%;
  min-height: clamp(560px, 62svh, 640px);
  overflow: hidden;
  border: 1px solid rgba(244, 214, 177, 0.26);
  border-radius: 7px;
  background: #3b0c14;
  box-shadow:
    0 44px 110px rgba(8, 1, 3, 0.52),
    0 2px 0 rgba(255, 240, 222, 0.07) inset;
  animation: dlRise 0.85s var(--ease) both;
}

@keyframes dlRise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   Left: brand story
   --------------------------------------------------------- */

.dl-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(30px, 3.4vw, 46px);
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(47, 9, 16, 0.42), rgba(28, 4, 9, 0.9) 72%),
    url("../image/r12.jpg") center 32% / cover no-repeat;
  color: var(--ink);
}

.dl-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 90%, rgba(133, 47, 47, 0.42), transparent 55%),
    linear-gradient(180deg, rgba(34, 6, 11, 0.38), rgba(30, 5, 10, 0.86));
  pointer-events: none;
}

.dl-story::after {
  content: "";
  position: absolute;
  top: 17%;
  right: -150px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(242, 207, 156, 0.12);
  border-radius: 50%;
  box-shadow:
    inset 46px 18px 0 rgba(242, 207, 156, 0.025),
    0 0 0 34px rgba(242, 207, 156, 0.025);
  pointer-events: none;
}

.dl-story > * {
  position: relative;
  z-index: 1;
}

.dl-brand-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}

.dl-logo-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
}

.dl-logo-mark svg {
  width: 100%;
  height: 100%;
}

.dl-brand-name {
  color: #f8e3cd;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.24em;
}

.dl-story-copy {
  margin-block: auto;
  padding-block: clamp(36px, 6vh, 70px) 28px;
}

.dl-story .eyebrow {
  color: #e6b7a4;
  font-size: 8.5px;
}

.dl-card .eyebrow::before {
  content: "";
  width: 25px;
  height: 1px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.55;
}

.dl-story h1 {
  margin: 19px 0 0;
  color: #fff4e6;
  font-family: var(--serif);
  font-size: clamp(44px, 4.5vw, 66px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.dl-story-copy > p:not(.eyebrow) {
  max-width: 310px;
  margin: 18px 0 0;
  color: #f2d6c7;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.dl-promise {
  display: inline-block;
  margin-top: 24px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid rgba(242, 207, 156, 0.55);
  color: #d4a796;
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dl-story-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 237, 223, 0.17);
  color: #d9b3a5;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dl-stars {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.16em;
}

/* ---------------------------------------------------------
   Right: installation
   --------------------------------------------------------- */

.dl-install {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(32px, 3.8vw, 50px);
  background:
    radial-gradient(ellipse at 94% 4%, rgba(157, 62, 61, 0.08), transparent 50%),
    linear-gradient(135deg, #f7e8dc 0%, #f2dfd1 100%);
  color: var(--on-blush);
}

.dl-install .eyebrow {
  color: #925549;
  font-size: 8.5px;
}

.dl-install h2 {
  margin: 15px 0 0;
  color: #361017;
  font-family: var(--serif);
  font-size: clamp(42px, 4.2vw, 56px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.dl-intro {
  max-width: 430px;
  margin: 13px 0 0;
  color: #744a43;
  font-size: 11.5px;
  line-height: 1.6;
}

.dl-tabs {
  display: flex;
  gap: 3px;
  width: 100%;
  max-width: 330px;
  margin-top: 25px;
  padding: 4px;
  border: 1px solid rgba(75, 31, 31, 0.13);
  border-radius: 999px;
  background: rgba(255, 247, 238, 0.55);
}

.dl-tabs button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: #83564e;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.dl-tabs button svg {
  width: 14px;
  height: 14px;
}

.dl-tabs button:hover {
  color: #4b1d22;
}

.dl-tabs button.is-active {
  color: #fff3e7;
  background: #4b1019;
  box-shadow: 0 8px 18px rgba(62, 13, 21, 0.22);
}

.dl-panels {
  margin-top: 22px;
}

.dl-panel[hidden] {
  display: none;
}

.dl-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 55px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff4e9;
  background: #54131d;
  box-shadow: 0 16px 32px rgba(74, 17, 26, 0.22);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition:
    background 0.25s ease,
    transform 0.35s var(--ease),
    box-shadow 0.35s ease;
}

.dl-download-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  opacity: 0.86;
}

.dl-download-icon svg {
  width: 100%;
  height: 100%;
}

.dl-download > svg:last-child {
  width: 16px;
  height: 16px;
  margin-inline-start: 5px;
  opacity: 0.8;
  transition: transform 0.35s var(--ease);
}

.dl-download:hover {
  background: #6b1a25;
  box-shadow: 0 20px 38px rgba(74, 17, 26, 0.28);
  transform: translateY(-2px);
}

.dl-download:hover > svg:last-child {
  transform: translateX(3px);
}

[dir="rtl"] .dl-download:hover > svg:last-child {
  transform: scaleX(-1) translateX(3px);
}

.dl-steps {
  display: grid;
  gap: 12px;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: dl-step;
}

.dl-steps li {
  position: relative;
  min-height: 24px;
  padding-inline-start: 36px;
  counter-increment: dl-step;
  color: #74504a;
  font-size: 11px;
  line-height: 1.55;
}

.dl-steps li::before {
  content: counter(dl-step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(108, 52, 47, 0.3);
  border-radius: 50%;
  color: #8f5c50;
  font-family: var(--serif);
  font-size: 9px;
  font-style: italic;
  line-height: 1;
}

.dl-steps li::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: -12px;
  inset-inline-start: 11.5px;
  width: 1px;
  background: rgba(108, 52, 47, 0.16);
}

.dl-steps li:last-child::after {
  display: none;
}

.dl-steps li > strong {
  color: #3e141b;
  font-weight: 600;
}

.dl-note {
  margin: 21px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(98, 48, 43, 0.16);
  color: #93665c;
  font-size: 8.5px;
  line-height: 1.65;
  letter-spacing: 0.03em;
}

.dl-install :focus-visible {
  outline-color: #7a2c2e;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.dl-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, calc(1120px + (var(--gutter) * 2)));
  margin-inline: auto;
  padding: 17px var(--gutter) 22px;
  color: #ad8175;
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dl-footer > div {
  display: flex;
  gap: 18px;
}

.dl-footer a {
  color: #bd9184;
  transition: color 0.25s ease;
}

.dl-footer a:hover {
  color: var(--gold-bright);
}

/* ---------------------------------------------------------
   Locale details
   --------------------------------------------------------- */

html:not([lang="en"]) .dl-story h1 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.08;
}

html[lang="zh"] .dl-story h1,
html[lang="ja"] .dl-story h1,
html[lang="ko"] .dl-story h1,
html[lang="ar"] .dl-story h1,
html[lang="hi"] .dl-story h1 {
  letter-spacing: 0;
  line-height: 1.16;
}

html[lang="zh"] .dl-story h1,
html[lang="ja"] .dl-story h1,
html[lang="ko"] .dl-story h1 {
  font-size: clamp(36px, 3.6vw, 50px);
}

html:not([lang="en"]) .dl-install h2 {
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1.1;
}

html[lang="zh"] .dl-install h2,
html[lang="ja"] .dl-install h2,
html[lang="ko"] .dl-install h2,
html[lang="ar"] .dl-install h2,
html[lang="hi"] .dl-install h2 {
  letter-spacing: 0;
  line-height: 1.18;
}

html[lang="ar"] .dl-story-copy > p:not(.eyebrow) {
  line-height: 1.9;
}

html[lang="ar"] .dl-brand-name,
html[lang="ar"] .dl-promise,
html[lang="ar"] .dl-story-foot,
html[lang="ar"] .dl-tabs button,
html[lang="ar"] .dl-download,
html[lang="ar"] .dl-note,
html[lang="ar"] .dl-footer,
html[lang="ar"] .dl-install .eyebrow,
html[lang="ar"] .dl-story .eyebrow {
  letter-spacing: 0;
}

html[lang="hi"] .dl-story-copy > p:not(.eyebrow),
html[lang="hi"] .dl-steps li {
  line-height: 1.75;
}

[dir="rtl"] .dl-story-copy,
[dir="rtl"] .dl-install {
  text-align: right;
}

[dir="rtl"] .dl-tabs {
  direction: rtl;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1000px) {
  .dl-main {
    min-height: 0;
    padding-top: 20px;
  }

  .dl-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dl-story {
    min-height: 290px;
    padding: 28px 32px;
    background-position: center 36%;
  }

  .dl-story::after {
    top: -60px;
    right: -80px;
    width: 270px;
    height: 270px;
  }

  .dl-story-copy {
    padding-block: 28px 20px;
  }

  .dl-story h1 {
    font-size: 42px;
  }

  .dl-story-copy > p:not(.eyebrow) {
    max-width: 420px;
  }

  .dl-story-foot {
    display: none;
  }

  .dl-promise {
    margin-top: 16px;
  }

  .dl-install {
    padding: 38px 40px 40px;
  }

  .dl-install h2 {
    font-size: 46px;
  }

  .dl-panels {
    margin-top: 20px;
  }
}

@media (max-width: 620px) {
  .dl-header {
    padding-top: 17px;
  }

  .dl-header .brand-mark {
    width: 27px;
    height: 27px;
  }

  .dl-header .brand-name {
    font-size: 17px;
  }

  .dl-header .brand-sub {
    font-size: 5.5px;
  }

  .dl-back {
    width: 35px;
    height: 35px;
  }

  .dl-main {
    padding: 14px 14px 22px;
  }

  .dl-card {
    border-radius: 5px;
  }

  .dl-story {
    min-height: 235px;
    padding: 23px 22px;
  }

  .dl-brand-top {
    gap: 8px;
  }

  .dl-logo-mark {
    width: 22px;
    height: 22px;
  }

  .dl-brand-name {
    font-size: 12px;
  }

  .dl-story-copy {
    padding-block: 24px 4px;
  }

  .dl-story .eyebrow {
    display: none;
  }

  .dl-story-copy > p:not(.eyebrow) {
    margin-top: 9px;
    font-size: 11px;
  }

  .dl-story h1,
  html:not([lang="en"]) .dl-story h1 {
    margin-top: 0;
    font-size: clamp(30px, 9.2vw, 39px);
    line-height: 1.03;
  }

  .dl-promise {
    margin-top: 13px;
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .dl-install {
    padding: 28px 22px 30px;
  }

  .dl-install .eyebrow {
    font-size: 7.5px;
  }

  .dl-install .eyebrow::before {
    width: 18px;
  }

  .dl-install h2,
  html:not([lang="en"]) .dl-install h2 {
    margin-top: 12px;
    font-size: clamp(32px, 8.6vw, 42px);
    line-height: 1.04;
  }

  .dl-intro {
    margin-top: 10px;
    font-size: 11.5px;
  }

  .dl-tabs {
    max-width: none;
    margin-top: 20px;
  }

  .dl-tabs button {
    min-height: 36px;
    font-size: 8.5px;
  }

  .dl-panels {
    margin-top: 17px;
  }

  .dl-download {
    min-height: 51px;
    padding-inline: 17px;
    font-size: 9.5px;
  }

  .dl-steps {
    gap: 10px;
    margin-top: 18px;
  }

  .dl-steps li {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    font-size: 10px;
  }

  .dl-steps li::before {
    width: 22px;
    height: 22px;
    font-size: 8px;
  }

  .dl-steps li::after {
    top: 27px;
    inset-inline-start: 10.5px;
    height: calc(100% - 18px);
  }

  .dl-note {
    margin-top: 17px;
    padding-top: 13px;
    font-size: 8.5px;
  }

  .dl-steps li {
    min-height: 22px;
    padding-inline-start: 32px;
    font-size: 11px;
  }

  .dl-steps li::after {
    top: 27px;
    bottom: -10px;
    inset-inline-start: 10.5px;
  }

  .dl-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding: 5px 20px 19px;
    font-size: 7.5px;
  }

  .dl-footer > div {
    gap: 14px;
  }
}

@media (max-width: 380px) {
  .dl-story {
    min-height: 218px;
  }

  .dl-story h1 {
    font-size: 28px;
  }

  .dl-tabs button {
    gap: 6px;
    font-size: 7.5px;
  }

  .dl-download {
    font-size: 8.5px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dl-card {
    animation: none;
  }

  .dl-download,
  .dl-back,
  .dl-download > svg:last-child {
    transition: none;
  }
}
