/* ==========================================================================
   NAQAA — نَقَاء
   Design tokens and global styles
   ========================================================================== */

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/tajawal-400.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/tajawal-500.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/tajawal-700.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/tajawal-800.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}

:root {
  --green-950: #0b2925;
  --green-900: #102f2b;
  --green-800: #153e39;
  --green-700: #1e514a;
  --green-600: #2c6b61;
  --green-500: #43877b;
  --green-300: #97cbbd;
  --mint-200: #d7f5e8;
  --mint-100: #e8fbf3;
  --mint-50: #f2fdf8;
  --paper: #f6f8f7;
  --white: #ffffff;
  --ink: #153e39;
  --ink-soft: #4e6b66;
  --ink-muted: #5c6f6a;
  --line: rgba(21, 62, 57, 0.12);
  --line-strong: rgba(21, 62, 57, 0.2);
  --danger: #b44234;
  --warning: #8b6120;
  --shadow-sm: 0 2px 8px rgba(16, 47, 43, 0.05);
  --shadow-md: 0 18px 45px -24px rgba(16, 47, 43, 0.3);
  --shadow-lg: 0 36px 90px -40px rgba(11, 41, 37, 0.45);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Inter", "Segoe UI", sans-serif;
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--mint-200);
  color: var(--green-950);
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

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

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

.skip-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.latin {
  font-family: var(--font-en);
  letter-spacing: -0.02em;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

.section--tight {
  padding: 64px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 46px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--green-600);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--green-500);
}

.section-head--center .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--green-500);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 14px;
}

