/* ==========================================================================
   Hamayun Immigration Firm — Design System v2
   Palette derived from the firm's own collateral:
     forest #16211a · pine #1e2e24 · sage #a9bc96 · ivory #f4f1e8 · brass #c0a265
   Type: Prata (display, matches the HF wordmark) · Public Sans · IBM Plex Mono
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --forest:   #16211a;
  --pine:     #1e2e24;
  --moss:     #2b3f31;
  --sage:     #a9bc96;
  --sage-dim: #7f9078;
  --ivory:    #f4f1e8;
  --sheet:    #fbfaf5;
  --stock:    #eae7dc;
  --brass:    #c0a265;
  --brass-lt: #d8bd85;
  --ink:      #14190f;
  --slate:    #4d5648;
  --slate-lt: #77806f;
  --rule:     #d5d2c4;
  --rule-soft:#e3e0d4;
  --signal:   #9d2f2b;

  --f-display: "Prata", Georgia, "Times New Roman", serif;
  --f-body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --w-page: 1280px;
  --w-text: 68ch;
  --rail:   190px;
  --gap:    56px;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 36px;
  --s5: 56px; --s6: 88px; --s7: 124px; --s8: 168px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--f-body);
  font-size: 17px; line-height: 1.66;
  color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--sage); color: var(--forest); }

.skip {
  position: absolute; left: 12px; top: -120px; z-index: 300;
  background: var(--forest); color: var(--ivory);
  padding: 14px 22px; font: 600 13px/1 var(--f-mono); letter-spacing: .08em;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- 3. Scroll progress ---------- */
.prog {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brass), var(--sage));
  z-index: 200; transition: width .1s linear;
}

/* ---------- 4. Typography ---------- */
.d1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.6rem, 1.35rem + 4.7vw, 5.1rem);
  line-height: 1.06; letter-spacing: -.02em; text-wrap: balance;
}
.d2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.95rem, 1.25rem + 2.7vw, 3.05rem);
  line-height: 1.14; letter-spacing: -.015em; text-wrap: balance;
}
.d3 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.35rem, 1.08rem + 1.1vw, 1.8rem);
  line-height: 1.26; letter-spacing: -.01em;
}
.d4 { font-family: var(--f-display); font-weight: 400; font-size: 1.17rem; line-height: 1.34; }
.lede {
  font-size: clamp(1.06rem, .99rem + .45vw, 1.3rem);
  line-height: 1.6; color: var(--slate); max-width: 62ch; text-wrap: pretty;
}
.prose p { max-width: var(--w-text); margin-bottom: 1.05em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 700; }
.prose a:not(.btn) { color: var(--moss); border-bottom: 1px solid var(--brass); transition: color .18s var(--ease); }
.prose a:not(.btn):hover { color: var(--brass); }

.eyebrow {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .19em; text-transform: uppercase; color: var(--moss);
}
.eyebrow--pale { color: var(--sage); }
.small { font-size: 14.5px; line-height: 1.62; color: var(--slate); }
.mono { font-family: var(--f-mono); font-size: 13px; }

/* ---------- 5. Frame ---------- */
.wrap { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: 30px; }
.section { padding-block: var(--s7); position: relative; }
.section--tight { padding-block: var(--s6); }
.section--sheet { background: var(--sheet); }
.section--ink { background: var(--forest); color: var(--ivory); overflow: hidden; }
.section--ink .lede, .section--ink .small { color: rgba(244,241,232,.7); }
.section--ink .d1, .section--ink .d2, .section--ink .d3, .section--ink .d4 { color: var(--ivory); }
.hr { height: 1px; background: var(--rule); border: 0; }

.grid { display: grid; grid-template-columns: var(--rail) minmax(0,1fr); gap: var(--gap); align-items: start; }

