@font-face {
  font-family: Vazirmatn;
  src: url('assets/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f2e9;
  --ink: #302219;
  --muted: #68564a;
  --dark: #251b15;
  --dark-text: #fff3e2;
  --accent: #e2ac78;
  --line: #dfd1c2;
  --radius: 1.25rem;
  font: 16px/1.8 Vazirmatn, Tahoma, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid #995a2b; outline-offset: 4px; }
.hero :focus-visible, .contact :focus-visible { outline-color: #fff0cb; }
.wrap { width: min(90%, 76rem); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: .5rem; right: .5rem; transform: translateY(-160%); background: white; padding: .5rem 1rem; }
.skip:focus { transform: none; }

.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; min-height: 5.35rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 850; font-size: 1.08rem; line-height: 1.42; white-space: nowrap; }
.brand img { width: 2.9rem; height: 2.9rem; object-fit: cover; border-radius: 50%; border: 1px solid #b99a81; }
.brand small { display: block; color: var(--muted); font-size: .76rem; font-weight: 550; }
.header nav { display: flex; gap: clamp(1rem, 3vw, 2.75rem); color: var(--muted); font-size: .92rem; font-weight: 650; }
.header nav a { padding-block: .6rem; }
.header nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .35em; }
.header-phone { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 99px; padding: .4rem .8rem; font-size: .88rem; font-weight: 730; }
.header-phone:hover { background: #efe4d7; }
.icon { display: inline-flex; width: 1.1rem; height: 1.1rem; flex: none; }
.icon svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.hero { background: var(--dark); color: var(--dark-text); }
.hero-inner { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(1.5rem, 5vw, 4.75rem); align-items: center; padding-block: clamp(2.25rem, 5vw, 4.75rem); }
.eyebrow { display: flex; align-items: center; gap: .55rem; color: var(--accent); font-size: clamp(.8rem, 1.4vw, .95rem); font-weight: 700; }
.eyebrow span { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.hero h1 { margin-block: .44em .24em; font-size: clamp(2.9rem, 6.35vw, 5.8rem); font-weight: 900; line-height: 1.04; }
.intro { max-width: 29rem; color: #ead8c6; font-size: clamp(1rem, 1.55vw, 1.18rem); line-height: 1.95; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3rem; padding: .6rem 1.13rem; border: 1px solid transparent; border-radius: .65rem; font-size: .91rem; font-weight: 800; }
.button-solid { background: var(--accent); color: #2a1b10; }
.button-solid:hover { background: #f0c597; }
.button-outline { border-color: #967e68; }
.button-outline:hover { background: #4e3b2d; }
.hero-photo { position: relative; border-radius: var(--radius); overflow: hidden; background: #4d3526; }
.hero-photo img { aspect-ratio: 3 / 2; object-fit: cover; object-position: center; }
.hero-photo figcaption { position: absolute; bottom: .8rem; inset-inline-start: .8rem; padding: .2rem .58rem; border-radius: .35rem; background: #241a13e8; color: var(--dark-text); font-size: .71rem; }

.portfolio { padding-block: clamp(3.2rem, 6.3vw, 6rem); scroll-margin-top: 1rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; margin-bottom: 1.4rem; }
h2 { font-weight: 880; line-height: 1.3; font-size: clamp(1.75rem, 3.7vw, 2.9rem); }
.section-heading p { font-size: .9rem; color: var(--muted); }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.65rem, 2vw, 1.35rem); }
.project { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fffbf5; transition: box-shadow .2s, transform .2s; }
.project:hover { transform: translateY(-4px); box-shadow: 0 12px 24px #492a1517; }
.project img { aspect-ratio: 1.22; object-fit: cover; background: #d9c6b4; }
.project-caption { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: .4rem; padding: .75rem .85rem; font-size: clamp(.88rem, 1.44vw, 1.1rem); }
.project-caption strong { font-weight: 800; line-height: 1.45; }
.project-arrow { display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #f2e6d8; color: #754627; }

.contact-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.4rem; padding: clamp(1.3rem, 4.5vw, 3.3rem); border-radius: var(--radius); background: var(--dark); color: var(--dark-text); }
.contact h2 { font-size: clamp(1.55rem, 3.25vw, 2.45rem); }
.contact address { display: flex; align-items: center; gap: .3rem; margin-top: .5rem; color: #ead8c6; font-style: normal; }
.contact address .icon { color: var(--accent); }
.call { white-space: nowrap; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: 1.25rem; font-size: .79rem; color: var(--muted); }

.design { position: fixed; width: min(92%, 44rem); max-height: 88vh; max-height: 88dvh; padding: 0; border: 0; border-radius: var(--radius); color: var(--ink); background: #fffbf5; }
.design::backdrop { background: #1f150fec; }
body:has(.design[open]) { overflow: hidden; }
.design img { max-height: 58vh; object-fit: contain; background: var(--dark); }
.design-caption { padding: 1.15rem 1.35rem 1.4rem; }
.design-caption h2 { font-size: clamp(1.25rem, 4vw, 1.9rem); margin-block: .23em .28em; }
.design-caption p { color: var(--muted); font-size: .92rem; }
.design-caption p:first-child { font-size: .79rem; font-weight: 700; }
.close { position: absolute; top: .75rem; inset-inline-end: .75rem; border: 0; border-radius: 50%; width: 2.75rem; height: 2.75rem; line-height: 1; background: var(--dark); color: var(--dark-text); font-size: 1.65rem; cursor: pointer; }
.close:focus-visible { outline-color: #f9d7a8; }

@media (max-width: 850px) {
  .hero-inner { gap: 1.5rem; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project img { aspect-ratio: 1.5; }
}

@media (max-width: 650px) {
  .header-inner { min-height: 4.25rem; gap: .65rem; }
  .header nav { gap: .8rem; font-size: .8rem; }
  .header-phone { display: none; }
  .brand { gap: .45rem; font-size: .98rem; }
  .brand img { width: 2.4rem; height: 2.4rem; }
  .brand small { font-size: .67rem; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 2.1rem 1.4rem; }
  .hero h1 { margin-block: .42em .28em; }
  .actions { margin-top: 1.3rem; }
  .hero-photo { border-radius: .9rem; }
  .project { border-radius: .85rem; }
  .project-caption { padding: .62rem; }
  .project-arrow { width: 1.35rem; height: 1.35rem; }
}

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