.section-lead {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.section-head--center .section-lead {
  margin-inline: auto;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.btn:hover {
  background: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(16, 47, 43, 0.55);
}

.btn:active {
  transform: translateY(0);
}

.btn--mint {
  background: var(--mint-200);
  color: var(--green-900);
}

.btn--mint:hover {
  background: #c4eedc;
  box-shadow: 0 12px 28px -16px rgba(215, 245, 232, 0.35);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--green-800);
}

.btn--ghost:hover {
  border-color: var(--green-800);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn--block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.text-link svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s var(--ease);
}

.text-link:hover {
  color: var(--green-500);
}

.text-link:hover svg {
  transform: translateX(-3px);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(246, 248, 247, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(11, 41, 37, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  line-height: 1;
}

.brand-ar {
  color: var(--green-800);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-en {
  color: var(--green-600);
  font-family: var(--font-en);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a:not(.btn) {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--green-500);
  transition: width 0.25s var(--ease);
}

.site-nav a:not(.btn):hover {
  color: var(--green-800);
}

.site-nav a:not(.btn):hover::after {
  width: 100%;
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
}

.nav-toggle svg {
  width: 21px;
  height: 21px;
}

/* Hero --------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 82px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 245, 232, 0.85), rgba(215, 245, 232, 0) 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: 37%;
  bottom: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(151, 203, 189, 0.13), rgba(151, 203, 189, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(40px, 6vw, 84px);
}

.hero-copy {
  padding: 18px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 13px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-700);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.hero-badge strong {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mint-200);
  color: var(--green-900);
  font-size: 0.72rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(2.8rem, 6.1vw, 4.7rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.hero h1 .accent {
  position: relative;
  display: inline-block;
  color: var(--green-600);
  white-space: nowrap;
}

.hero h1 .accent::after {
  content: "";
  position: absolute;
  right: 1%;
  bottom: 5px;
  z-index: -1;
  width: 98%;
  height: 14px;
  border-radius: 999px;
  background: var(--mint-200);
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 565px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.85;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-cta .btn {
  min-height: 54px;
  padding-inline: 26px;
}

.hero-formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.format-tags {
  display: flex;
  gap: 5px;
}

.format-tags span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 31px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.hero-proof svg {
  width: 16px;
  height: 16px;
  color: var(--green-500);
}

.hero-visual {
  position: relative;
}

.hero-editor {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(21, 62, 57, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transform: rotate(1.1deg);
}

.hero-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 5px 11px;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(21, 62, 57, 0.2);
}

.hero-editor-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.hero-editor-label svg {
  width: 12px;
  height: 12px;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3.25;
  border-radius: 18px;
  background: var(--green-950);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo .before-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 44% 0 0);
}

.hero-photo .before-layer img {
  filter: saturate(0.55) contrast(0.81) brightness(1.1) sepia(0.08);
}

.hero-photo .after-layer img {
  filter: saturate(1.04) contrast(1.07) brightness(1.01);
}

.hero-split {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56%;
  z-index: 2;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(11, 41, 37, 0.08);
}

.hero-split::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 37px;
  height: 37px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(21, 62, 57, 0.35);
  box-shadow: 0 6px 20px rgba(11, 41, 37, 0.25);
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
}

.hero-split::before {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  color: var(--white);
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1;
  transform: translate(-50%, -57%);
}

.hero-photo-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 41, 37, 0.72);
  color: var(--white);
  font-size: 0.67rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.hero-photo-chip--before {
  top: 12px;
  left: 12px;
}

.hero-photo-chip--after {
  top: 12px;
  right: 12px;
  background: rgba(215, 245, 232, 0.9);
  color: var(--green-900);
}

.hero-panel {
  display: grid;
  gap: 8px;
  padding: 12px 5px 1px;
}

.hero-slider-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.67rem;
}

.hero-slider-row span:first-child {
  width: 43px;
}

.hero-slider-track {
  position: relative;
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 62, 57, 0.1);
}

.hero-slider-track::after {
  content: "";
  position: absolute;
  inset: 0 18% 0 0;
  border-radius: inherit;
  background: var(--green-500);
}

.hero-slider-track::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 18%;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 1px 3px rgba(11, 41, 37, 0.2);
  transform: translate(50%, -50%);
}

.hero-slider-row:nth-child(2) .hero-slider-track::after {
  inset: 0 35% 0 0;
}

.hero-slider-row:nth-child(2) .hero-slider-track::before {
  right: 35%;
}

.hero-slider-row:nth-child(3) .hero-slider-track::after {
  inset: 0 7% 0 0;
}

.hero-slider-row:nth-child(3) .hero-slider-track::before {
  right: 7%;
}

.hero-float {
  position: absolute;
  right: -20px;
  bottom: 58px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(21, 62, 57, 0.1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: rotate(-1.5deg);
}

.hero-float-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--mint-200);
  color: var(--green-700);
}

.hero-float-icon svg {
  width: 18px;
  height: 18px;
}

.hero-float strong {
  display: block;
  font-size: 0.77rem;
  line-height: 1.3;
}

.hero-float small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.64rem;
  line-height: 1.5;
}

.hero-spark {
  position: absolute;
  top: 11%;
  left: -25px;
  color: var(--green-300);
  animation: float 6s ease-in-out infinite;
}

.hero-spark svg {
  width: 39px;
  height: 39px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-9px) rotate(8deg);
  }
}

/* Trust bar --------------------------------------------------------------- */

.trust-bar {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 21px 24px;
  border-left: 1px solid var(--line);
}

.trust-item:first-child {
  border-left: 0;
}

.trust-item:last-child {
  border-left: 0;
}

.trust-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--mint-100);
  color: var(--green-700);
}

.trust-icon svg {
  width: 18px;
  height: 18px;
}

.trust-item strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
}

.trust-item small {
  display: block;
  margin-top: 1px;
  color: var(--ink-muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

/* Editor shell ------------------------------------------------------------ */

.editor-section {
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.editor-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.editor-intro .section-head {
  margin-bottom: 0;
}

.editor-free-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--green-700);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.editor-free-note svg {
  width: 17px;
  height: 17px;
}

.upload-card {
  position: relative;
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  padding: 36px 24px;
  border: 1.5px dashed rgba(21, 62, 57, 0.24);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 15% 15%, rgba(215, 245, 232, 0.7), transparent 34%),
    radial-gradient(circle at 85% 90%, rgba(215, 245, 232, 0.45), transparent 30%),
    var(--white);
  text-align: center;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s var(--ease);
}

.upload-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(21, 62, 57, 0.11) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
}

.upload-card.is-dragging {
  border-color: var(--green-500);
  background: var(--mint-50);
  transform: scale(1.004);
}

.upload-card.is-dragging .upload-icon {
  transform: translateY(-4px) scale(1.04);
}

.upload-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
}

.upload-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 21px;
  place-items: center;
  border: 1px solid rgba(21, 62, 57, 0.09);
  border-radius: 22px;
  background: var(--mint-200);
  color: var(--green-700);
  box-shadow: 0 16px 35px -24px rgba(11, 41, 37, 0.55);
  transition: transform 0.3s var(--ease);
}

.upload-icon svg {
  width: 32px;
  height: 32px;
}

.upload-title {
  font-size: clamp(1.35rem, 2.7vw, 1.75rem);
  margin-bottom: 8px;
}

