/*
Theme Name: Cinematic iOS Studio
Theme URI: https://example.com/cinematic-ios-studio
Author: Reza Rezaeian
Author URI: https://example.com
Description: A cinematic multilingual portfolio theme for promoting bespoke iOS application development services and App Store projects.
Version: 1.0.14
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cinematic-ios-studio
Tags: portfolio, one-page, custom-post-types, rtl-language-support, translation-ready
*/

:root {
  --bg: #080b0d;
  --bg-soft: #11171a;
  --ink: #f7f4ec;
  --muted: #b8c0bf;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(10, 15, 17, 0.68);
  --glass-strong: rgba(13, 19, 20, 0.88);
  --amber: #e3a656;
  --copper: #b56d42;
  --teal: #4ab7a8;
  --sage: #9ab59a;
  --danger: #ff7a6f;
  --max: 1180px;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

@font-face {
  font-family: "Yekan";
  src: url("/assets/fonts/BYekan.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@property --scene-progress {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(74, 183, 168, 0.12), transparent 32rem),
    linear-gradient(135deg, #080b0d 0%, #101416 48%, #080b0d 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.rtl,
[dir="rtl"] body {
  font-family: Yekan, "B Yekan", "BYekan", "IRANYekan", "Vazirmatn", Tahoma, Arial, sans-serif;
}

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

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

.screen-reader-text {
  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: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 11, 13, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(100% - 2rem, var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(227, 166, 86, 0.22), rgba(74, 183, 168, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--amber);
}

.brand-name {
  display: grid;
  gap: 0.1rem;
}

.brand-name small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 2vw, 1.65rem);
  color: rgba(247, 244, 236, 0.84);
  font-size: 0.94rem;
}

.nav-links a {
  position: relative;
  padding: 0.35rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.18rem;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

[dir="rtl"] .nav-links a::after {
  transform-origin: right;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.language-switcher a {
  min-width: 2.4rem;
  min-height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.language-switcher a.is-active {
  background: var(--ink);
  color: var(--bg);
}

.menu-toggle {
  display: none;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: end;
  padding: 7.2rem 0 4.4rem;
  background-image:
    linear-gradient(90deg, rgba(8, 11, 13, 0.92) 0%, rgba(8, 11, 13, 0.78) 34%, rgba(8, 11, 13, 0.2) 72%, rgba(8, 11, 13, 0.58) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-phone-layer {
  position: absolute;
  right: clamp(1rem, 7vw, 8rem);
  top: clamp(6rem, 13vh, 9.5rem);
  z-index: 1;
  width: clamp(250px, 27vw, 450px);
  aspect-ratio: 941 / 1672;
  pointer-events: none;
  transform:
    translate3d(calc(var(--scene-progress, 0) * -18px), calc(var(--scene-progress, 0) * 34px), 0)
    rotate(-2deg);
  animation: phoneFloat 7s ease-in-out infinite;
  filter:
    drop-shadow(0 38px 58px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 32px rgba(227, 166, 86, 0.12));
}

.hero-phone-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/images/hero-phone-layer.png") center / contain no-repeat;
  transform: translateZ(0);
}

.hero-phone-layer::after {
  content: "";
  position: absolute;
  inset: 7% 10% 9% 13%;
  border-radius: 34px;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.28) 42%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-58%) skewX(-12deg);
  animation: phoneLightSweep 5.8s ease-in-out infinite 1.2s;
}

[dir="rtl"] .hero-phone-layer {
  right: auto;
  left: clamp(1rem, 7vw, 8rem);
  transform:
    translate3d(calc(var(--scene-progress, 0) * 18px), calc(var(--scene-progress, 0) * 34px), 0)
    rotate(2deg);
}

.hero {
  background-position: center calc(50% + (var(--scene-progress, 0) * 18px));
}

[dir="rtl"] .hero {
  background-image:
    linear-gradient(270deg, rgba(8, 11, 13, 0.93) 0%, rgba(8, 11, 13, 0.78) 36%, rgba(8, 11, 13, 0.22) 72%, rgba(8, 11, 13, 0.58) 100%),
    var(--hero-image);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24vh;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner,
.section-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(710px, 100%);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.05rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

[dir="rtl"] .eyebrow {
  text-transform: none;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  max-width: 12ch;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.lead {
  max-width: 62ch;
  margin-bottom: 1.75rem;
  color: rgba(247, 244, 236, 0.82);
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(227, 166, 86, 0.52);
}

.button.primary {
  background: linear-gradient(135deg, var(--amber), #f0c982);
  color: #12100d;
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(720px, 100%);
  margin-top: clamp(3rem, 8vh, 6rem);
  position: relative;
  z-index: 2;
}

.stat {
  min-height: 110px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.stat strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}

.cinematic-scene {
  --scene-progress: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cinematic-scene::before {
  content: "";
  position: absolute;
  inset: -9%;
  z-index: -2;
  background-position: center calc(50% + (var(--scene-progress, 0) * 34px));
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(calc(1.05 + (var(--scene-progress, 0) * 0.025)));
  transition: opacity 700ms ease, transform 700ms ease;
}

.cinematic-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 11, 13, 0.96), rgba(8, 11, 13, 0.64) 45%, rgba(8, 11, 13, 0.98)),
    linear-gradient(90deg, rgba(8, 11, 13, 0.9), rgba(8, 11, 13, 0.2) 52%, rgba(8, 11, 13, 0.84));
}

.cinematic-scene .section-inner::before {
  content: "";
  position: absolute;
  inset: -5rem auto auto -8rem;
  width: 18rem;
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 166, 86, 0.18), transparent 66%);
  filter: blur(12px);
  opacity: 0.58;
  transform: translate3d(calc(var(--scene-progress, 0) * 40px), calc(var(--scene-progress, 0) * -24px), 0);
}

.cinematic-scene.is-active::before {
  opacity: 0.56;
}

.scene-services::before {
  background-image: var(--scene-services);
}

.scene-projects::before {
  background-image:
    linear-gradient(120deg, rgba(8, 11, 13, 0.96), rgba(8, 11, 13, 0.22), rgba(8, 11, 13, 0.78)),
    var(--hero-image);
  filter: saturate(0.86) contrast(1.05);
}

.scene-process::before,
.scene-contact::before {
  background-image: var(--scene-launch);
}

.scene-process::before {
  background-position: center calc(45% + (var(--scene-progress, 0) * 30px));
}

.scene-contact::before {
  background-position: center calc(58% + (var(--scene-progress, 0) * 22px));
}

.section.alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 0.52fr);
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 2.25rem;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.service-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.project-card,
.process-card,
.contact-panel,
.seo-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--glass);
  box-shadow: var(--shadow);
}

.service-card,
.process-card {
  min-height: 260px;
  padding: 1.25rem;
}

.service-card,
.project-card,
.process-card,
.contact-panel,
.legal-panel,
.stat,
.seo-panel {
  backdrop-filter: blur(18px);
  transform: translateZ(0);
}

.service-card:hover,
.project-card:hover,
.process-card:hover {
  border-color: rgba(227, 166, 86, 0.34);
  transform: translateY(-4px);
}

.service-icon {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  border-radius: 8px;
  background: rgba(227, 166, 86, 0.14);
  color: var(--amber);
  font-weight: 840;
}

.service-card p,
.project-card p,
.process-card p,
.seo-panel p {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(247, 244, 236, 0.78);
  font-size: 0.76rem;
}

.project-card {
  overflow: hidden;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    linear-gradient(135deg, rgba(74, 183, 168, 0.2), rgba(227, 166, 86, 0.14)),
    #121719;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.developer-link {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: rgba(247, 244, 236, 0.8);
  font-size: 3rem;
}

.project-body {
  padding: 1.1rem;
}

.app-store-card .project-body {
  padding: 1rem;
}

.app-store-head {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.app-store-icon {
  width: 94px;
  height: 94px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}

.app-store-icon-fallback {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 800;
}

.app-store-title-block {
  min-width: 0;
}

.app-store-title-block h3 {
  margin-bottom: 0.24rem;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
}

.app-store-subtitle,
.app-store-description {
  margin-bottom: 0.52rem;
  color: rgba(247, 244, 236, 0.72);
  font-size: 0.94rem;
  line-height: 1.35;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

[dir="rtl"] .project-meta {
  text-transform: none;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  color: var(--ink);
  font-weight: 800;
}

.process-card {
  position: relative;
}

.process-number {
  display: block;
  margin-bottom: 1.5rem;
  color: rgba(227, 166, 86, 0.86);
  font-size: 0.85rem;
  font-weight: 840;
}

.seo-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-content: start;
}

.keyword-list span {
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(154, 181, 154, 0.26);
  border-radius: 999px;
  background: rgba(154, 181, 154, 0.08);
  color: rgba(247, 244, 236, 0.84);
  font-size: 0.86rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 1.2rem;
  align-items: stretch;
}

.contact-intro,
.contact-form {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.contact-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.contact-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list a,
.contact-list span {
  display: flex;
  gap: 0.7rem;
  color: rgba(247, 244, 236, 0.82);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

.captcha-field {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.7fr) minmax(120px, 0.3fr);
  align-items: end;
}

.captcha-field label {
  grid-column: 1 / -1;
}

.captcha-question {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(227, 166, 86, 0.28);
  border-radius: 8px;
  background: rgba(227, 166, 86, 0.1);
  color: var(--ink);
  font-weight: 820;
}

label {
  color: rgba(247, 244, 236, 0.72);
  font-size: 0.86rem;
  font-weight: 720;
}

input,
textarea,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  font: inherit;
  padding: 0.82rem 0.9rem;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(227, 166, 86, 0.68);
  background: rgba(255, 255, 255, 0.1);
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(74, 183, 168, 0.34);
  border-radius: 8px;
  background: rgba(74, 183, 168, 0.12);
  color: var(--ink);
}

.notice.error {
  border-color: rgba(255, 122, 111, 0.4);
  background: rgba(255, 122, 111, 0.12);
}

.notice.is-hidden {
  display: none;
}

.loading-card {
  grid-column: 1 / -1;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.button[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
}

.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner a {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.legal-section {
  min-height: 100vh;
  padding-top: 9rem;
  padding-bottom: clamp(5rem, 8vw, 8rem);
}

.legal-section.cinematic-scene::before {
  background-image:
    linear-gradient(135deg, rgba(8, 11, 13, 0.98), rgba(8, 11, 13, 0.28), rgba(8, 11, 13, 0.94)),
    var(--scene-launch);
  opacity: 0.62;
  filter: saturate(0.92) contrast(1.08);
}

.legal-section.cinematic-scene::after {
  background:
    radial-gradient(circle at 78% 12%, rgba(74, 183, 168, 0.22), transparent 22rem),
    radial-gradient(circle at 14% 68%, rgba(227, 166, 86, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(8, 11, 13, 0.9), rgba(8, 11, 13, 0.56) 45%, rgba(8, 11, 13, 0.96));
}

.legal-panel {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(10, 15, 17, 0.72);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.13), transparent 26%),
    linear-gradient(90deg, rgba(227, 166, 86, 0.08), transparent 42%, rgba(74, 183, 168, 0.08));
  opacity: 0.72;
}

.legal-panel h1 {
  position: relative;
  max-width: 15ch;
}

.legal-panel .lead,
.legal-panel .eyebrow,
.legal-content {
  position: relative;
}

.legal-content {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
}

.legal-content article {
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.legal-content p {
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.reveal-up {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(8px);
  transition:
    opacity 760ms ease,
    transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 760ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal-group > .reveal-up:nth-child(1) {
  --reveal-delay: 80ms;
}

.reveal-group > .reveal-up:nth-child(2) {
  --reveal-delay: 170ms;
}

.reveal-group > .reveal-up:nth-child(3) {
  --reveal-delay: 260ms;
}

.reveal-group > .reveal-up:nth-child(4) {
  --reveal-delay: 350ms;
}

.reveal-group > .reveal-up:nth-child(5) {
  --reveal-delay: 440ms;
}

.reveal-group > .reveal-up:nth-child(6) {
  --reveal-delay: 530ms;
}

.cinematic-scene .section-head,
.cinematic-scene .hero-copy {
  transform: translateY(calc(var(--scene-progress, 0) * -10px));
  transition: transform 120ms linear;
}

.cinematic-scene .project-card:nth-child(even),
.cinematic-scene .service-card:nth-child(even),
.cinematic-scene .process-card:nth-child(even) {
  transform: translateY(calc(var(--scene-progress, 0) * 10px));
}

.cinematic-scene .project-card:nth-child(odd),
.cinematic-scene .service-card:nth-child(odd),
.cinematic-scene .process-card:nth-child(odd) {
  transform: translateY(calc(var(--scene-progress, 0) * -6px));
}

.cinematic-scene .project-card:hover,
.cinematic-scene .service-card:hover,
.cinematic-scene .process-card:hover {
  transform: translateY(-4px);
}

@keyframes phoneFloat {
  0%,
  100% {
    margin-top: 0;
  }

  50% {
    margin-top: -18px;
  }
}

@keyframes phoneLightSweep {
  0%,
  58% {
    opacity: 0;
    transform: translateX(-62%) skewX(-12deg);
  }

  68% {
    opacity: 0.38;
  }

  82%,
  100% {
    opacity: 0;
    transform: translateX(62%) skewX(-12deg);
  }
}

@media (max-width: 940px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    inset: 76px 1rem auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass-strong);
    box-shadow: var(--shadow);
  }

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

  .language-switcher {
    align-self: flex-start;
  }

  .section-head,
  .seo-panel,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .project-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .brand-name small {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding-top: 6.3rem;
    background-position: 62% center;
  }

  .hero-phone-layer {
    right: -3.2rem;
    top: 7.5rem;
    width: min(58vw, 260px);
    opacity: 0.42;
  }

  [dir="rtl"] .hero-phone-layer {
    right: auto;
    left: -3.2rem;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4.2rem);
  }

  .hero-stats,
  .service-grid,
  .project-grid,
  .process-grid,
  .form-grid,
  .captcha-field {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .contact-actions,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .footer-links,
  .developer-link {
    justify-content: stretch;
  }

  .stat {
    min-height: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-up {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .cinematic-scene,
  .cinematic-scene .section-head,
  .cinematic-scene .hero-copy,
  .hero-phone-layer,
  .cinematic-scene .project-card,
  .cinematic-scene .service-card,
  .cinematic-scene .process-card {
    transform: none !important;
    animation: none !important;
  }
}