.rail {
  position: sticky; top: 104px;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.62;
  color: var(--slate-lt); border-top: 2px solid var(--moss); padding-top: 14px;
}
.section--ink .rail { border-top-color: var(--sage); color: rgba(244,241,232,.55); }
.rail__no {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em;
  color: var(--brass); margin-bottom: 10px;
}
.section--ink .rail__no { color: var(--brass-lt); }
.rail__cite { display: block; margin-top: 12px; padding-left: 11px; border-left: 1px solid var(--rule); }
.section--ink .rail__cite { border-left-color: rgba(244,241,232,.25); }

/* ---------- 6. Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 120;
  background: rgba(244,241,232,.88);
  backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--rule);
  transition: background .3s var(--ease);
}
.hdr.solid { background: rgba(244,241,232,.97); }
.hdr__in { display: flex; align-items: center; gap: var(--s3); min-height: 80px; }

.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand__mk { width: 40px; height: 45px; flex: none; display: grid; place-items: center; }
.brand__mk .mk { width: 100%; height: 100%; overflow: visible; }
.mk-h { fill: var(--sage-dim); }
.mk-f { fill: var(--forest); }
.section--ink .mk-f, .ftr .mk-f { fill: var(--ivory); }
.brand__tx { display: flex; flex-direction: column; line-height: 1.18; }
.brand__nm { font-family: var(--f-display); font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.brand__sub { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--slate-lt); }
.ftr .brand__nm { color: var(--ivory); }
.ftr .brand__sub { color: var(--sage-dim); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 14.5px; font-weight: 500;
  color: var(--slate); transition: color .18s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.hdr__cta { display: flex; align-items: center; gap: 14px; }
.hdr__tel { font-family: var(--f-mono); font-size: 13px; color: var(--moss); white-space: nowrap; }
.hdr__tel:hover { color: var(--brass); }

.burger {
  display: none; width: 44px; height: 44px; background: none;
  border: 1px solid var(--rule); cursor: pointer;
  align-items: center; justify-content: center; gap: 4px; flex-direction: column;
}
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .28s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.drawer { display: none; border-top: 1px solid var(--rule); background: var(--sheet); }
.drawer.open { display: block; animation: drop .3s var(--ease-out); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.drawer a { display: block; padding: 15px 30px; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--rule-soft); }
.drawer a[aria-current="page"] { color: var(--moss); font-weight: 600; }
.drawer .drawer__cta { background: var(--forest); color: var(--ivory); font-weight: 600; border-bottom: 0; }

/* ---------- 7. Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px;
  font-family: var(--f-body); font-size: 14.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: 2px;
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  transform: translateY(101%); transition: transform .38s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(1px); }
.btn--pri { background: var(--forest); color: var(--ivory); }
.btn--pri::before { background: var(--brass); }
.btn--pri:hover { color: var(--forest); }
.btn--ghost { border-color: var(--moss); color: var(--moss); }
.btn--ghost::before { background: var(--forest); }
.btn--ghost:hover { color: var(--ivory); border-color: var(--forest); }
.btn--pale { border-color: rgba(244,241,232,.45); color: var(--ivory); }
.btn--pale::before { background: var(--sage); }
.btn--pale:hover { color: var(--forest); border-color: var(--sage); }
.btn--brass { background: var(--brass); color: var(--forest); }
.btn--brass::before { background: var(--ivory); }
.btn--sm { padding: 11px 18px; font-size: 13.5px; }
.btn__ar { font-family: var(--f-mono); font-size: 13px; transition: transform .3s var(--ease-out); }
.btn:hover .btn__ar { transform: translateX(4px); }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative; background: var(--forest); color: var(--ivory);
  padding-block: var(--s7) var(--s6); overflow: hidden; isolation: isolate;
}
.hero__aur {
  position: absolute; z-index: -2; inset: -30% -10% auto -10%; height: 130%;
  background:
    radial-gradient(46% 40% at 22% 28%, rgba(169,188,150,.20), transparent 68%),
    radial-gradient(40% 38% at 78% 62%, rgba(192,162,101,.20), transparent 66%),
    radial-gradient(52% 46% at 58% 8%, rgba(43,63,49,.9), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%,0,0) scale(1); }
  to   { transform: translate3d(3%,3%,0) scale(1.09); }
}
.hero__leaves { position: absolute; inset: 0; z-index: -1; opacity: .13; pointer-events: none; }
.hero__leaves svg { width: 100%; height: 100%; }
.hero__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}
.hero__in { display: grid; grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr); gap: var(--s5); align-items: center; }
.hero__h { margin-block: 20px 26px; }
.hero__h em { font-style: normal; color: var(--sage); }
.hero__lede { color: rgba(244,241,232,.74); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 12px 30px;
  margin-top: 38px; padding-top: 24px; border-top: 1px solid rgba(244,241,232,.2);
  font-family: var(--f-mono); font-size: 12px; color: rgba(244,241,232,.55);
}
.hero__meta b { color: var(--sage); font-weight: 500; }

.hero__fig { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.hero__fig::before {
  content: ""; position: absolute; inset: 8% -4% -2% -4%;
  background: radial-gradient(58% 52% at 50% 62%, rgba(192,162,101,.3), transparent 70%);
  filter: blur(28px);
}
.hero__ring {
  position: absolute; left: 50%; top: 52%; width: 108%; aspect-ratio: 1;
  transform: translate(-50%,-50%); border: 1px solid rgba(169,188,150,.3); border-radius: 50%;
  animation: spin 46s linear infinite;
}
.hero__ring::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brass); transform: translateX(-50%);
}
.hero__ring--2 { width: 90%; animation-duration: 34s; animation-direction: reverse; border-color: rgba(192,162,101,.26); }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.hero__im { position: relative; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); }
.hero__badge {
  position: absolute; right: -6px; bottom: 8%; z-index: 3;
  background: var(--ivory); color: var(--forest); padding: 13px 17px;
  border-left: 3px solid var(--brass); box-shadow: 0 16px 40px -18px rgba(0,0,0,.7);
}
.hero__badge b { display: block; font-family: var(--f-display); font-size: 15px; }
.hero__badge span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--slate); text-transform: uppercase; }

.hero__scroll {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--s5);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(244,241,232,.5);
}
.hero__scroll i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--sage), transparent); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- 9. Ribbon ---------- */
.ribbon { background: var(--moss); color: var(--ivory); padding-block: 18px; overflow: hidden; }
.ribbon__t { display: flex; gap: 56px; white-space: nowrap; animation: slide 38s linear infinite; width: max-content; }
.ribbon__t span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,241,232,.72); display: flex; align-items: center; gap: 56px; }
.ribbon__t span::after { content: "\25C6"; color: var(--brass); font-size: 8px; }
@keyframes slide { to { transform: translateX(-50%); } }
.ribbon:hover .ribbon__t { animation-play-state: paused; }