.upload-hint {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.upload-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 0.74rem;
}

.upload-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.upload-meta svg {
  width: 13px;
  height: 13px;
}

.upload-security {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 25px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--green-700);
  font-size: 0.73rem;
  font-weight: 500;
}

.upload-security svg {
  width: 14px;
  height: 14px;
}

/* Studio ------------------------------------------------------------------ */

.studio {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.55);
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--mint-100);
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-text {
  min-width: 0;
}

.file-name {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-sub {
  display: block;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--green-800);
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.studio-actions .btn--small {
  min-height: 37px;
  gap: 6px;
  padding: 8px 15px;
  font-size: 0.78rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  min-height: 560px;
}

.canvas-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #0c2421;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(215, 245, 232, 0.1);
}

.view-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(215, 245, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.view-tab {
  padding: 5px 10px;
  border-radius: 5px;
  background: transparent;
  color: rgba(232, 251, 243, 0.62);
  font-size: 0.7rem;
  font-weight: 500;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.view-tab.active {
  background: rgba(215, 245, 232, 0.14);
  color: var(--mint-100);
}

.canvas-toolbar-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(232, 251, 243, 0.48);
  font-size: 0.64rem;
}

.canvas-toolbar-note svg {
  width: 12px;
  height: 12px;
}

.canvas-stage {
  position: relative;
  display: flex;
  min-height: 440px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 11px / 22px 22px,
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.018) 75%) 11px -11px / 22px 22px,
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.018) 75%) -11px 0 / 22px 22px;
}

.canvas-stack {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-shadow: 0 25px 65px -25px rgba(0, 0, 0, 0.6);
}

.preview-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(58vh, 620px);
  border-radius: 3px;
  background: var(--paper);
}

.before-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  border-radius: 3px;
  clip-path: inset(0 calc(100% - var(--compare, 50%)) 0 0);
}

.before-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare, 50%);
  z-index: 5;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.compare-handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(21, 62, 57, 0.78);
  color: var(--white);
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(4px);
}

.compare-labels {
  position: absolute;
  inset: 13px 13px auto;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.compare-label {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 41, 37, 0.66);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.5;
  backdrop-filter: blur(6px);
}

.compare-label--right {
  background: rgba(215, 245, 232, 0.9);
  color: var(--green-900);
}

.mask-canvas {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  cursor: none;
  touch-action: none;
}

.mask-canvas.is-eraser {
  cursor: none;
}

.brush-cursor {
  position: absolute;
  z-index: 7;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(11, 41, 37, 0.4);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.brush-cursor::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(11, 41, 37, 0.42);
  border-radius: 50%;
}

.retouch-banner {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 245, 232, 0.16);
  border-radius: 9px;
  background: rgba(11, 41, 37, 0.78);
  color: var(--mint-100);
  font-size: 0.68rem;
  line-height: 1.6;
  backdrop-filter: blur(10px);
}

.retouch-banner strong {
  color: var(--white);
  font-weight: 700;
}

.retouch-banner button {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(215, 245, 232, 0.14);
  color: var(--mint-100);
  font-size: 0.65rem;
}

.canvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid rgba(215, 245, 232, 0.1);
  color: rgba(232, 251, 243, 0.5);
  font-size: 0.65rem;
}

.canvas-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.canvas-footer svg {
  width: 12px;
  height: 12px;
}

.compare-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 145px;
}

.compare-control input[type="range"] {
  width: 90px;
}

.compare-control.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

/* Tool panel -------------------------------------------------------------- */

.tool-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.tool-panels {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.tool-panels > [data-panel] {
  flex: 1;
  width: 100%;
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.tool-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.79rem;
  font-weight: 500;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tool-tab svg {
  width: 15px;
  height: 15px;
}

.tool-tab.active {
  background: var(--white);
  color: var(--green-800);
  box-shadow: var(--shadow-sm);
}

.tool-body {
  flex: 1;
  overflow-y: auto;
  padding: 17px 17px 10px;
  scrollbar-color: var(--green-300) transparent;
  scrollbar-width: thin;
}

.tool-body::-webkit-scrollbar {
  width: 6px;
}

.tool-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 62, 57, 0.18);
}

.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-kicker h3 {
  font-size: 0.93rem;
  letter-spacing: -0.01em;
}

.panel-kicker span {
  color: var(--ink-muted);
  font-size: 0.66rem;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 17px;
}

