/* ==========================================================================
   MATANEL STUDIO — Editorial Design System
   Single accent, hairline rules, large type, no gradients.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — soft graphite, slightly warm */
  --ink: #17171a;
  --ink-raised: #212125;
  --ink-deep: #101013;

  /* Text */
  --text: #f2f1ee;
  --text-dim: #afaca7;
  --text-faint: #7a7772;

  /* Single accent */
  --accent: #e8503c;
  --accent-dim: #a8382a;

  /* Hairlines */
  --rule: rgba(236, 235, 232, 0.16);
  --rule-strong: rgba(236, 235, 232, 0.3);

  /* Type */
  --font-sans: "Heebo", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Heebo", ui-monospace, monospace;

  --step--1: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.5vw, 2.6rem);
  --step-3: clamp(2.4rem, 1.8rem + 3vw, 4.5rem);
  --step-4: clamp(3.2rem, 2rem + 6.5vw, 9rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 12vh, 10rem);
  --measure: 62ch;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 599px) {
  :root {
    --section-y: clamp(3rem, 9vh, 4.5rem);
  }
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  direction: rtl;
  overflow-x: hidden;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

strong {
  font-weight: 700;
  color: #fff;
}

em {
  font-style: normal;
  color: var(--accent);
}

/* Mono label used above every section and in meta rows */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.lead {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
}

/* Section header: eyebrow + display heading, offset to the grid */
.section-head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.section-head p {
  color: var(--text-dim);
  font-weight: 300;
  max-width: var(--measure);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1fr minmax(0, 32ch);
    align-items: end;
    gap: 3rem;
  }

  .section-head .eyebrow {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   5. TOP BAR
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.topbar.is-stuck {
  background: rgba(23, 23, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark span {
  color: var(--accent);
}

/* Hamburger — two rules that cross into an X */
.menu-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 7px;
}

.menu-btn span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.2s linear;
}

.menu-btn.is-open span:first-child {
  transform: translateY(4.25px) rotate(45deg);
}

.menu-btn.is-open span:last-child {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. DRAWER NAVIGATION
   -------------------------------------------------------------------------- */
#side-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 95;
  width: min(420px, 85vw);
  height: 100vh;
  height: 100dvh;
  padding: 7rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink-deep);
  border-inline-start: 1px solid var(--rule);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.6s var(--ease), visibility 0.6s;
}

#side-menu.active {
  transform: translateX(0);
  visibility: visible;
}

#side-menu ul {
  display: grid;
}

#side-menu li {
  border-top: 1px solid var(--rule);
  opacity: 0;
  transform: translateX(1.5rem);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

#side-menu li:last-child {
  border-bottom: 1px solid var(--rule);
}

#side-menu.active li {
  opacity: 1;
  transform: translateX(0);
}

#side-menu.active li:nth-child(1) {
  transition-delay: 0.15s;
}
#side-menu.active li:nth-child(2) {
  transition-delay: 0.22s;
}
#side-menu.active li:nth-child(3) {
  transition-delay: 0.29s;
}
#side-menu.active li:nth-child(4) {
  transition-delay: 0.36s;
}

#side-menu ul a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.1rem;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-dim);
  transition: color 0.3s var(--ease), padding 0.3s var(--ease);
}

#side-menu ul a::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  transition: color 0.3s var(--ease);
}

#side-menu ul a:hover,
#side-menu ul a[aria-current="page"] {
  color: var(--text);
  padding-inline-start: 0.75rem;
}

#side-menu ul a:hover::before,
#side-menu ul a[aria-current="page"]::before {
  color: var(--accent);
}

.drawer-foot {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.drawer-foot a:hover {
  color: var(--accent);
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 12, 0.66);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

#overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--btn-fg);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* Accent wipe from the inline start */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.btn:hover {
  color: #fff;
  border-color: var(--accent);
}

.btn:hover::after {
  transform: scaleX(1);
}

.btn__arrow {
  transition: transform 0.4s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(-0.35rem);
}

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--solid::after {
  background: var(--text);
}