/* ---------- 10. Cards ---------- */
.doc {
  position: relative; overflow: hidden;
  background: var(--sheet); border: 1px solid var(--rule);
  padding: 32px 30px; display: flex; flex-direction: column; gap: 13px;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s var(--ease);
}
.doc::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--brass), var(--sage));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
a.doc:hover, .doc.tilt:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -30px rgba(20,25,15,.55); border-color: var(--sage-dim); }
a.doc:hover::before, .doc.tilt:hover::before { transform: scaleX(1); }
.doc__tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.doc__body { color: var(--slate); font-size: 15.5px; line-height: 1.62; flex: 1; }
.doc__link { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--moss); }
a.doc:hover .doc__link { color: var(--brass); }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(272px,1fr)); }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(330px,1fr)); }
.section--ink .doc { background: var(--pine); border-color: rgba(244,241,232,.16); }
.section--ink .doc__body { color: rgba(244,241,232,.66); }
.section--ink .doc__link { color: var(--sage); }

/* ---------- 11. Tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--sheet); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 540px; }
.tbl caption {
  text-align: left; padding: 18px 22px 14px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass); border-bottom: 1px solid var(--rule);
}
.tbl th, .tbl td { padding: 14px 22px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.tbl thead th {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate-lt); font-weight: 500; border-bottom: 1px solid var(--rule);
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .2s var(--ease); }
.tbl tbody tr:hover { background: rgba(169,188,150,.12); }
.tbl td.num { font-family: var(--f-mono); font-size: 14px; white-space: nowrap; }

/* ---------- 12. Stats ---------- */
.stats { display: grid; gap: 1px; background: var(--rule); grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); border: 1px solid var(--rule); }
.stat { background: var(--sheet); padding: 30px 24px; }
.section--ink .stats { background: rgba(244,241,232,.16); border-color: rgba(244,241,232,.16); }
.section--ink .stat { background: var(--forest); }
.stat__n {
  font-family: var(--f-display); font-size: clamp(2rem, 1.4rem + 1.9vw, 2.9rem);
  line-height: 1; letter-spacing: -.02em; color: var(--moss);
}
.section--ink .stat__n { color: var(--sage); }
.stat__l { margin-top: 12px; font-size: 13.5px; line-height: 1.48; color: var(--slate); }
.section--ink .stat__l { color: rgba(244,241,232,.62); }
.stat__src { margin-top: 10px; font-family: var(--f-mono); font-size: 10.5px; color: var(--slate-lt); }
.section--ink .stat__src { color: rgba(244,241,232,.4); }