.preset-btn {
  min-height: 51px;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.preset-btn:hover {
  border-color: var(--green-300);
  background: var(--mint-50);
  color: var(--green-800);
}

.preset-btn.active {
  border-color: var(--green-700);
  background: var(--green-800);
  color: var(--white);
  box-shadow: 0 7px 18px -12px rgba(11, 41, 37, 0.7);
}

.auto-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(120deg, var(--mint-100), var(--white));
}

.auto-card-text strong {
  display: block;
  font-size: 0.77rem;
  line-height: 1.4;
}

.auto-card-text small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.63rem;
  line-height: 1.5;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 40px;
  height: 23px;
  align-items: center;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(21, 62, 57, 0.2);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(11, 41, 37, 0.25);
  transition: transform 0.2s var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--green-700);
}

.switch input:checked + .switch-track::after {
  transform: translateX(-17px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
}

.slider-list {
  display: grid;
  gap: 12px;
}

.slider-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
}

.slider-control label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
}

.slider-value {
  min-width: 30px;
  color: var(--ink-muted);
  font-family: var(--font-en);
  font-size: 0.63rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.slider-control input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 1px 0 0;
}

input[type="range"] {
  height: 20px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to left, var(--green-500) 0 var(--range-fill, 0%), rgba(21, 62, 57, 0.12) var(--range-fill, 0%) 100%);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(21, 62, 57, 0.12);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--green-500);
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 1px 4px rgba(11, 41, 37, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 1px 4px rgba(11, 41, 37, 0.3);
}

.advanced {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0 3px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after {
  content: "+";
  color: var(--ink-muted);
  font-family: var(--font-en);
  font-size: 1rem;
  line-height: 1;
}

.advanced[open] summary::after {
  content: "−";
}

.advanced .slider-list {
  padding-top: 8px;
}

.reset-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.link-btn:hover {
  color: var(--green-700);
}

.link-btn svg {
  width: 13px;
  height: 13px;
}

/* Retouch panel ----------------------------------------------------------- */

.tool-note {
  margin-bottom: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(21, 62, 57, 0.09);
  border-radius: 9px;
  background: var(--mint-50);
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.7;
}

.tool-note strong {
  color: var(--green-800);
}

.brush-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.brush-dot {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}

.brush-dot span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-600);
  opacity: 0.55;
}

.brush-meta {
  flex: 1;
}

.brush-meta label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.brush-meta output {
  color: var(--ink-muted);
  font-family: var(--font-en);
  font-size: 0.63rem;
}

.brush-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 11px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.brush-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.brush-mode.active {
  background: var(--white);
  color: var(--green-800);
  box-shadow: var(--shadow-sm);
}

.brush-mode svg {
  width: 14px;
  height: 14px;
}

.retouch-actions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.retouch-actions .btn {
  min-height: 42px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.retouch-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Size panel -------------------------------------------------------------- */

.size-list {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.size-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.size-option:hover {
  border-color: var(--green-300);
  background: var(--mint-50);
}

.size-option.is-active {
  border-color: var(--green-700);
  background: var(--mint-100);
}

.size-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.size-option-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.size-radio {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1.5px solid rgba(21, 62, 57, 0.3);
  border-radius: 50%;
  background: var(--white);
}

.size-radio::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-700);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.size-option.is-active .size-radio {
  border-color: var(--green-700);
}

.size-option.is-active .size-radio::after {
  transform: scale(1);
}

.size-option strong {
  display: block;
  font-size: 0.76rem;
  line-height: 1.3;
}

.size-option small {
  display: block;
  margin-top: 1px;
  color: var(--ink-muted);
  font-size: 0.61rem;
  line-height: 1.4;
}

.size-option .size-badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--mint-200);
  color: var(--green-700);
  font-size: 0.58rem;
  font-weight: 700;
}

.size-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.4;
}

.field-group {
  margin-bottom: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 500;
}

.field-label output {
  color: var(--ink-muted);
  font-family: var(--font-en);
  font-size: 0.63rem;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.72rem;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 6px;
  height: 6px;
  border-bottom: 1.5px solid var(--ink-muted);
  border-left: 1.5px solid var(--ink-muted);
  pointer-events: none;
  transform: translateY(-70%) rotate(-45deg);
}

.output-summary {
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
}

.output-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--ink-muted);
  font-size: 0.64rem;
}

.output-summary div + div {
  margin-top: 4px;
}

.output-summary strong {
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 0.64rem;
  font-weight: 500;
}

.aspect-note {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--green-700);
  font-size: 0.62rem;
}

.aspect-note svg {
  width: 12px;
  height: 12px;
}

