.immersive {
  --night: #102633;
  --pearl: #fff8ed;
  --metal: #e7ad87;
  --edge: clamp(1.2rem, 5.6vw, 6.8rem);
  background: var(--night);
}
.page-width { width: min(calc(100% - 2 * var(--edge)), 92rem); margin-inline: auto; }
.masthead {
  position: absolute; inset: 0 0 auto; z-index: 5; color: var(--pearl);
}
.masthead-line {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: clamp(4.7rem, 7.5vw, 6.65rem); border-bottom: 1px solid #fff6e650;
}
.mast-brand, .mast-nav, .mast-actions, .opening-actions, .opening-credit {
  display: flex; align-items: center;
}
.mast-brand { min-inline-size: 0; gap: .55rem; }
.arch-logo { flex: none; width: 2.05rem; height: 2.55rem; }
.mast-type { display: grid; min-inline-size: 0; justify-items: start; }
.mast-type strong { font: 700 1.75rem/1.25 Vazirmatn, Tahoma, sans-serif; }
.mast-type small { font: 500 .875rem/1.35 Vazirmatn, sans-serif; }
.mast-nav { gap: clamp(1.3rem, 3.2vw, 3.3rem); }
.mast-nav a { font-size: 1rem; padding: .6rem .1rem; }
.mast-nav a:hover, .quiet-action:hover, .opening-credit:hover { color: #ffd7b5; }
.mast-actions { gap: .6rem; }
.outline-action, .primary-action, .immersive .button-copper {
  display: inline-flex; justify-content: center; align-items: center;
  border-radius: 2rem; min-height: 3.05rem; padding: .62rem 1.62rem;
  line-height: 1.5; font-weight: 630; border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease;
}
.outline-action { color: var(--pearl); border-color: #fff6e6a3; font-size: .94rem; }
.outline-action:hover { background: #132d3bc7; }
.primary-action, .immersive .button-copper { color: #122833; background: var(--metal); }
.primary-action:hover, .immersive .button-copper:hover { background: #f4c8a6; }
.immersive .menu-button { border-radius: 50%; color: var(--pearl); border-color: #fff6e6a3; }
.immersive :is(.masthead,.opening,.contact) :focus-visible { outline-color: #ffddb4; }
.opening { position: relative; isolation: isolate; background: #172933; color: var(--pearl); }
.opening-picture, .opening::after { position: absolute; inset: 0; pointer-events: none; }
.opening-picture { z-index: -2; overflow: hidden; }
.opening-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 48%; }
.opening::after {
  content: ""; z-index: -1;
  background:
    linear-gradient(to bottom, #0a1825a3, transparent 23%, transparent 64%, #0b1a28e0 100%),
    linear-gradient(to left, #0a1a28df 0%, #0c1e2ac9 19%, #0c1c2977 43%, #101c2324 64%, #101c2305 100%);
}
.opening-inner {
  display: grid; grid-template-rows: 1fr auto; min-height: 100vh; min-height: 100svh;
  padding-top: clamp(5.4rem, 9vw, 8rem); padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
.opening-story { align-self: center; padding-block: clamp(1.25rem, 5vh, 4rem); max-width: 42rem; }
.opening-story h1 { margin: 0; color: var(--pearl); font-weight: 630; }
.opening-story h1 span { display: block; font-size: clamp(1.75rem, 3vw, 3.15rem); line-height: 1.55; font-weight: 560; }
.opening-story h1 em {
  display: block; width: max-content; color: #ffdbb8; font-style: normal;
  font-weight: 780; font-size: clamp(6.7rem, 11vw, 11rem); line-height: 1.2;
}
.opening-story p {
  color: #f4f3ed; max-width: 28rem; margin-block: .9rem 1.6rem;
  font-size: clamp(1.04rem, 1.4vw, 1.26rem); line-height: 1.9; font-weight: 460;
}
.opening-actions { flex-wrap: wrap; gap: 1.65rem; }
.quiet-action, .ink-link {
  display: inline-block; width: fit-content; font-weight: 600; padding-block: .4rem;
  border-bottom: 1px solid currentColor; line-height: 1.4; font-size: 1rem;
}
.quiet-action { color: var(--pearl); border-color: #f7e6d59e; }
.opening-credit {
  justify-self: end; width: fit-content; gap: .4rem; min-height: 2.75rem;
  font-size: .88rem; color: #f5e8d9;
}
.opening-credit .icon { color: var(--metal); }
.service-chapter, .journey-chapter, .immersive .faq { color: var(--navy); }
.service-chapter, .immersive .faq { background: #fcfaf6; }
.service-content, .journey-content, .immersive .faq {
  padding-block: clamp(3.5rem, 6.6vw, 6.5rem);
}
.service-content, .immersive .faq .section-grid {
  display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr);
  gap: clamp(2rem, 7vw, 7rem); align-items: start;
}
.service-chapter h2, .journey-chapter h2, .immersive .faq h2 {
  font-size: clamp(2rem, 3.75vw, 3.65rem); line-height: 1.46; font-weight: 725;
}
.chapter-intro p {
  margin-top: .6rem; max-width: 23rem; font-size: 1.04rem; line-height: 1.95; color: var(--muted);
}
.service-sel {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(1.15rem, 2.5vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.service-sel button {
  position: relative; border: 0; padding: .55rem 0 .65rem; min-height: 2.8rem;
  color: var(--muted); font-size: 1rem; white-space: nowrap;
}
.service-sel button[aria-selected="true"] { color: #754028; font-weight: 735; }
.service-sel button[aria-selected="true"]::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: #995a38;
}
.service-answer { max-width: 40rem; padding-top: 1.25rem; scroll-margin-block-start: 4rem; }
.service-answer h3 { font-size: clamp(1.25rem, 2vw, 1.8rem); font-weight: 665; line-height: 1.65; }
.service-answer p { margin: .45rem 0 .72rem; font-size: 1.04rem; line-height: 1.92; color: var(--muted); }
.ink-link { color: #804529; }
.ink-link:hover { color: #542e1a; }
.journey-chapter { background: #f1eee7; border-block: 1px solid #e0dcd3; }
.journey-list {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(1.8rem,4.5vw,4.5rem);
  list-style: persian inside; padding: 0; margin-top: clamp(1.4rem,3vw,2.75rem);
}
.journey-list li { border-top: 1px solid #c1aa99; padding-top: 1rem; }
.journey-list li::marker { color: #895033; font-size: 1.07rem; font-weight: 600; }
.journey-list h3 { display: inline; margin-inline-start: .22rem; font-size: clamp(1.06rem,1.38vw,1.32rem); font-weight: 685; }
.journey-list p { color: var(--muted); font-size: 1rem; line-height: 1.9; margin-top: .4rem; }
.immersive .faq { border: 0; }
.immersive .faq .section-grid, .immersive .contact-inner, .immersive .footer-inner {
  width: min(calc(100% - 2 * var(--edge)), 92rem);
}
.immersive .faq-list summary { padding-block: 1.1rem; }
.immersive .toggle-sign, .immersive .faq-list summary:hover strong { color: #865031; }
.immersive .contact { background: #112c3e; color: var(--pearl); }
.immersive .contact-inner { padding-block: clamp(2.65rem, 4.5vw, 4.6rem); }
.immersive .contact-inner h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.immersive .contact p { color: #dce3e2; }
.immersive .footer { border-color: #ffffff23; background: #0b1e2a; color: #e8ece7; }
.immersive .footer-inner > div { color: #d3dedd; }
.immersive .footer a:hover { color: #ffd6b1; }
.immersive .dialog-top h2 { font-size: 1.65rem; }
.immersive dialog select {
  appearance: none; padding-inline-end: 2.4rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2319344b' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat left .7rem center / .85rem;
}
@media (max-width: 800px) {
  .masthead-line { gap: 1rem; }
  .mast-nav { gap: 1rem; }
  .opening-story { max-width: 33rem; }
  .service-content, .immersive .faq .section-grid { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .chapter-intro p, .service-answer { max-width: 41rem; }
}
@media (max-width: 640px) {
  .immersive { --edge: clamp(1.15rem, 5.6vw, 2rem); }
  .masthead-line { min-height: 4.35rem; }
  .arch-logo { width: 1.72rem; height: 2.15rem; }
  .mast-type strong { font-size: clamp(1rem, 4.65vw, 1.5rem); text-wrap: balance; }
  .mast-type small { font-size: .72rem; }
  .mast-actions .outline-action { display: none; }
  .mast-actions .menu-button { display: grid; width: 2.75rem; height: 2.75rem; }
  .mast-nav {
    display: none; position: absolute; inset: calc(100% + .3rem) 0 auto;
    padding: .5rem 1rem; background: #102633f5; border: 1px solid #fff3dc52; border-radius: .45rem;
  }
  .mast-nav.is-open { display: grid; gap: 0; }
  .mast-nav a { padding: .75rem .35rem; }
  .opening::after {
    background: linear-gradient(to bottom, #0b1e2db8, #0c1e2c18 18%, #0b1c2929 32%, #0c1d2a94 51%, #0c1d2adf 78%, #0b1c2bef),
                linear-gradient(to left, #0d223485, transparent 77%);
  }
  .opening-inner { grid-template-rows: 1fr auto; padding-top: 4.8rem; padding-bottom: max(.82rem, env(safe-area-inset-bottom)); }
  .opening-story { align-self: end; padding-block: 1rem clamp(2.3rem, 6svh, 4.1rem); }
  .opening-story h1 span { font-size: clamp(1.24rem, 5.2vw, 2.1rem); }
  .opening-story h1 em { font-size: clamp(5.35rem, 20vw, 7.4rem); line-height: 1.22; }
  .opening-story p { margin-block: .48rem 1.05rem; line-height: 1.8; font-size: 1rem; max-width: 25rem; }
  .opening-actions { gap: 1.35rem; }
  .primary-action { padding: .57rem 1.24rem; min-height: 2.85rem; }
  .quiet-action { font-size: .93rem; }
  .opening-credit { min-height: 2.75rem; font-size: .83rem; }
  .service-content, .journey-content, .immersive .faq { padding-block: 3rem; }
  .chapter-intro p, .service-answer p { font-size: 1rem; }
  .service-sel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .15rem 1rem; align-items: stretch; }
  .service-sel button { text-align: start; font-size: .94rem; white-space: normal; line-height: 1.5; }
  .journey-list { grid-template-columns: minmax(0,1fr); gap: .85rem; }
  .journey-list li { padding-top: .65rem; }
  .journey-list p { margin-top: .12rem; }
  .immersive .faq .section-grid { gap: 1rem; }
  .immersive .contact-inner { align-items: flex-start; }
}
@media (max-height: 630px) and (min-width: 641px) {
  .masthead-line { min-height: 4rem; }
  .opening-inner { padding-top: 4.3rem; padding-bottom: .5rem; }
  .opening-story { padding-block: .65rem; }
  .opening-story h1 span { font-size: 1.6rem; }
  .opening-story h1 em { font-size: clamp(4.3rem, 12.5vh, 6rem); }
  .opening-story p { font-size: 1rem; margin-block: .2rem .65rem; }
}
@media (max-width: 640px) and (max-height: 630px) {
  .opening-story { padding-bottom: 1.1rem; }
  .opening-story h1 em { font-size: 4.8rem; }
}
@media (max-width: 360px) {
  .masthead-line { --edge: .65rem; }
  .mast-brand { gap: .3rem; }
  .arch-logo { width: 1.5rem; }
  .mast-actions .language-menu > summary { gap: .15rem; padding-inline: .2rem; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .primary-action, .outline-action { transition: none; }
}
.home-journal { padding-block: clamp(3.4rem,6.4vw,6.2rem); background: #f2ece3; color: #162f3c; }
.home-journal header { display: flex; justify-content: space-between; align-items: baseline; gap: .9rem 2rem; flex-wrap: wrap; margin-block-end: 1.7rem; }
.home-journal header h2 { margin: 0; font-size: clamp(1.85rem, 3.2vw, 2.9rem); line-height: 1.4; }
.home-journal header a { color: #824628; font-weight: 650; text-decoration: underline; text-underline-offset: .28em; }
.teaser-stories { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-block-start: 1px solid #c7bdac; gap: clamp(1.25rem,3vw,3.2rem); }
.teaser-stories article { min-width: 0; display: flex; flex-direction: column; align-items: start; padding-block: 1.1rem .45rem; }
.teaser-stories span { color: #84492d; font-size: .88rem; font-weight: 650; }
.teaser-stories h3 { font-size: clamp(1.12rem,1.65vw,1.48rem); line-height: 1.65; margin: .45rem 0 .85rem; }
.teaser-stories h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.teaser-stories time { margin-block-start: auto; color: #4c5e65; font-size: .83rem; }
@media (max-width: 680px) {
  .teaser-stories { grid-template-columns: 1fr; gap: 0; }
  .teaser-stories article { padding-block: 1rem; border-block-end: 1px solid #d8cebf; }
}