/* ---------- 13. Steps / journey ---------- */
.steps { position: relative; counter-reset: st; display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.step { position: relative; background: var(--sheet); padding: 32px 30px; display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 24px; align-items: start; transition: background .3s var(--ease); }
.step:hover { background: var(--ivory); }
.step::before {
  counter-increment: st; content: counter(st, decimal-leading-zero);
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
  color: var(--brass); letter-spacing: .08em; padding-top: 5px;
}
.step__t { margin-bottom: 8px; }
.step__d { color: var(--slate); font-size: 15.5px; }
.section--ink .step { background: var(--pine); }
.section--ink .step:hover { background: var(--moss); }
.section--ink .step__d { color: rgba(244,241,232,.66); }

.jrn { position: relative; padding-left: 46px; }
.jrn__line { position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1px; background: var(--rule); }
.jrn__line i { position: absolute; inset: 0 auto auto 0; width: 1px; height: 0; background: linear-gradient(var(--brass), var(--sage)); transition: height .12s linear; }
.jrn__i { position: relative; padding-bottom: 40px; }
.jrn__i:last-child { padding-bottom: 0; }
.jrn__i::before {
  content: ""; position: absolute; left: -38px; top: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--ivory); border: 1px solid var(--sage-dim);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.jrn__i.on::before { background: var(--brass); border-color: var(--brass); transform: scale(1.35); }
.jrn__k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.jrn__t { margin: 6px 0 8px; }
.jrn__d { color: var(--slate); font-size: 15.5px; max-width: 62ch; }
.section--ink .jrn__line { background: rgba(244,241,232,.2); }
.section--ink .jrn__i::before { background: var(--forest); border-color: var(--sage-dim); }
.section--ink .jrn__d { color: rgba(244,241,232,.66); }

/* ---------- 14. Accordion ---------- */
.acc { border-top: 1px solid var(--rule); }
.acc details { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.acc summary {
  list-style: none; cursor: pointer; padding: 23px 28px 23px 24px;
  display: flex; gap: 18px; align-items: baseline;
  font-family: var(--f-display); font-size: 1.08rem;
  transition: background .2s var(--ease), padding-left .25s var(--ease);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: rgba(169,188,150,.13); padding-left: 30px; }
.acc summary::after { content: "+"; margin-left: auto; font-family: var(--f-mono); font-size: 20px; color: var(--brass); line-height: 1; }
.acc details[open] summary::after { content: "\2013"; }
.acc__k { font-family: var(--f-mono); font-size: 11.5px; color: var(--sage-dim); letter-spacing: .1em; flex: none; }
.acc__c { padding: 0 28px 28px 24px; color: var(--slate); font-size: 15.5px; animation: fade .35s var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(-5px); } }
.acc__c p { max-width: 66ch; margin-bottom: .9em; }
.acc__c p:last-child { margin-bottom: 0; }
.acc__c li { padding-left: 20px; position: relative; margin-bottom: 6px; }
.acc__c li::before { content: "\2014"; position: absolute; left: 0; color: var(--brass); font-family: var(--f-mono); font-size: 12px; }

/* ---------- 15. Lists / notes ---------- */
.bl li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--slate); font-size: 15.5px; line-height: 1.62; max-width: 66ch; }
.bl li::before { content: ""; position: absolute; left: 0; top: .64em; width: 13px; height: 1px; background: var(--brass); }
.bl li b, .bl li strong { color: var(--ink); font-weight: 600; }
.section--ink .bl li { color: rgba(244,241,232,.7); }
.section--ink .bl li b { color: var(--sage); }