.export-button {
  min-height: 44px;
  border-radius: 9px;
}

.export-note {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.59rem;
  line-height: 1.55;
  text-align: center;
}

.tool-panel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.61rem;
}

.tool-panel-footer svg {
  width: 12px;
  height: 12px;
}

/* Progress overlay -------------------------------------------------------- */

.progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 24, 21, 0.58);
  backdrop-filter: blur(7px);
}

.progress-card {
  width: min(100%, 370px);
  padding: 30px 26px 25px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.spinner {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
}

.spinner::before,
.spinner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.spinner::before {
  inset: 0;
  border: 3px solid var(--mint-200);
}

.spinner::after {
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--green-600);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-card h3 {
  margin-bottom: 5px;
  font-size: 1.04rem;
}

.progress-card p {
  color: var(--ink-muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.progress-bar {
  height: 6px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mint-100);
}

.progress-bar span {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to left, var(--green-700), var(--green-500));
  transition: width 0.3s var(--ease);
}

/* Toast ------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  bottom: 22px;
  right: 50%;
  z-index: 300;
  display: grid;
  width: min(calc(100% - 32px), 420px);
  gap: 8px;
  transform: translateX(50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(215, 245, 232, 0.4);
  border-radius: 12px;
  background: var(--green-900);
  color: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 0.77rem;
  line-height: 1.6;
  animation: toast-in 0.35s var(--ease);
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--mint-200);
}

.toast.is-error {
  background: #6f2a22;
}

.toast.is-error svg {
  color: #ffd7d0;
}

.toast.is-leaving {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Features ---------------------------------------------------------------- */

.features {
  background: var(--white);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.feature-card {
  position: relative;
  grid-column: span 4;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition:
    transform 0.3s var(--ease),
    border-color 0.2s ease,
    box-shadow 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(21, 62, 57, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-card--wide {
  grid-column: span 8;
}

.feature-card--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 90% 0, rgba(215, 245, 232, 0.15), transparent 32%),
    var(--green-800);
  color: var(--white);
}

.feature-card--dark p {
  color: rgba(255, 255, 255, 0.7);
}

.feature-card--dark .feature-icon {
  background: rgba(215, 245, 232, 0.13);
  color: var(--mint-200);
}

.feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 13px;
  background: var(--mint-200);
  color: var(--green-700);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.8;
}

.feature-visual {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.62rem;
}

.feature-chip--mint {
  border-color: transparent;
  background: var(--mint-200);
  color: var(--green-800);
}

.feature-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.feature-mock figure {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.feature-mock img {
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.feature-mock figure:first-child img {
  filter: saturate(0.45) contrast(0.8) brightness(1.12);
}

.feature-mock figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(11, 41, 37, 0.8);
  color: var(--white);
  font-size: 0.55rem;
}

.feature-mock figure:last-child figcaption {
  background: var(--mint-200);
  color: var(--green-900);
}

/* Steps ------------------------------------------------------------------- */

.how {
  position: relative;
  overflow: hidden;
}

.how::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(215, 245, 232, 0.22), transparent);
  pointer-events: none;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  position: relative;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

.step-number {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--mint-200);
  font-family: var(--font-en);
  font-size: 0.77rem;
  font-weight: 600;
}

.step-card h3 {
  margin-bottom: 7px;
  font-size: 1.02rem;
}

.step-card p {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.8;
}

.step-visual {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--green-700);
  font-size: 0.68rem;
  font-weight: 500;
}

.step-visual svg {
  width: 15px;
  height: 15px;
}

/* Use cases --------------------------------------------------------------- */

.use-cases {
  background: var(--green-800);
  color: var(--white);
}

.use-cases .section-head {
  max-width: 720px;
}

.use-cases .eyebrow {
  color: var(--green-300);
}

.use-cases .eyebrow::before,
.use-cases .eyebrow::after {
  background: var(--green-300);
}

.use-cases .section-lead {
  color: rgba(255, 255, 255, 0.65);
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.use-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(215, 245, 232, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.use-card:hover {
  border-color: rgba(215, 245, 232, 0.25);
  background: rgba(255, 255, 255, 0.065);
}

.use-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: rgba(215, 245, 232, 0.1);
  color: var(--mint-200);
}

.use-icon svg {
  width: 18px;
  height: 18px;
}

.use-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.87rem;
}

.use-card small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.75rem;
  line-height: 1.65;
}

/* Privacy band ------------------------------------------------------------ */

.privacy-band {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 10%, var(--mint-200), transparent 34%),
    var(--white);
}

