/* =========================================================
   Hakan Fine Art
   Ultra-minimal, editorial, gallery-like.
   Playfair Display + Inter. Ivory / Charcoal / Muted Gold.
   ========================================================= */

:root {
  --wall:      #FAF8F4;
  --wall-deep: #F0ECE6;
  --paper:     #FFFFFF;

  --navy:      #102C45;
  --ink:       #1a1a1a;
  --ink-soft:  #555555;
  --ink-faint: #999999;

  --line:      #E5E0D8;
  --line-soft: #EEEAE4;

  --gold:      #B8963E;
  --gold-dark: #9A7B2E;
  --gold-light:#D4C18A;

  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --shadow-hang: 0 2px 2px rgba(20,18,14,.03), 0 14px 36px -20px rgba(20,18,14,.3);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--wall); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.7; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--gold); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 11vw, 140px); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: .8em; margin: 0;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); flex: none; }
.eyebrow--plain::before { display: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); margin: 0; line-height: 1.08; }
.display-xl { font-size: clamp(2.6rem, 7.5vw, 5.4rem); letter-spacing: -.025em; }
.display-l  { font-size: clamp(2rem, 4.8vw, 3.6rem); letter-spacing: -.015em; }
.display-m  { font-size: clamp(1.5rem, 2.8vw, 2.3rem); letter-spacing: -.01em; }
.display-s  { font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: -.005em; }
.lede { font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--ink-soft); max-width: 44ch; }
.muted { color: var(--ink-soft); }
.serif-italic { font-family: var(--display); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--sans); font-weight: 600; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 30px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn--white { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(4px); }
.btn--white:hover { background: var(--gold); border-color: var(--gold); }
.btn--block { width: 100%; justify-content: center; }

.tlink {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); position: relative; padding-bottom: 3px;
}
.tlink::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.tlink .arrow { transition: transform .3s var(--ease); }
.tlink:hover::after { transform: scaleX(1); transform-origin: left; }
.tlink:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: center; height: 90px; gap: 16px; position: relative; }
.brand { display: inline-flex; align-items: center; line-height: 1; }
.brand img { height: 80px; width: auto; display: block; }
.nav-toggle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; background: transparent;
  border: 1px solid rgba(255,255,255,.2); align-items: center;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--paper); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-links {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--navy); border-top: 1px solid rgba(255,255,255,.08);
  flex-direction: column; align-items: flex-start; gap: 0;
  padding: 16px var(--gutter) 40px; overflow-y: auto;
  max-height: calc(100vh - 90px);
  display: flex;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
  z-index: 100;
}
.nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
.nav-links a {
  width: 100%; padding: 13px 0; font-size: 14px;
  color: rgba(255,255,255,.6); letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color .3s var(--ease);
}
.nav-links a::after { display: none; }
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] { color: var(--gold); }