.note { border-left: 2px solid var(--sage-dim); background: rgba(169,188,150,.15); padding: 21px 26px; margin-block: var(--s3); font-size: 15px; line-height: 1.62; color: var(--slate); max-width: 72ch; }
.note b { color: var(--ink); }
.note--warn { border-left-color: var(--signal); background: rgba(157,47,43,.07); }
.section--ink .note { background: rgba(244,241,232,.07); border-left-color: var(--sage); color: rgba(244,241,232,.72); }
.section--ink .note b { color: var(--sage); }
.section--ink .note a { color: var(--sage); text-decoration: underline; }

/* ---------- 16. Instruments ---------- */
.inst { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--brass); box-shadow: 0 22px 50px -38px rgba(20,25,15,.55); }
.inst__hd { padding: 21px 28px; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.inst__hd h3 { font-family: var(--f-display); font-size: 1.06rem; }
.inst__prog { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--slate-lt); }
.inst__bd { padding: 32px 28px; min-height: 280px; }
.inst__q { font-family: var(--f-display); font-size: 1.4rem; line-height: 1.28; margin-bottom: 6px; }
.inst__hint { font-size: 14px; color: var(--slate-lt); margin-bottom: 24px; }
.opts { display: grid; gap: 9px; }
.opt {
  position: relative; overflow: hidden; text-align: left; width: 100%;
  background: transparent; border: 1px solid var(--rule); padding: 16px 19px;
  cursor: pointer; font-size: 15.5px; display: flex; align-items: center; gap: 15px;
  transition: border-color .22s var(--ease), color .22s var(--ease), padding-left .25s var(--ease-out);
}
.opt::before { content: ""; position: absolute; inset: 0; background: var(--forest); transform: translateX(-101%); transition: transform .38s var(--ease-out); z-index: 0; }
.opt > * { position: relative; z-index: 1; }
.opt:hover { color: var(--ivory); border-color: var(--forest); padding-left: 24px; }
.opt:hover::before { transform: translateX(0); }
.opt__k { font-family: var(--f-mono); font-size: 11.5px; color: var(--brass); flex: none; }
.inst__ft { padding: 16px 28px; border-top: 1px solid var(--rule); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-family: var(--f-mono); font-size: 11.5px; color: var(--slate-lt); }
.inst__back { background: none; border: 0; cursor: pointer; font-family: var(--f-mono); font-size: 11.5px; color: var(--moss); text-decoration: underline; padding: 0; }
.res__tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.res__h { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.2; margin: 9px 0 13px; }
.res__d { color: var(--slate); font-size: 15.5px; margin-bottom: 18px; max-width: 58ch; }
.res__cite { font-family: var(--f-mono); font-size: 11.5px; color: var(--slate-lt); border-top: 1px solid var(--rule-soft); padding-top: 14px; margin-top: 18px; }
.bar { height: 6px; background: var(--stock); margin: 18px 0 20px; overflow: hidden; }
.bar i { display: block; height: 6px; background: linear-gradient(90deg, var(--sage-dim), var(--brass)); transition: width .6s var(--ease-out); }

