/* Haji Furniture — minimal site styles */
:root {
  --ink: #15130f;
  --paper: #f5f0e8;
  --muted: #7a7166;
  --line: rgba(21, 19, 15, 0.12);
  --brass: #a8834c;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: block; line-height: 0; }
.logo img { height: 42px; width: auto; }
.nav { display: flex; gap: clamp(20px, 4vw, 36px); }
.nav a { text-decoration: none; font: 500 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Intro: logo sting ----------
   Only rendered when <html> has .play-intro (decided in the <head> of index.html).
   main.js walks it through: doors -> wardrobes -> kitchens -> logo -> lift. */
.intro { display: none; }
.play-intro { overflow: hidden; }
.play-intro .intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--ink); color: var(--paper); cursor: pointer;
  animation: intro-failsafe 0s 28s forwards; } /* never trap the page if the script fails */
@keyframes intro-failsafe { to { visibility: hidden; } }
.intro.is-lifting { transform: translateY(-100%); transition: transform 3.15s cubic-bezier(.76,0,.24,1); }
.intro::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brass); opacity: 0; transition: opacity 0.6s; }
.intro.is-lifting::after { opacity: 1; }

.intro__stack { position: relative; display: flex; flex-direction: column; align-items: center; }
.intro__sketch { width: clamp(180px, 24vw, 270px); height: auto; overflow: visible; }
.intro__sketch path { fill: none; stroke: var(--brass); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.sk.draw path { stroke-dashoffset: 0; transition: stroke-dashoffset 3s cubic-bezier(.65,0,.35,1) calc(var(--i) * 0.24s); }
.sk.erase path { stroke-dashoffset: -1; transition: stroke-dashoffset 1.65s cubic-bezier(.65,0,.35,1) calc(var(--i) * 0.12s); }

.intro__words { display: flex; flex-direction: column; align-items: center; margin-top: clamp(28px, 4vh, 44px); transition: opacity 1.5s, transform 1.8s cubic-bezier(.2,.7,.2,1); }
.intro__lead { font: 500 11px/1 var(--sans); letter-spacing: .4em; padding-left: .4em; text-transform: uppercase; color: rgba(245,240,232,.55); opacity: 0; transition: opacity 2.4s; }
.intro__slot { display: grid; overflow: hidden; margin-top: 10px; padding: 0 .1em .08em; }
.intro__slot i { grid-area: 1 / 1; justify-self: center; font: italic 400 clamp(44px, 7vw, 84px)/1.1 var(--serif); color: var(--paper);
  transform: translateY(110%); transition: transform 2.25s cubic-bezier(.7,0,.2,1); }
.intro__slot i.on { transform: none; }
.intro__slot i.off { transform: translateY(-110%); }
.intro.s-words .intro__lead { opacity: 1; }
.intro.s-logo .intro__words { opacity: 0; transform: translateY(12px); }

.intro__logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(240px, 38vw, 480px); pointer-events: none; }
.intro__logo img { display: block; width: 100%; max-width: none; height: auto; opacity: 0; transform: translateY(14px); transition: opacity 3s cubic-bezier(.2,.8,.2,1), transform 3.3s cubic-bezier(.2,.8,.2,1); }
.intro.s-logo .intro__logo img { opacity: 1; transform: none; }

/* a measuring-tape progress line along the bottom */
.intro__ruler { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; clip-path: inset(0 100% 0 0);
  background: repeating-linear-gradient(90deg, rgba(168,131,76,.7) 0 1px, transparent 1px 10px); }
.intro.s-run .intro__ruler { clip-path: inset(0 0 0 0); transition: clip-path var(--run, 4.6s) linear; }

/* ---------- Home ---------- */
.eyebrow { font: 600 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin-bottom: 20px; }
em { font-style: italic; }

.hero { padding: clamp(120px, 17vh, 160px) 0 clamp(80px, 12vh, 124px); }
.hero h1 { font-size: clamp(46px, min(8vw, 13vh), 124px); line-height: 1.02; max-width: 13ch; }

