:root {
  --ink: #171318;
  --paper: #f5efe6;
  --paper-deep: #e9dfd3;
  --plum: #b32cff;
  --plum-soft: #dca6ff;
  --line: rgba(23, 19, 24, 0.18);
  --max: 1180px;
  --radius: 1.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 10%, rgba(179, 44, 255, 0.12), transparent 28rem),
    var(--paper);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}
a { color: inherit; text-decoration: none; }
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 239, 230, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
nav {
  width: min(calc(100% - 2.5rem), var(--max));
  min-height: 5rem;
  margin: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}
nav a:first-child {
  margin-inline-end: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}
nav a:not(:first-child) { font-size: .88rem; font-weight: 650; }
nav a:last-child {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: .35rem .7rem;
}
main, footer { overflow: hidden; }
section, footer {
  width: min(calc(100% - 2.5rem), var(--max));
  margin-inline: auto;
}
section { padding: clamp(5rem, 10vw, 9rem) 0; }
main > section:first-child {
  min-height: calc(100vh - 5rem);
  display: grid;
  align-content: center;
  position: relative;
}
main > section:first-child::after {
  content: "N";
  position: absolute;
  inset-inline-end: -1rem;
  top: 50%;
  transform: translateY(-50%);
  color: transparent;
  -webkit-text-stroke: 1px rgba(179, 44, 255, .38);
  font-family: Georgia, serif;
  font-size: clamp(18rem, 38vw, 36rem);
  line-height: .7;
  z-index: -1;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}
h1 { max-width: 950px; font-size: clamp(3.4rem, 8vw, 7.4rem); margin-bottom: 2rem; }
h2 { max-width: 850px; font-size: clamp(2.5rem, 5.5vw, 5rem); }
h3 { font-size: 1.25rem; line-height: 1.2; }
p { max-width: 680px; font-size: clamp(1rem, 1.5vw, 1.2rem); }
main > section:first-child > p:first-of-type { margin-inline-start: clamp(0rem, 16vw, 12rem); }
main > section:first-child > p:last-child {
  margin: 2.25rem 0 0 clamp(0rem, 16vw, 12rem);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
main > section:first-child > p:last-child a,
#contact::after {
  display: inline-block;
  border-radius: 999px;
  padding: .85rem 1.35rem;
  font-size: .9rem;
  font-weight: 750;
}
main > section:first-child > p:last-child a:first-child { background: var(--ink); color: var(--paper); }
main > section:first-child > p:last-child a:last-child { border: 1px solid var(--ink); }
#services {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
#services > h2 { grid-column: 1 / -1; margin-bottom: 3rem; }
#services article {
  grid-column: span 4;
  min-height: 18rem;
  padding: 1.6rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#services article:nth-of-type(2) { transform: translateY(2.5rem); background: var(--plum); color: var(--ink); }
#services article p { font-size: 1rem; margin-bottom: 0; }
#portfolio { min-height: 35rem; border-bottom: 1px solid var(--line); }
#portfolio h2::after {
  content: "01 — Coming soon";
  display: block;
  margin-top: 2rem;
  font: 700 .75rem/1.2 Inter, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--plum);
}
#about { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(2rem, 8vw, 8rem); align-items: end; }
#about p { margin-bottom: 0; }
#contact {
  margin-bottom: 3rem;
  padding-inline: clamp(1.5rem, 5vw, 5rem);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--ink);
  color: var(--paper);
}
#contact h2 { color: var(--plum-soft); }
footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
[dir="rtl"] body { font-family: Tahoma, Arial, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2 { font-family: Tahoma, Arial, sans-serif; letter-spacing: -.025em; }
[dir="rtl"] main > section:first-child::after { content: "ن"; }
[dir="rtl"] #portfolio h2::after { content: "۰۱ — به‌زودی"; font-family: Tahoma, sans-serif; }
@media (max-width: 760px) {
  nav a:not(:first-child):not(:last-child) { display: none; }
  section { padding-block: 5rem; }
  #services { display: block; }
  #services article { min-height: 14rem; margin-bottom: 1rem; }
  #services article:nth-of-type(2) { transform: none; }
  #about { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3rem, 14vw, 5rem); }
}
@media (prefers-reduced-motion: no-preference) {
  main > section:first-child > * { animation: reveal .75s ease both; }
  main > section:first-child > *:nth-child(2) { animation-delay: .12s; }
  main > section:first-child > *:nth-child(3) { animation-delay: .22s; }
  a { transition: opacity .2s ease, transform .2s ease; }
  a:hover { opacity: .68; }
  main > section:first-child > p:last-child a:hover { transform: translateY(-2px); }
  @keyframes reveal { from { opacity: 0; transform: translateY(24px); } }
}

#contact {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}
.contact-intro { position: sticky; top: 8rem; }
.eyebrow {
  margin-bottom: 1rem;
  color: var(--plum-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.email-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding-bottom: .15rem;
  border-bottom: 1px solid var(--plum-soft);
  color: var(--plum-soft);
  font-weight: 700;
}
.enquiry-form { display: grid; gap: 1.45rem; }
.enquiry-form label { display: grid; gap: .55rem; }
.enquiry-form label > span {
  color: rgba(245, 239, 230, .72);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.enquiry-form small { font-size: inherit; font-weight: inherit; }
.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
  width: 100%;
  padding: .9rem 0;
  border: 0;
  border-bottom: 1px solid rgba(245, 239, 230, .35);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--paper);
  font: inherit;
}
.enquiry-form select { color-scheme: dark; }
.enquiry-form textarea { resize: vertical; }
.enquiry-form input::placeholder,
.enquiry-form textarea::placeholder { color: rgba(245, 239, 230, .42); }
.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus { border-bottom-color: var(--plum-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.enquiry-form button {
  justify-self: start;
  margin-top: .5rem;
  padding: 1rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--plum);
  color: var(--ink);
  font: 800 .9rem/1 inherit;
  cursor: not-allowed;
  opacity: .72;
}
.form-note { margin: -.65rem 0 0; color: rgba(245, 239, 230, .52); font-size: .78rem; }
[dir="rtl"] .eyebrow,
[dir="rtl"] .enquiry-form label > span { letter-spacing: 0; }
@media (max-width: 760px) {
  #contact { grid-template-columns: 1fr; }
  .contact-intro { position: static; }
  .form-row { grid-template-columns: 1fr; }
}