/* ---------- Wall label ---------- */
.label {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px;
  align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line);
}
.label .cat {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; color: var(--gold); white-space: nowrap; padding-top: 3px;
}
.label .meta { min-width: 0; }
.label .title { display: block; font-family: var(--display); font-size: 1.2rem; line-height: 1.15; }
.label .title em { font-style: italic; }
.label .by { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.label .by b { color: var(--ink); font-weight: 600; }

/* ---------- Hang ---------- */
.hang { position: relative; }
.hang .art {
  background: var(--paper); padding: clamp(8px, 1.4vw, 18px);
  border: 1px solid var(--line); box-shadow: var(--shadow-hang);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.hang .art svg, .hang .art img { width: 100%; height: auto; }
.hang .art .canvas { display: block; width: 100%; height: auto; }

/* ---------- Gallery grid ---------- */
.gallery { columns: 3; column-gap: clamp(24px, 3.5vw, 48px); }
.gallery .piece { break-inside: avoid; margin-bottom: clamp(36px, 5vw, 68px); }
.gallery .piece a { display: block; }
.gallery .piece .art {
  background: var(--paper); padding: clamp(8px, 1.2vw, 14px);
  border: 1px solid var(--line); box-shadow: var(--shadow-hang);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.gallery .piece a:hover .art { transform: translateY(-5px); box-shadow: 0 4px 6px rgba(20,18,14,.04), 0 30px 50px -24px rgba(20,18,14,.45); }
.gallery .piece .label { transition: border-color .4s var(--ease); }
.gallery .piece a:hover .label { border-color: var(--gold); }
.gallery .piece .view {
  margin-top: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  display: inline-flex; gap: .5em; align-items: center;
  opacity: 0; transform: translateY(2px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.gallery .piece a:hover .view { opacity: 1; transform: none; }

/* Gallery category filter */
.gallery-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.gallery-filters button {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 18px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; transition: all .25s var(--ease);
}
.gallery-filters button:hover { border-color: var(--ink); color: var(--ink); }
.gallery-filters button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 980px) { .gallery { columns: 2; } }
@media (max-width: 620px) { .gallery { columns: 1; } }

/* ---------- Full-screen hero ---------- */
.hero-full {
  min-height: 100vh; display: flex; align-items: center; justify-content: flex-start;
  text-align: left; position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper);
}
.hero-full-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .35; transition: opacity 1s var(--ease);
  object-fit: cover; width: 100%; height: 100%;
}
.hero-full-content { position: relative; z-index: 1; max-width: 520px; min-width: 0; padding: 40px var(--gutter); padding-left: clamp(32px,8vw,120px); }
.hero-full h1 { color: var(--paper); font-size: 38px; line-height: 1.15; }
.hero-full .eyebrow { justify-content: flex-start; }
.hero-full .lede { color: rgba(255,255,255,.6); margin: 20px 0 0; }
.hero-full .hero-actions { display: flex; gap: 14px; justify-content: flex-start; margin-top: 36px; flex-wrap: wrap; }
.hero-full .hero-actions .btn { min-width: 280px; justify-content: center; }
@media(max-width:640px) { .hero-full h1 { font-size: clamp(1.6rem,7vw,2.4rem); } }

/* ---------- Dark sections ---------- */
.dark-section { background: var(--navy); color: var(--paper); padding-block: clamp(64px, 10vw, 128px); }
.dark-section h2, .dark-section h3 { color: var(--paper); }
.dark-section .muted { color: rgba(255,255,255,.5); }
.dark-section .eyebrow { color: var(--gold); }
.dark-section .eyebrow::before { background: var(--gold); }

/* ---------- Newsletter band ---------- */
.newsletter-band {
  background: var(--wall-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 72px);
}
.newsletter-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.newsletter-inner h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.newsletter-inner p { color: var(--ink-soft); margin: 8px 0 0; max-width: 38ch; font-size: 14.5px; }
.newsletter-form { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.nl-fields { display: flex; flex: 1; gap: 0; min-width: 0; flex-wrap: wrap; }
.nl-fields input {
  flex: 1; font: inherit; font-size: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-right: none; background: var(--paper); color: var(--ink);
  outline: none; min-width: 0;
}
.nl-fields input::placeholder { color: var(--ink-faint); }
.nl-fields input:focus { border-color: var(--gold); z-index: 1; position: relative; }
.nl-captcha { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-right: none; background: var(--paper); font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.nl-captcha input { border: none !important; padding: 12px 4px !important; }
.newsletter-form button {
  background: var(--gold); color: #fff; border: 1px solid var(--gold);
  padding: 12px 22px; font-weight: 700; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; white-space: nowrap; transition: background .3s var(--ease);
}
.newsletter-form button:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.newsletter-msg { font-size: 13px; margin-top: 8px; min-height: 18px; }
.newsletter-msg.ok { color: var(--gold-dark); }
.newsletter-msg.err { color: #a44; }
@media (max-width: 980px) {
  .newsletter-inner { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .nl-fields { flex-direction: column; }
  .nl-fields input { border-right: 1px solid var(--line); border-bottom: none; }
  .nl-captcha { border-right: 1px solid var(--line); border-bottom: none; }
}

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: #8a9aab; }
.site-foot a { color: #8a9aab; }
.foot-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px;
  padding-block: clamp(52px, 7vw, 80px);
}
.site-foot .brand img { height: 90px; }
.foot-col h4 {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 16px;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-col a { font-size: 13.5px; transition: color .3s var(--ease); }
.foot-col a:hover { color: var(--paper); }
.foot-col p { font-size: 13.5px; margin: 0 0 9px; line-height: 1.55; }
.foot-bar {
  border-top: 1px solid rgba(255,255,255,.07); padding-block: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: #6a7d8f;
}
.foot-legal { color: #4a6070; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Process steps ---------- */
.process-steps { display: grid; gap: 0; counter-reset: step; }
.process-step {
  display: grid; grid-template-columns: 60px 1fr; gap: 24px; align-items: start;
  padding: 32px 0; border-bottom: 1px solid var(--line);
  counter-increment: step;
}
.process-step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--display); font-size: 2.4rem; font-weight: 400;
  color: var(--gold); line-height: 1; padding-top: 4px;
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.process-step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.process-step p { color: var(--ink-soft); margin: 0; max-width: 52ch; font-size: 15px; }

/* ---------- Pillar cards ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); }
.pillar {
  padding: 32px 24px; border: 1px solid var(--line); background: var(--paper);
  transition: border-color .3s var(--ease);
}
.pillar:hover { border-color: var(--gold); }
.pillar h3 { font-size: 1.1rem; margin-bottom: 12px; }
.pillar p { color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.6; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Exhibition cards ---------- */
.exhibition-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: clamp(20px, 3vw, 32px); }
.exhibition-card {
  background: var(--paper); border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.exhibition-card:hover { border-color: var(--gold); box-shadow: var(--shadow-hang); }
.exhibition-card-img { aspect-ratio: 16/10; background: var(--wall-deep); overflow: hidden; }
.exhibition-card-img img { width: 100%; height: 100%; object-fit: cover; }
.exhibition-card-body { padding: 20px 22px 24px; }
.exhibition-card-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.exhibition-card-body .meta { font-size: 13px; color: var(--ink-faint); }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: clamp(20px, 3vw, 32px); }
.news-card {
  background: var(--paper); border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.news-card:hover { border-color: var(--gold); box-shadow: var(--shadow-hang); }
.news-card-img { aspect-ratio: 16/9; background: var(--wall-deep); overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px 22px 24px; }
.news-card .category-badge {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px; display: block;
}
.news-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.3; }
.news-card-body .excerpt { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.news-card-body .date { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

/* ---------- Article page ---------- */
.article-hero { aspect-ratio: 21/9; max-height: 500px; overflow: hidden; background: var(--wall-deep); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 680px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter); }
.article-body h1 { margin-bottom: 16px; }
.article-body .article-meta { font-size: 13px; color: var(--ink-faint); margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-body .article-content { font-size: 17px; line-height: 1.8; }
.article-body .article-content p { margin: 0 0 24px; color: var(--ink-soft); }
.article-body .article-content h2 { font-size: 1.5rem; margin: 48px 0 16px; }
.article-body .article-content img { margin: 32px 0; width: 100%; }

/* (hamburger nav is now always active - styles are in the Header section above) */

@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Allow long strings (emails, URLs) to wrap on narrow screens. */
body { overflow-wrap: break-word; }
a[href^="mailto:"], a[href^="tel:"], a[href^="http"] { overflow-wrap: anywhere; word-break: break-word; }

img, svg, video, iframe, table { max-width: 100%; }

/* Compact category filters on phones. */
@media (max-width: 620px) {
  .gallery-filters button,
  .cat-nav button { font-size: 10px; padding: 7px 11px; letter-spacing: .06em; margin-right: 4px; margin-bottom: 4px; }
  .cat-subs button { font-size: 10px; padding: 4px 9px; }
  .cat-nav { margin-bottom: 26px !important; }
}

/* Prevent horizontal scrolling; clip (not hidden) keeps position: sticky working. */
@media (max-width: 900px) {
  html { overflow-x: clip; }
}
