/* ------------------------------------------------------------------
   Ahmed Soliman · studio site
   Warm paper, ink, one rust accent. Fraunces for display, Instrument Sans for text.
   ------------------------------------------------------------------ */

:root {
  --paper: #f6f0e4;
  --paper-2: #efe6d5;
  --blush: #f4e3d7;
  --ink: #1f1a15;
  --ink-2: #4b4237;
  --ink-3: #6a5e50;
  --rule: #d9cbb6;
  --rule-soft: #e7dccb;
  --accent: #b24627;
  --accent-ink: #8a3419;
  --accent-soft: #f0d4c8;
  --gold: #c2882a;
  --white: #fffdf9;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(31, 26, 21, .06), 0 18px 40px -24px rgba(31, 26, 21, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* paper grain, very light */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main, header, footer { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
.display em,
.swash {
  font-style: italic;
  font-weight: 350;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.swash::after {
  content: "";
  position: absolute;
  left: -.02em; right: -.02em; bottom: .02em;
  height: .09em;
  background: var(--accent);
  opacity: .32;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s var(--ease) .35s;
}
.is-visible .swash::after, .swash.is-visible::after { transform: scaleX(1); }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 50;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 .4em;
}
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 36em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: var(--accent-ink); margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; line-height: 1;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.btn::after { content: "→"; transition: transform .25s var(--ease); }
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn:hover::after { transform: translateX(3px); }
.btn--small { padding: 10px 16px; font-size: .9rem; }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--white); color: var(--accent-ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none; color: var(--accent-ink);
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
  transition: border-color .25s var(--ease);
}
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: var(--accent); }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow--quiet { color: var(--ink-2); }
.link-arrow--quiet:hover { color: var(--accent-ink); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.top.is-stuck { border-bottom-color: var(--rule-soft); }
.top__row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand__mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9694a, var(--accent) 60%, var(--accent-ink));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.brand__name { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; font-variation-settings: "opsz" 24, "SOFT" 50; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.nav a:not(.btn) { text-decoration: none; font-size: .95rem; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--accent-ink); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 1.8rem 0 2.2rem; }
.hero__facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 0;
  color: var(--ink-3); font-size: .92rem;
}
.hero__facts li { display: inline-flex; align-items: center; }
.hero__facts li + li::before { content: "·"; margin: 0 10px; color: var(--rule); }

/* compare slider */
.compare { margin: 0; }
.compare__stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--rule-soft); background: var(--white);
  user-select: none; -webkit-user-select: none;
  transform: rotate(-1.2deg);
  transition: transform .6s var(--ease);
}
.compare__stage:hover, .compare__stage:focus-within { transform: rotate(0deg); }
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__before .compare__img { filter: saturate(.85); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; background: var(--paper); transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(31,26,21,.25);
}
.compare__handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 6px 18px -6px rgba(31,26,21,.5);
}
.compare__handle span::before, .compare__handle span::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px;
  border-top: 2px solid var(--ink); border-left: 2px solid var(--ink);
}
.compare__handle span::before { left: 13px; transform: translateY(-50%) rotate(-45deg); }
.compare__handle span::after { right: 13px; transform: translateY(-50%) rotate(135deg); }
.compare__label {
  position: absolute; top: 12px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 6px; background: rgba(31,26,21,.78); color: var(--paper); pointer-events: none;
}
.compare__label--before { left: 12px; }
.compare__label--after { right: 12px; background: var(--accent); }
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.compare__range:focus-visible { opacity: 1; outline: none; background: transparent; }
.compare__range:focus-visible ~ .compare__handle, .compare__range:focus-visible + * { outline: none; }
.compare__stage:has(.compare__range:focus-visible) { box-shadow: var(--shadow), 0 0 0 3px var(--accent); }
.compare figcaption { font-size: .9rem; color: var(--ink-3); margin-top: 14px; text-align: center; }

/* ---------- bands & sections ---------- */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band--blush { background: var(--blush); }
.band--paper2 { background: var(--paper-2); }
.band + .band { border-top: 1px solid var(--rule-soft); }
.band--blush + .band, .band + .band--blush, .band--paper2 + .band, .band + .band--paper2 { border-top: 0; }

.section-head { max-width: 40em; margin-bottom: clamp(36px, 5vw, 64px); position: relative; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
.num {
  display: block; font-family: var(--serif); font-style: italic; font-weight: 300;
  font-variation-settings: "opsz" 72, "SOFT" 50;
  font-size: 1.1rem; color: var(--accent); letter-spacing: .02em; margin-bottom: .6rem;
}
.num::after { content: ""; display: inline-block; width: 40px; height: 1px; background: var(--rule); margin-left: 10px; vertical-align: middle; }

/* questions */
.questions {
  list-style: none; margin: 0; padding: 0; counter-reset: q;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px);
}
@media (max-width: 820px) { .questions { grid-template-columns: 1fr; } }
.questions li {
  counter-increment: q; position: relative;
  padding: 28px 0 0; border-top: 1px solid var(--ink);
}
.questions li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute; top: -.7em; left: 0; background: var(--blush); padding-right: 10px;
  font-family: var(--serif); font-style: italic; color: var(--ink-3); font-size: .95rem;
}
.questions__q {
  display: block; font-family: var(--serif); font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 50;
  font-size: 1.55rem; line-height: 1.15; margin-bottom: .6em; text-wrap: balance;
}
.questions p { color: var(--ink-2); margin: 0; }