/* Hero rises in as the intro lifts (or straight away when there is no intro) */
.js .rise { opacity: 0; transform: translateY(28px); transition: opacity 1s calc(var(--d) * .12s), transform 1.2s cubic-bezier(.2,.7,.2,1) calc(var(--d) * .12s); }
.js .page-in .rise, .page-in .rise { opacity: 1; transform: none; }

/* The three things we make. Each image opens from its outer edge towards the text:
   left-hand images wipe in left to right, right-hand images right to left. */
.makes { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) clamp(80px, 12vw, 160px); display: grid; gap: clamp(72px, 12vw, 160px); }
.make { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 24px; }
.make__media { grid-column: 1 / 8; overflow: hidden; background: #e4dccd; }
.make__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
/* the door photo is shown whole, at its own proportions, on every screen size */
.make--doors .make__media img { aspect-ratio: 1 / 1; object-fit: contain; }
.make__text { grid-column: 8 / 13; padding-bottom: 8px; }
.make:nth-child(even) .make__media { grid-column: 6 / 13; grid-row: 1; }
.make:nth-child(even) .make__text { grid-column: 1 / 6; grid-row: 1; text-align: right; }
.make__text span { display: block; font: 500 12px/1 var(--sans); letter-spacing: .2em; color: var(--brass); margin-bottom: 14px; }
.make__text h2 { font-size: clamp(48px, 6.6vw, 100px); line-height: .95; }

.js .make__media { transition: clip-path 1.5s cubic-bezier(.77,0,.18,1); }
.js .make__media img { transform: scale(1.18); transition: transform 2.2s cubic-bezier(.2,.7,.2,1); }
.js .make .make__media { clip-path: inset(0 100% 0 0); }
.js .make:nth-child(even) .make__media { clip-path: inset(0 0 0 100%); }
.js .make__text > * { opacity: 0; transform: translateY(24px); transition: opacity .9s .5s, transform 1.1s .5s cubic-bezier(.2,.7,.2,1); }
.js .make__text h2 { transition-delay: .6s; }
.js .make.is-in .make__media { clip-path: inset(0); }
.js .make.is-in .make__media img, .js .make.is-in .make__text > * { transform: none; opacity: 1; }

/* ---------- Blog ---------- */
.page-hero { padding: 170px 0 56px; }
.page-hero h1 { font-size: clamp(44px, 8vw, 104px); }
.page-hero .article__meta + h1 { font-size: clamp(36px, 5.5vw, 72px); margin-top: 16px; } /* blog post titles are long */

.section { padding: 0 0 clamp(72px, 10vw, 120px); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--paper); font: 500 13px/1 var(--sans); text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.blog-hero { padding-bottom: 48px; }
.blog-hero__lede { margin-top: 20px; font-size: 18px; color: var(--muted); }

.blog-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.blog-tools[hidden] { display: none; }
.blog-tools__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-tools__filters button { font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.blog-tools__filters button:hover { color: var(--ink); border-color: var(--ink); }
.blog-tools__filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.blog-tools__filters button span { opacity: .55; margin-left: 6px; }
.blog-tools__right { display: flex; gap: 12px; flex-wrap: wrap; }
.blog-tools input, .blog-tools select { font: 400 14px/1 var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; height: 40px; }
.blog-tools input { width: 220px; }
.blog-tools input:focus, .blog-tools select:focus { outline: none; border-color: var(--ink); }
.blog-count { margin: 20px 0 0; font-size: 13px; letter-spacing: .08em; color: var(--muted); }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.post-card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; padding: 28px; min-height: 280px; background: #fbf8f3; border: 1px solid var(--line); transition: border-color .3s, transform .4s cubic-bezier(.2,.7,.2,1); }
.post-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.post-card[hidden] { display: none; }
.post-card__meta, .article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tag { color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; text-decoration: none; font-weight: 500; }
a.tag:hover { border-color: var(--ink); }
.post-card h2 { font-size: 30px; line-height: 1.12; }
.post-card p { color: var(--muted); font-size: 15px; }
.post-card__more { margin-top: auto; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.post-card__more i { font-style: normal; display: inline-block; transition: transform .3s; }
.post-card:hover .post-card__more i { transform: translateX(6px); }
.blog-empty { padding: 48px 0; color: var(--muted); }
.blog-more { text-align: center; margin-top: 40px; }
.btn-line { font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 15px 26px; border-radius: 999px; border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-line[hidden] { display: none; }

.article { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 24px; }
.article h2 { font-size: 34px; margin: 48px 0 16px; }
.article h3 { font-size: 26px; margin: 36px 0 12px; }
.article p, .article ul, .article ol { margin: 0 0 20px; font-size: 17px; line-height: 1.75; color: #2a2621; }
.article li { margin-bottom: 8px; }
.article__back { display: inline-block; margin-top: 40px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--brass); }

/* ---------- Contact (bottom of every page) ---------- */
.contact { background: var(--ink); color: var(--paper); padding: clamp(80px, 12vw, 150px) 0 32px; }
.contact h2 { font-size: clamp(44px, 7vw, 104px); line-height: 1; color: #fff; margin-bottom: clamp(48px, 7vw, 88px); }
.contact h2 em { color: var(--brass); font-weight: 400; }
.contact__links { border-top: 1px solid rgba(245,240,232,.14); }
.contact__links a { position: relative; display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 16px; padding: clamp(20px, 3vw, 30px) 0; border-bottom: 1px solid rgba(245,240,232,.14); text-decoration: none; }
.contact__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.7,0,.2,1); }
.contact__links span { font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(245,240,232,.5); }
.contact__links strong { font: 500 clamp(24px, 3.4vw, 44px)/1.1 var(--serif); overflow-wrap: anywhere; transition: color .3s; }
.contact__links i { font-style: normal; font-size: 24px; color: var(--brass); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.contact__links a:hover::after { transform: scaleX(1); }
.contact__links a:hover strong { color: var(--brass); }
.contact__links a:hover i { transform: translateX(8px); }
.contact__base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(56px, 8vw, 96px); font-size: 13px; color: rgba(245,240,232,.5); }
.contact__base address { font-style: normal; margin-bottom: 8px; }
.contact__base nav { display: flex; gap: 24px; }
.contact__base a { text-decoration: none; }
.contact__base a:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .make__media, .js .make__media img, .js .make__text > * { opacity: 1; transform: none; clip-path: none; transition: none; }
}
@media (max-width: 1000px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  /* Header: logo centred, the three links in a row beneath it */
  .site-header .wrap { flex-direction: column; justify-content: center; gap: 10px; height: auto; padding-top: 14px; padding-bottom: 10px; }
  .logo img { height: 34px; }
  .nav { gap: 32px; justify-content: center; }
  .nav a { font-size: 12px; padding: 4px 0; }
  /* Hero: bigger headline, sits lower, pushes the first image below the fold */
  .hero { min-height: 92svh; display: flex; align-items: center; padding: 150px 0 72px; }
  .hero h1 { font-size: clamp(54px, 16vw, 80px); max-width: none; }
  .make,.make:nth-child(even) { grid-template-columns: 1fr; gap: 18px; }
  .make .make__media, .make:nth-child(even) .make__media, .make .make__text, .make:nth-child(even) .make__text { grid-column: 1; grid-row: auto; text-align: left; }
  .make__media img { aspect-ratio: 4 / 5; }
  .posts { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .blog-tools__right, .blog-tools input { width: 100%; }
  .blog-tools__search { flex: 1; }
  .contact__base { flex-direction: column; gap: 20px; }
  .contact__links a { grid-template-columns: 1fr auto; }
  .contact__links span { grid-column: 1 / -1; }
  .contact__links i { grid-row: 2; grid-column: 2; }
}

/* ---------- Blog post body: extra elements a post written in /admin can contain ---------- */
.article h4 { font: 600 17px/1.4 var(--sans, inherit); margin: 28px 0 8px; }
.article blockquote { margin: 28px 0; padding-left: 20px; border-left: 2px solid currentColor; }
.article blockquote p { font-style: italic; margin: 0; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article code { font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; background: rgba(0, 0, 0, .06); padding: 2px 5px; }
.article pre { background: rgba(0, 0, 0, .06); padding: 16px; overflow-x: auto; margin: 0 0 20px; }
.article pre code { padding: 0; background: none; }