.privacy-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.privacy-copy {
  max-width: 690px;
}

.privacy-copy .eyebrow {
  margin-bottom: 10px;
}

.privacy-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.privacy-copy p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.privacy-lock {
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(21, 62, 57, 0.08);
  border-radius: 28px;
  background: var(--mint-200);
  color: var(--green-700);
  transform: rotate(-3deg);
}

.privacy-lock svg {
  width: 40px;
  height: 40px;
}

/* Guides ------------------------------------------------------------------ */

.guides {
  background: var(--white);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s ease;
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.guide-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--mint-100);
}

.guide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.guide-card:hover .guide-cover img {
  transform: scale(1.035);
}

.guide-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 41, 37, 0.3), transparent 50%);
}

.guide-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-800);
  font-size: 0.62rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.guide-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.guide-body h3 {
  margin-bottom: 7px;
  font-size: 1rem;
  line-height: 1.55;
}

.guide-body p {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.8;
}

.guide-body .text-link {
  margin-top: auto;
  font-size: 0.76rem;
}

/* FAQ --------------------------------------------------------------------- */

.faq-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 64px;
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: calc(var(--header-h) + 30px);
}

.faq-intro .section-title {
  margin-bottom: 13px;
}

.faq-intro p {
  margin-bottom: 23px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 9px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(21, 62, 57, 0.2);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  margin-right: auto;
  color: var(--green-500);
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 18px 18px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.9;
}

/* CTA --------------------------------------------------------------------- */

.final-cta {
  position: relative;
  overflow: hidden;
  padding: 70px 24px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 15% 20%, rgba(215, 245, 232, 0.16), transparent 27%),
    radial-gradient(circle at 90% 90%, rgba(215, 245, 232, 0.1), transparent 30%),
    var(--green-800);
  color: var(--white);
  text-align: center;
}

.final-cta::before,
.final-cta::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(215, 245, 232, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.final-cta::before {
  top: -150px;
  right: -80px;
  width: 380px;
  height: 380px;
}

.final-cta::after {
  bottom: -200px;
  left: -100px;
  width: 460px;
  height: 460px;
}

.final-cta > * {
  position: relative;
  z-index: 1;
}

.final-cta h2 {
  max-width: 680px;
  margin: 0 auto 12px;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
}

.final-cta p {
  max-width: 560px;
  margin: 0 auto 27px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.94rem;
}

.final-cta .btn--mint {
  min-height: 52px;
  padding-inline: 27px;
}

.final-cta .cta-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
}

.final-cta .cta-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.final-cta .cta-note svg {
  width: 13px;
  height: 13px;
}

/* Ad slots ---------------------------------------------------------------- */

.ad-slot {
  min-height: 90px;
  margin: 30px auto;
  overflow: hidden;
  text-align: center;
}

.ad-slot:empty {
  display: none;
}

.ad-slot .adsbygoogle {
  display: block;
}

.ad-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
}

.ad-slot--inline {
  width: min(100%, 970px);
}

.ad-slot--box {
  width: min(100%, 336px);
  min-height: 280px;
}

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

.site-footer {
  padding: 62px 0 25px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 44px;
  padding-bottom: 42px;
}

.footer-brand p {
  max-width: 300px;
  margin-top: 13px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.85;
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 17px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-700);
  font-size: 0.65rem;
}

.footer-privacy svg {
  width: 12px;
  height: 12px;
}

.footer-col h3 {
  margin-bottom: 13px;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 700;
}

.footer-col ul {
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: var(--ink-soft);
  font-size: 0.76rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--green-600);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.footer-bottom p {
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-bottom svg {
  width: 12px;
  height: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links button,
.footer-links a {
  padding: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.footer-links button:hover,
.footer-links a:hover {
  color: var(--green-700);
}

/* Content pages ----------------------------------------------------------- */

.page-hero {
  padding: 58px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 0, rgba(215, 245, 232, 0.65), transparent 35%),
    var(--paper);
}

.page-hero-inner {
  max-width: 800px;
}

.page-hero .eyebrow {
  margin-bottom: 12px;
}

.page-hero h1 {
  margin-bottom: 13px;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 1.2;
}

.page-hero p {
  max-width: 690px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.breadcrumb a:hover {
  color: var(--green-700);
}

.breadcrumb span {
  color: var(--ink-muted);
}

.page-content {
  padding: 50px 0 78px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 54px;
  align-items: start;
}

.prose {
  min-width: 0;
  max-width: 760px;
}

.prose > * + * {
  margin-top: 18px;
}

.prose h2 {
  margin-top: 38px;
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.7vw, 1.72rem);
}

.prose h3 {
  margin-top: 27px;
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  font-size: 0.91rem;
  line-height: 1.95;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 8px;
  padding-right: 20px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--green-500);
}

.prose a:not(.btn) {
  color: var(--green-700);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--green-300);
  text-underline-offset: 3px;
}