/* review */
.review__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .review__grid { grid-template-columns: 1fr; } }
.review__copy .section-head { margin-bottom: 28px; }

.checklist {
  background: var(--white); border: 1px solid var(--rule-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px 8px 10px;
  position: relative;
}
.checklist::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: var(--radius) var(--radius) 0 0;
}
.checklist__head { padding: 22px 18px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.checklist__head h3 { margin: 0; font-size: 1.35rem; }
.checklist__kicker { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); order: 2; }
.check { border-top: 1px solid var(--rule-soft); }
.check summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; font-weight: 600; line-height: 1.35;
  transition: background .2s var(--ease);
}
.check summary::-webkit-details-marker { display: none; }
.check summary:hover { background: var(--paper); }
.check summary::after {
  content: "+"; margin-left: auto; font-family: var(--serif); font-size: 1.35rem; font-weight: 300; color: var(--ink-3);
  transition: transform .3s var(--ease);
}
.check[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.check__i {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: .78rem; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft);
}
.check[open] .check__i { background: var(--accent); color: var(--paper); }
.check p { margin: 0; padding: 0 18px 16px 58px; color: var(--ink-2); font-size: .97rem; }

/* projects */
.project {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 5vw, 64px) 0;
}
.project + .project { border-top: 1px solid var(--rule); }
.project--flip .project__media { order: 2; }
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; }
  .project--flip .project__media { order: 0; }
}
.project__media { text-decoration: none; display: block; perspective: 1200px; }
.frame {
  display: block; position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--rule-soft); background: var(--white); box-shadow: var(--shadow);
  padding-top: 28px;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
  transform-style: preserve-3d;
}
.frame::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 28px;
  background: var(--paper-2); border-bottom: 1px solid var(--rule-soft);
}
.frame::after {
  content: ""; position: absolute; top: 10px; left: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule);
  box-shadow: 14px 0 0 var(--rule), 28px 0 0 var(--rule);
}
.project__media:hover .frame { transform: translateY(-6px) rotateX(1.5deg); box-shadow: 0 1px 0 rgba(31,26,21,.06), 0 32px 60px -28px rgba(31,26,21,.45); }
.project__kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); margin-bottom: .8rem; }
.project__body h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.project__body > p:not(.project__kicker):not(.project__links) { color: var(--ink-2); }
.tags { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); background: color-mix(in srgb, var(--white) 60%, transparent); }
.project__links { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; }

/* steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px);
  position: relative;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { position: relative; padding-top: 22px; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--rule); }
.steps li::after {
  content: ""; position: absolute; top: 0; left: 0; height: 1px; width: 0; background: var(--accent);
  transition: width 1.1s var(--ease) .15s;
}
.steps li.is-visible::after { width: 100%; }
.steps__n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--paper); background: var(--ink);
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.note {
  margin-top: clamp(32px, 5vw, 56px); padding: 18px 22px; border-left: 3px solid var(--accent);
  background: var(--blush); border-radius: 0 10px 10px 0; color: var(--ink-2); max-width: 44em;
}
.note strong { color: var(--ink); }

/* tools (secondary offer) */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
@media (max-width: 760px) { .tools { grid-template-columns: 1fr; } }
.tool {
  display: grid; grid-template-rows: auto 1fr; text-decoration: none;
  background: var(--white); border: 1px solid var(--rule-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tool:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(31,26,21,.06), 0 28px 50px -26px rgba(31,26,21,.45); }
.tool__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--rule-soft); background: var(--paper-2); }
.tool__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tool__body { display: grid; gap: 6px; padding: 20px 22px 24px; color: var(--ink-2); font-size: .97rem; }
.tool__kicker { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); }
.tool__body strong { font-family: var(--serif); font-weight: 500; font-variation-settings: "opsz" 36, "SOFT" 50; font-size: 1.35rem; color: var(--ink); }
.tool:hover .tool__body strong { color: var(--accent-ink); }

/* about */
.about { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.about__photo { width: 220px; border-radius: 50% 50% 50% 14px; box-shadow: var(--shadow); border: 4px solid var(--white); }
.about__body .section-head { margin-bottom: 1.2rem; }
.about__body p { color: var(--ink-2); max-width: 40em; }
.about__links { display: flex; gap: 26px; margin-top: 1.4rem; }

/* contact */
.contact { background: var(--ink); color: var(--paper); padding: clamp(80px, 11vw, 150px) 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  right: -30vmax; top: -20vmax;
  background: radial-gradient(circle, rgba(178,70,39,.45), transparent 62%);
  pointer-events: none;
}
.contact__inner { position: relative; max-width: 42em; }
.contact .display em, .contact .swash { color: #e8a98f; }
.contact .swash::after { background: #e8a98f; }
.contact .lede { color: #cfc3b3; }
.contact__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 1.6rem; }
.contact__alt { color: #cfc3b3; text-decoration-color: rgba(207,195,179,.4); }
.contact__alt:hover { color: var(--paper); }
.contact__email { margin-top: 2rem; font-size: .95rem; color: #a99c8a; }
.contact__email a { color: inherit; }

/* footer */
.foot { background: var(--ink); color: #a99c8a; border-top: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--paper); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .swash::after { transform: none; transition: none; }
  .steps li::after { width: 100%; transition: none; }
  .compare__stage { transform: none; }
  .btn, .link-arrow, .frame { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