/* ---------- 17. Profile & gallery ---------- */
.prof { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: var(--s5); align-items: start; }
.prof__im { position: relative; border: 1px solid var(--rule); overflow: hidden; background: var(--stock); }
.prof__im img { width: 100%; height: auto; transition: transform 1.1s var(--ease-out); }
.prof__im:hover img { transform: scale(1.045); }
.cred { border-top: 1px solid var(--rule); margin-top: 24px; padding-top: 20px; display: grid; gap: 14px; }
.cred div { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 14px; font-size: 14.5px; }
.cred dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-lt); padding-top: 3px; }

.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gal figure { position: relative; overflow: hidden; background: var(--stock); }
.gal img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; transition: transform 1.1s var(--ease-out); }
.gal figure:hover img { transform: scale(1.06); }
.gal figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 20px 18px;
  background: linear-gradient(transparent, rgba(22,33,26,.9));
  color: var(--ivory); font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .13em; text-transform: uppercase;
  transform: translateY(8px); opacity: 0; transition: opacity .4s var(--ease), transform .4s var(--ease-out);
}
.gal figure:hover figcaption { opacity: 1; transform: none; }

/* ---------- 18. Quote ---------- */
.quote { position: relative; padding-left: 42px; }
.quote::before { content: "\201C"; position: absolute; left: -4px; top: -26px; font-family: var(--f-display); font-size: 5rem; color: var(--brass); opacity: .55; }
.quote p { font-family: var(--f-display); font-size: clamp(1.35rem,1.05rem+1.3vw,2rem); line-height: 1.38; }
.quote cite { display: block; margin-top: 22px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: var(--brass); }

/* ---------- 19. Forms ---------- */
.form { display: grid; gap: 19px; max-width: 580px; }
.fld { display: grid; gap: 7px; }
.fld label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.fld input, .fld select, .fld textarea {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  padding: 14px 16px; font-size: 16px; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.fld input:hover, .fld select:hover, .fld textarea:hover { border-color: var(--sage-dim); }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(169,188,150,.28); outline: none; }
.fld textarea { min-height: 138px; resize: vertical; line-height: 1.6; }
.fld__hint { font-size: 13px; color: var(--slate-lt); }
.fld--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.chk { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; cursor: pointer; padding: 11px 13px; border: 1px solid transparent; transition: background .2s var(--ease), border-color .2s var(--ease); }
.chk:hover { background: rgba(169,188,150,.12); border-color: var(--rule); }
.chk input { margin-top: 5px; accent-color: var(--moss); width: 16px; height: 16px; flex: none; }

/* ---------- 20. Footer ---------- */
.ftr { background: var(--forest); color: rgba(244,241,232,.68); padding-block: var(--s6) var(--s4); font-size: 14.5px; }
.ftr a { color: rgba(244,241,232,.68); transition: color .2s var(--ease); }
.ftr a:hover { color: var(--sage); }
.ftr__top { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: var(--s4); padding-bottom: var(--s5); border-bottom: 1px solid rgba(244,241,232,.16); }
.ftr__h { font-family: var(--f-mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--sage-dim); margin-bottom: 17px; }
.ftr__li li { margin-bottom: 9px; }
.ftr__bot { padding-top: var(--s3); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; font-family: var(--f-mono); font-size: 11.5px; color: rgba(244,241,232,.42); }
.ftr__bot a { color: rgba(244,241,232,.42); }
.ftr__disc { margin-top: var(--s3); font-size: 13px; line-height: 1.58; color: rgba(244,241,232,.42); max-width: 80ch; }
.ftr__badge { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 9px 14px; border: 1px solid rgba(244,241,232,.24); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--sage); }

/* ---------- 21. Page head ---------- */
.phead { position: relative; padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--rule); background: linear-gradient(175deg, var(--stock), var(--ivory) 62%); overflow: hidden; }
.crumb { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-lt); margin-bottom: 22px; }
.crumb a:hover { color: var(--brass); }
.crumb span { margin-inline: 8px; }