.prose a:not(.btn):hover {
  color: var(--green-500);
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  border-right: 3px solid var(--green-500);
  border-radius: 0 12px 12px 0;
  background: var(--mint-50);
  color: var(--green-800);
  font-size: 0.9rem;
}

.prose .callout {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.prose .callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.prose .callout p {
  font-size: 0.8rem;
}

.prose-figure {
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.prose-figure img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.prose-figure figcaption {
  padding: 9px 13px;
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.page-cta {
  margin-top: 34px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--green-800);
  color: var(--white);
}

.page-cta h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 1.1rem;
}

.page-cta p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.79rem;
}

.page-cta .btn {
  min-height: 42px;
  font-size: 0.76rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.side-card h3 {
  margin-bottom: 7px;
  font-size: 0.84rem;
}

.side-card p {
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.8;
}

.side-card .btn {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.7rem;
}

.side-links {
  display: grid;
  gap: 9px;
}

.side-links a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.6;
}

.side-links a::before {
  content: "↗";
  color: var(--green-500);
  font-family: var(--font-en);
  font-size: 0.7rem;
}

.side-links a:hover {
  color: var(--green-700);
}

.legal-note {
  margin-top: 32px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.7rem;
}

/* Contact ---------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.contact-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.contact-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 11px;
  background: var(--mint-200);
  color: var(--green-700);
}

.contact-card-icon svg {
  width: 18px;
  height: 18px;
}

.contact-card h2 {
  margin: 0 0 4px;
  font-size: 0.97rem;
}

.contact-card p {
  font-size: 0.78rem;
}

.contact-card a {
  color: var(--green-700);
  font-family: var(--font-en);
  font-size: 0.77rem;
  font-weight: 500;
}

/* Cookie banner ----------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), 980px);
  margin-inline: auto;
  padding: 16px 19px;
  border: 1px solid rgba(215, 245, 232, 0.25);
  border-radius: 16px;
  background: rgba(16, 47, 43, 0.96);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  animation: toast-in 0.4s var(--ease);
}

.cookie-banner p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  line-height: 1.7;
}

.cookie-banner p a {
  color: var(--mint-200);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.cookie-actions button {
  min-height: 37px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
}

.cookie-accept {
  background: var(--mint-200);
  color: var(--green-900);
}

.cookie-reject {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--white);
}

.cookie-reject:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Error page -------------------------------------------------------------- */

.error-page {
  display: grid;
  min-height: 70vh;
  place-items: center;
  padding: 60px 24px;
  text-align: center;
}

