/* ==========================================================================
   Hassan Hamid — styles.css
   Editorial · classic · digital gallery · personal legacy.
   Values are carried over from the approved build; only accessibility,
   mobile navigation and image handling have been added.
   ========================================================================== */

:root {
  --bg: #f1ede6;
  --paper: #faf8f3;
  --ink: #191714;
  --muted: #6b645b;          /* slightly deepened from #766f66 for AA contrast */
  --dark: #171513;
  --dark2: #211e1a;
  --gold: #b39a68;           /* gold on dark backgrounds */
  --gold-ink: #86703f;       /* gold for small text on ivory backgrounds */
  --gold-soft: #d0bd94;
  --line: rgba(25, 23, 20, .16);
  --lightline: rgba(255, 255, 255, .14);
  --header-h: 76px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
picture { display: contents; }
body.menu-open { overflow: hidden; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--dark);
  padding: 10px 16px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.section :focus-visible, .contact :focus-visible, .legacy :focus-visible { outline-color: var(--gold-ink); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 5vw;
  background: rgba(23, 21, 19, .93);
  color: #f8f4ec;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; gap: 12px; align-items: center; font-size: 12px; letter-spacing: .18em; font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border: 1px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 11px; letter-spacing: 0; color: var(--gold);
}
.nav { display: flex; gap: 25px; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.nav a { opacity: .78; transition: opacity .2s, color .2s; }
.nav a:hover, .nav a:focus-visible { opacity: 1; color: #d7c59e; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  background: none; border: 1px solid rgba(255, 255, 255, .35); color: #fff;
  padding: 8px 11px; font: inherit; font-size: 10px; letter-spacing: .12em; cursor: pointer;
}
.lang:hover { border-color: var(--gold); color: #d7c59e; }

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  width: 40px; height: 34px; padding: 0;
  background: none; border: 1px solid rgba(255, 255, 255, .35); cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1px; background: #f8f4ec;
  transition: transform .3s ease, top .3s ease;
}
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 16px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  background: var(--dark); color: #f8f4ec;
  display: grid; grid-template-columns: 1.02fr .98fr; align-items: center;
  padding: 130px 8vw 70px; gap: 7vw;
}
.eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.hero h1 { font: 400 clamp(48px, 6.1vw, 92px)/.98 var(--serif); margin: 24px 0 28px; letter-spacing: -.045em; }
.hero h1 em { color: var(--gold-soft); font-style: italic; }
.hero-lead { max-width: 560px; color: #c5beb5; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 35px; }
.btn {
  display: inline-block; padding: 13px 19px; font-size: 11px; letter-spacing: .13em;
  text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .3);
  transition: background .25s, color .25s, border-color .25s;
}
.btn-primary { background: #eee6d7; color: #1b1815; border-color: #eee6d7; }
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-ghost { color: #eee6d7; }
.btn-ghost:hover { border-color: var(--gold); color: #d7c59e; }

.hero-portrait { justify-self: end; width: min(510px, 100%); margin: 0; }
.portrait-frame { position: relative; border: 1px solid rgba(255, 255, 255, .18); padding: 12px; }
.portrait-frame img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%;
  filter: saturate(.8) contrast(1.02); background: var(--dark2);
}
.portrait-caption {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  padding: 15px 17px; display: flex; justify-content: space-between; gap: 12px;
  background: rgba(20, 18, 16, .82);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Sections (shared) ---------- */
.section { padding: 115px 8vw; }
.section-dark { background: var(--dark); color: #f5f0e8; padding: 115px 8vw; }
.section-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 42px; }
.section-dark .section-label { color: var(--gold); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 55px; }
.section-heading h2, .statement h2, .reflection h2, .store h2, .contact h2 {
  font: 400 clamp(38px, 4.7vw, 68px)/1.02 var(--serif); letter-spacing: -.035em; margin: 0;
}
.section-heading p { max-width: 430px; color: var(--muted); margin: 0; }
.section-dark .section-heading p { color: #bdb5aa; }
.statement-grid, .reflection-grid, .store-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; }
.statement p, .reflection p, .store p { color: #bdb5aa; max-width: 580px; font-size: 17px; }
.small-note { border-left: 1px solid var(--gold); padding-left: 20px; font-size: 13px !important; }

/* ---------- Journey / timeline ---------- */
.timeline { border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 35px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.timeline-item .year { font-size: 10px; letter-spacing: .18em; color: var(--gold-ink); padding-top: 5px; }
.timeline-item h3 { font: 400 28px var(--serif); margin: 0 0 4px; }
.timeline-item p { margin: 0; color: var(--muted); max-width: 700px; }
.timeline-item.current { background: rgba(179, 154, 104, .08); padding-left: 18px; padding-right: 18px; }

/* ---------- Creative process ---------- */
.process-line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px;
  border-top: 1px solid var(--lightline); border-bottom: 1px solid var(--lightline);
  padding: 35px 10px; margin: 0; list-style: none;
  color: #eee6d8; font: 400 clamp(16px, 2vw, 25px) var(--serif);
}
.process-line i { color: var(--gold); font-style: normal; }

/* ---------- Works ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.work-card { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 210px; transition: background .25s; }
.work-card:hover { background: #e9e3d9; }
.work-card.featured { background: #ded4c2; }
.work-card > span { font-size: 10px; color: var(--gold-ink); letter-spacing: .15em; }
.work-card h3 { font: 400 26px/1.08 var(--serif); margin: 26px 0 12px; }
.work-card p { font-size: 13px; color: var(--muted); margin: 0; }
.work-card.featured p { color: #5a534a; }
/* Optional link inside a work card, for when a project page/product exists */
.work-card .work-link { display: inline-block; margin-top: 16px; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; border-bottom: 1px solid var(--gold); }

/* ---------- Reflections ---------- */
.notice { margin-top: 25px; border: 1px solid var(--lightline); padding: 20px; color: #bdb5aa; font-size: 13px; }

/* ---------- Gallery ---------- */
.gallery-placeholder { display: grid; grid-template-columns: 1.3fr .7fr .7fr; grid-template-rows: 260px 260px; gap: 10px; }
.gallery-tile { background: #25211d; color: #f3eee6; padding: 25px; position: relative; overflow: hidden; margin: 0; }
.gallery-tile h3 { font: 400 clamp(22px, 2.1vw, 30px)/1.1 var(--serif); margin: 0; overflow-wrap: anywhere; }
.gallery-tile p { font-size: 12px; color: #aaa198; }
.portrait-tile { grid-row: span 2; padding: 0; }
.portrait-tile img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: center 35%; filter: grayscale(.18); opacity: .8; }
.portrait-tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 22px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  font-size: 10px; letter-spacing: .16em;
}
.tile-number { font-size: 10px; color: var(--gold); margin-bottom: 80px; }

.image-tile { padding: 0; min-height: 260px; }
.image-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: saturate(.85); }
.image-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 22px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86));
  display: flex; flex-direction: column; gap: 5px;
}
.image-overlay small { font-size: 9px; letter-spacing: .18em; color: var(--gold-soft); }
.image-overlay strong { font: 400 25px var(--serif); color: #fff; }

/* ---------- Store ---------- */
.store-list { border-top: 1px solid var(--lightline); margin: 0; }
.store-list div { padding: 22px 0; border-bottom: 1px solid var(--lightline); }
.store-list dt { display: block; color: var(--gold); font-size: 10px; letter-spacing: .18em; margin-bottom: 5px; font-weight: 700; }
.store-list dd { margin: 0; color: #c5beb5; font-size: 14px; }

/* Store-ready: product cards (not rendered until products are added — see README) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 60px; }
.product-grid:empty { display: none; }
.product-card { border: 1px solid var(--lightline); background: var(--dark2); display: flex; flex-direction: column; }
.product-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product-card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.product-card-body small { font-size: 9px; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; }
.product-card-body h3 { font: 400 22px/1.15 var(--serif); margin: 0; }
.product-card-body p { font-size: 13px; color: #bdb5aa; margin: 0; }
.product-card-body a { margin-top: 10px; align-self: flex-start; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; border-bottom: 1px solid var(--gold); }

/* ---------- Legacy ---------- */
.legacy { background: #d7c6a4; padding: 125px 8vw; text-align: center; }
.legacy .eyebrow { color: #6e5a30; }
.legacy-inner { max-width: 950px; margin: auto; }
.legacy h2 { font: 400 clamp(42px, 6vw, 78px)/1 var(--serif); letter-spacing: -.045em; margin: 25px 0; }
.legacy p { max-width: 650px; margin: 0 auto; color: #4f473d; }
.legacy-quote { font: italic 25px/1.35 var(--serif); max-width: 800px; margin: 45px auto 0; color: #332e28; }

/* ---------- Contact ---------- */
.contact p { color: var(--muted); max-width: 520px; }
.contact-card { border: 1px solid var(--line); padding: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; font-style: normal; }
.contact-card span { font-size: 10px; letter-spacing: .18em; color: var(--gold-ink); }
.contact-card a { font: 400 26px var(--serif); word-break: break-word; border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact-card a:hover { border-color: var(--gold); }

/* ---------- Footer ---------- */
.footer { background: #11100f; color: #b9b1a6; padding: 25px 8vw; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; letter-spacing: .08em; }
.footer strong { color: #f2ece1; margin-right: 15px; }

/* ---------- Reveal animation ----------
   Only hidden when JS is running (html.js), so content is never lost. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ==========================================================================
   Tablet & below
   ========================================================================== */
@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: block; }
  .nav {
    /* The header's backdrop-filter makes it the containing block, so size explicitly */
    position: fixed; top: var(--header-h); left: 0; right: 0;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; gap: 0;
    padding: 30px 6vw 40px;
    background: var(--dark);
    font: 400 30px/1.2 var(--serif); text-transform: none; letter-spacing: -.01em;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .3s ease; }
  .nav a { opacity: 1; padding: 16px 0; border-bottom: 1px solid var(--lightline); }

  .hero { grid-template-columns: 1fr; padding: 120px 6vw 60px; gap: 45px; }
  .hero-portrait { justify-self: start; max-width: 520px; }
  .section, .section-dark { padding: 85px 6vw; }
  .legacy { padding: 95px 6vw; }
  .statement-grid, .reflection-grid, .store-grid, .contact-grid { grid-template-columns: 1fr; gap: 35px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 18px; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .gallery-placeholder { grid-template-columns: 1fr 1fr; grid-template-rows: 420px 220px 220px; }
  .portrait-tile { grid-column: span 2; grid-row: auto; }
  .image-tile { min-height: 220px; }
  .footer { padding: 22px 6vw; display: block; }
  .footer div + div { margin-top: 8px; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 560px) {
  .site-header { padding: 0 16px; }
  .hero { padding: 108px 16px 56px; }
  .section, .section-dark, .legacy { padding: 72px 16px; }
  .footer { padding: 22px 16px; }
  .hero h1 { font-size: 46px; }
  .hero-lead { font-size: 15px; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 0; padding: 26px 22px; }
  .work-card h3 { margin-top: 18px; }
  .gallery-placeholder { display: block; }
  .gallery-tile { min-height: 210px; margin-bottom: 10px; }
  .portrait-tile { height: 440px; }
  .image-tile { height: 380px; }
  .process-line { gap: 10px; font-size: 16px; }
  .timeline-item { grid-template-columns: 85px 1fr; gap: 12px; }
  .timeline-item h3 { font-size: 23px; }
  .legacy-quote { font-size: 21px; }
  .contact-card a { font-size: 22px; }
}

@media (max-width: 360px) {
  .brand > span:last-child { display: none; }
  .hero h1 { font-size: 40px; }
}