/* ---------- 22. Utility ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--f-mono); font-size: 11.5px; border: 1px solid var(--rule); padding: 7px 12px; color: var(--slate); background: var(--sheet); transition: border-color .2s, color .2s; }
.tag:hover { border-color: var(--brass); color: var(--moss); }
.mt1{margin-top:var(--s1)} .mt2{margin-top:var(--s2)} .mt3{margin-top:var(--s3)}
.mt4{margin-top:var(--s4)} .mt5{margin-top:var(--s5)} .mt6{margin-top:var(--s6)}
.mb2{margin-bottom:var(--s2)} .mb3{margin-bottom:var(--s3)}
.mb4{margin-bottom:var(--s4)} .mb5{margin-bottom:var(--s5)}

/* ---------- 23. Motion ---------- */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.rise.in { opacity: 1; transform: none; }
.rise[data-d="1"]{transition-delay:.08s} .rise[data-d="2"]{transition-delay:.16s}
.rise[data-d="3"]{transition-delay:.24s} .rise[data-d="4"]{transition-delay:.32s}

/* ---------- 24. RTL (Persian) ---------- */
[dir="rtl"] { font-family: "Vazirmatn", var(--f-body); }
[dir="rtl"] .bl li { padding-left: 0; padding-right: 28px; }
[dir="rtl"] .bl li::before { left: auto; right: 0; }
[dir="rtl"] .note { border-left: 0; border-right: 2px solid var(--sage-dim); }
[dir="rtl"] .d1, [dir="rtl"] .d2, [dir="rtl"] .d3, [dir="rtl"] .d4 { font-family: "Vazirmatn", var(--f-display); line-height: 1.5; }
[dir="rtl"] .doc, [dir="rtl"] .note, [dir="rtl"] .acc summary { text-align: right; }

/* ---------- 25. Responsive ---------- */
@media (max-width: 1100px) {
  :root { --rail: 152px; --gap: 38px; }
  .hero__in { grid-template-columns: minmax(0,1fr); gap: var(--s5); }
  .hero__fig { max-width: 300px; order: -1; }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .burger { display: flex; }
  .hdr__tel { display: none; }
  .grid { grid-template-columns: minmax(0,1fr); gap: var(--s3); }
  .rail { position: static; border-top: 0; border-left: 2px solid var(--brass); padding: 2px 0 2px 14px; }
  .section--ink .rail { border-left-color: var(--sage); }
  .rail__cite { display: inline-block; margin: 6px 16px 0 0; padding-left: 0; border-left: 0; }
  .prof { grid-template-columns: minmax(0,1fr); gap: var(--s3); }
  .prof__im { max-width: 340px; }
  .contact-grid { grid-template-columns: minmax(0,1fr) !important; gap: var(--s4) !important; }
  .ftr__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .hdr__cta .btn { display: none; }
  .hdr__in { min-height: 70px; }
  .brand__nm { font-size: 15px; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding-inline: 20px; }
  .section { padding-block: var(--s6); }
  .section--tight { padding-block: var(--s5); }
  .hero { padding-block: var(--s4) var(--s5); }
  .hero__fig { max-width: 226px; }
  .hero__in { gap: var(--s4); }
  .step { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 26px 22px; }
  .fld--2 { grid-template-columns: 1fr; }
  .ftr__top { grid-template-columns: 1fr; }
  .doc { padding: 26px 22px; }
  .inst__bd { padding: 26px 22px; }
  .inst__hd, .inst__ft { padding-inline: 22px; }
  .acc summary { padding: 19px 20px 19px 18px; flex-wrap: wrap; gap: 6px 14px; }
  .acc__c { padding: 0 20px 24px 18px; }
  .gal { grid-template-columns: 1fr 1fr; }
  .gal figure:last-child { display: none; }
  .quote { padding-left: 26px; }
  .hero__badge { right: 0; bottom: 2%; padding: 10px 13px; }
}
@media (max-width: 400px) { .brand__sub { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rise { opacity: 1; transform: none; }
  .hero__aur, .hero__ring, .ribbon__t { animation: none; }
}

@media print {
  .hdr, .ftr, .inst, .burger, .prog, .hero__leaves, .hero__aur, .ribbon { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 18pt; }
  .hero { background: #fff; color: #000; }
}