.error-page .error-code {
  color: var(--green-300);
  font-family: var(--font-en);
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.error-page h1 {
  margin: 16px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.error-page p {
  max-width: 460px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

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

@media (max-width: 1080px) {
  .hero-grid {
    gap: 38px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 5.8vw, 4rem);
  }

  .site-nav {
    gap: 20px;
  }

  .studio-grid {
    grid-template-columns: minmax(0, 1fr) 326px;
  }

  .feature-card {
    grid-column: span 6;
  }

  .feature-card--wide {
    grid-column: span 12;
  }

  .faq-layout {
    gap: 38px;
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 34px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .section {
    padding: 74px 0;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: none;
    height: calc(100dvh - var(--header-h));
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 17px 20px 30px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: var(--paper);
  }

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

  .site-nav a:not(.btn) {
    padding: 13px 9px;
    border-radius: 8px;
    font-size: 1rem;
  }

  .site-nav a:not(.btn)::after {
    display: none;
  }

  .site-nav a:not(.btn):hover {
    background: var(--mint-100);
  }

  .site-nav .btn {
    margin-top: 12px;
  }

  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-copy {
    max-width: 660px;
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 8vw, 4rem);
  }

  .hero-visual {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .trust-item:nth-child(2) {
    border-left: 0;
  }

  .trust-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .editor-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .canvas-stage {
    min-height: 380px;
  }

  .preview-canvas {
    max-height: 52vh;
  }

  .tool-panel {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .tool-panels {
    display: block;
  }

  .tool-body {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }

  .preset-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .slider-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 13px 18px;
  }

  .advanced .slider-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .retouch-actions {
    grid-template-columns: 1fr 1fr;
  }

  .retouch-actions .btn--block {
    grid-column: 1 / -1;
  }

  .dual-actions {
    grid-column: span 2;
  }

  .use-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-card:last-child {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .guide-card:last-child .guide-cover {
    height: 100%;
    aspect-ratio: auto;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .faq-intro {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-col--more {
    grid-column: 2 / -1;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-row: auto;
  }

  .page-content {
    padding-top: 36px;
  }

  .cookie-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .section {
    padding: 62px 0;
  }

  .section--tight {
    padding: 46px 0;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-ar {
    font-size: 1.4rem;
  }

  .brand-en {
    font-size: 0.68rem;
  }

  .hero {
    padding: 30px 0 58px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.2rem);
    line-height: 1.16;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.85;
  }

  .hero-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-proof {
    gap: 10px 15px;
  }

  .hero-editor {
    padding: 10px;
    border-radius: 22px;
    transform: none;
  }

  .hero-photo {
    aspect-ratio: 4 / 3.4;
  }

  .hero-float {
    right: 8px;
    bottom: -24px;
    padding: 9px 11px;
  }

  .hero-float-icon {
    width: 29px;
    height: 29px;
  }

  .hero-spark {
    display: none;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-item {
    padding: 14px 4px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .trust-item:first-child {
    border-top: 0;
  }

  .upload-card {
    min-height: 380px;
    padding: 30px 16px;
    border-radius: var(--radius-lg);
  }

  .upload-icon {
    width: 62px;
    height: 62px;
  }

  .upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-actions .btn {
    width: 100%;
  }

  .studio {
    border-radius: var(--radius-lg);
  }

  .studio-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .studio-actions {
    width: 100%;
    justify-content: space-between;
  }

  .studio-actions .icon-btn span {
    display: none;
  }

  .studio-actions .icon-btn {
    width: 36px;
    padding: 0;
  }

  .studio-actions .btn--small {
    flex: 1;
  }

  .file-name {
    max-width: 220px;
  }

  .canvas-stage {
    min-height: 290px;
    padding: 11px 9px 12px;
  }

  .preview-canvas {
    max-height: 47vh;
  }

  .canvas-toolbar {
    padding: 8px 9px;
  }

  .canvas-toolbar-note {
    display: none;
  }

  .canvas-footer {
    padding: 8px 9px;
  }

  .compare-control {
    min-width: 0;
  }

  .compare-control input[type="range"] {
    width: 70px;
  }

  .tool-tab {
    gap: 4px;
    font-size: 0.72rem;
  }

  .tool-tab svg {
    width: 13px;
    height: 13px;
  }

  .preset-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .slider-list,
  .advanced .slider-list {
    grid-template-columns: 1fr;
  }

  .retouch-actions {
    grid-template-columns: 1fr;
  }

  .retouch-actions .btn--block,
  .dual-actions {
    grid-column: auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card--wide {
    grid-column: auto;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .use-grid {
    grid-template-columns: 1fr;
  }

  .privacy-band {
    padding: 27px 22px;
  }

  .privacy-band-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .privacy-lock {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .privacy-lock svg {
    width: 28px;
    height: 28px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card:last-child {
    display: flex;
    grid-column: auto;
  }

  .guide-card:last-child .guide-cover {
    aspect-ratio: 16 / 9;
  }

  .final-cta {
    padding: 52px 18px;
  }

  .final-cta .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 22px;
    padding-bottom: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col--more {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .footer-links {
    gap: 11px 16px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 40px 0 32px;
  }

  .page-hero h1 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .prose h2 {
    margin-top: 31px;
  }

  .prose p,
  .prose li {
    font-size: 0.88rem;
  }

  .toast-stack {
    bottom: 14px;
  }

  .progress-card {
    padding: 25px 20px 21px;
  }

  .cookie-banner {
    right: 9px;
    bottom: 9px;
    left: 9px;
    width: calc(100% - 18px);
    padding: 14px;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print ------------------------------------------------------------------- */

@media print {
  .site-header,
  .hero,
  .site-footer,
  .cookie-banner,
  .ad-slot,
  .page-cta,
  .sidebar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page-hero {
    padding: 0 0 20px;
    background: #fff;
  }

  .page-content {
    padding: 20px 0;
  }

  .content-layout {
    display: block;
  }

  .prose {
    max-width: 100%;
  }
}