.btn--solid:hover {
  color: var(--ink);
  border-color: var(--text);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* Quiet text link with an animated underline */
.link {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.link::after {
  content: "";
  position: absolute;
  inset-block-end: -4px;
  inset-inline: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.link:hover {
  color: var(--accent);
}

.link:hover::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 7rem clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1) brightness(0.72);
}

/* Vignette so the type always reads */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    var(--ink) 2%,
    rgba(23, 23, 26, 0.68) 45%,
    rgba(23, 23, 26, 0.35) 100%
  );
}

.hero__title {
  /* Height-aware so three lines always fit the first screen */
  font-size: clamp(3rem, min(9.5vw, 15vh), 8.5rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-block: clamp(1.25rem, 3vh, 2rem) clamp(1.75rem, 5vh, 3rem);
}

.hero__meta {
  display: grid;
  gap: 1.5rem;
  padding-top: clamp(1.25rem, 3vh, 2rem);
  border-top: 1px solid var(--rule);
}

.hero__meta p {
  font-weight: 300;
  color: var(--text-dim);
  max-width: 46ch;
}

.hero__meta .btn {
  justify-self: start;
}

@media (min-width: 900px) {
  .hero__meta {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3rem;
  }
}

.hero__scroll {
  position: absolute;
  inset-block-end: 2rem;
  inset-inline-start: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero__scroll::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: var(--rule-strong);
  transform-origin: right;
  animation: sweep 2.4s var(--ease) infinite;
}

@keyframes sweep {
  0%,
  100% {
    transform: scaleX(0.3);
    opacity: 0.4;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (max-width: 899px) {
  .hero__scroll {
    display: none;
  }
}

/* Tighten the hero so the CTA still lands above the fold on phones */
@media (max-width: 599px) {
  .hero {
    padding-block: 5.5rem 2.25rem;
  }

  .hero__title {
    margin-block: 1rem 1.5rem;
  }

  .hero__meta {
    gap: 1.25rem;
    padding-top: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   9. SERVICES — numbered editorial rows, not cards
   -------------------------------------------------------------------------- */
.service-list {
  border-top: none;
}

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  transition: padding-inline-start 0.5s var(--ease);
}

.service-row::before {
  content: "";
  position: absolute;
  inset-block-end: -1px;
  inset-inline: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}

.service-row:hover {
  padding-inline-start: 1rem;
}

.service-row:hover::before {
  transform: scaleX(1);
}

.service-row__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-faint);
  padding-top: 0.45em;
  transition: color 0.4s var(--ease);
}

.service-row:hover .service-row__num {
  color: var(--accent);
}

.service-row__title {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.service-row__desc {
  grid-column: 2;
  color: var(--text-dim);
  font-weight: 300;
  max-width: var(--measure);
}

@media (min-width: 900px) {
  .service-row {
    grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 42ch);
    align-items: baseline;
    gap: 2rem;
  }

  .service-row__desc {
    grid-column: 3;
  }
}

/* --------------------------------------------------------------------------
   10. PORTFOLIO / AUDIO PLAYER
   -------------------------------------------------------------------------- */
.track {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem 1.5rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.4s var(--ease);
}

.track:first-child {
  border-top: none;
}

.play-btn {
  width: 54px;
  height: 54px;
  display: grid;
  place-content: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--text);
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.play-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  /* Optical centering for the play triangle */
  transform: translateX(1px);
}

.play-btn.is-playing svg {
  transform: none;
}

.icon-pause,
.play-btn.is-playing .icon-play {
  display: none;
}

.play-btn.is-playing .icon-pause {
  display: block;
}

.play-btn:hover,
.play-btn.is-playing {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.track__body {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.track__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.track__title {
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.track__artist {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.waveform {
  width: 100%;
  cursor: pointer;
}

.track__time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  direction: ltr;
  text-align: right;
}

@media (max-width: 599px) {
  .track {
    gap: 1rem;
  }

  .play-btn {
    width: 46px;
    height: 46px;
  }
}

/* --------------------------------------------------------------------------
   11. GALLERY — deliberately asymmetric
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  grid-column: span 3;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  background: var(--ink-raised);
}

.gallery-item:nth-child(1) {
  grid-column: span 4;
  aspect-ratio: 16 / 10;
}
.gallery-item:nth-child(2) {
  grid-column: span 2;
  aspect-ratio: 4 / 5;
}
.gallery-item:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 4 / 5;
}
.gallery-item:nth-child(4) {
  grid-column: span 4;
  aspect-ratio: 16 / 10;
}
.gallery-item:nth-child(5),
.gallery-item:nth-child(6) {
  grid-column: span 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.92);
  transition: filter 0.7s var(--ease), transform 0.9s var(--ease);
}

.gallery-item:hover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item,
  .gallery-item:nth-child(n) {
    grid-column: span 1;
    aspect-ratio: 1;
  }

  .gallery-item:nth-child(1) {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }
}

/* --------------------------------------------------------------------------
   12. TESTIMONIALS — typography, not boxes
   -------------------------------------------------------------------------- */
.quotes {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .quotes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quote {
  display: grid;
  gap: 1.5rem;
  align-content: start;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.quote blockquote {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--text);
}

.quote figcaption {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   13. PAGE HEADER (inner pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: clamp(8rem, 18vh, 12rem) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  font-size: var(--step-3);
  margin-block: 1.5rem 1.5rem;
}

/* --------------------------------------------------------------------------
   14. ABOUT
   -------------------------------------------------------------------------- */
.prose {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 900px) {
  .prose {
    grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
    gap: 4rem clamp(3rem, 6vw, 6rem);
  }
}

.prose__block {
  display: contents;
}

.prose__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.5rem;
}

.prose__body {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.prose__body p {
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: var(--measure);
}

.prose__body p:first-child {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
}

.checklist {
  display: grid;
  gap: 0;
}

.checklist li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 300;
  color: var(--text-dim);
}

.checklist li:first-child {
  border-top: 1px solid var(--rule);
}

.checklist li::before {
  content: counter(list-item, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   15. KARAOKE
   -------------------------------------------------------------------------- */
.video-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 700px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-item {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.video-wrapper {
  aspect-ratio: 16 / 9;
  background: var(--ink-deep);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  display: grid;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.video-title {
  font-size: var(--step-0);
  font-weight: 700;
}

.video-desc {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   16. FORM
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28ch);
    gap: clamp(3rem, 8vw, 7rem);
  }
}

form {
  display: grid;
  gap: 2.25rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0;
  font-family: inherit;
  font-size: var(--step-1);
  font-weight: 300;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

/* Phone digits read LTR but stay aligned to the RTL flow */
input[type="tel"] {
  direction: ltr;
  text-align: right;
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.6;
}

.contact-aside {
  display: grid;
  gap: 1.75rem;
  align-content: start;
}

.contact-aside dt {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}

.contact-aside dd {
  font-size: var(--step-0);
  font-weight: 300;
}

.contact-aside a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   17. FOOTER
   -------------------------------------------------------------------------- */
footer {
  padding-block: clamp(4rem, 9vw, 7rem) 2rem;
  border-top: 1px solid var(--rule);
  background: var(--ink-deep);
}

.footer-top {
  display: grid;
  gap: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 800px) {
  .footer-top {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.footer-cta {
  font-size: var(--step-3);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.footer-cta a {
  position: relative;
  display: inline-block;
}

.footer-cta a::after {
  content: "";
  position: absolute;
  inset-block-end: 0.1em;
  inset-inline: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.footer-cta a:hover::after {
  transform: scaleX(1);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.social-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   18. LIGHTBOX
   -------------------------------------------------------------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(13, 13, 16, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
}

#lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.97);
  transition: transform 0.5s var(--ease);
}

#lightbox.active img {
  transform: scale(1);
}

#lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

#lightbox-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   19. TOAST
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  inset-block-end: 1.5rem;
  inset-inline: var(--gutter);
  z-index: 300;
  margin-inline: auto;
  width: fit-content;
  max-width: min(36rem, 90vw);
  padding: 1rem 1.5rem;
  font-size: var(--step--1);
  background: var(--ink-raised);
  border: 1px solid var(--rule-strong);
  border-inline-start: 2px solid var(--accent);
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  border-inline-start-color: #4ca97a;
}

/* --------------------------------------------------------------------------
   20. TOUCH DEVICES — nothing important may hide behind :hover
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .gallery-item img {
    filter: none;
  }

  .service-row__num {
    color: var(--accent);
  }

  .btn:active::after,
  .service-row:active::before,
  .footer-cta a:active::after,
  .link:active::after {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------------------------
   21. SCROLL REVEAL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
