/* ADEPT MAKEOVER SDN BHD - shared stylesheet for index / projects / contact */

:root{
  --paper:#FAFAF8;
  --ink:#0A0A0A;
  --grey:#5C5C5C;
  --hairline:#DFDFDA;
  --ink-soft:#42423F;  /* hero supporting text: holds 6.1:1 even over a dark photo behind the wash */
  --orange:#C7420D;   /* white text on this = 4.98:1, text on paper = 4.77:1 (both clear WCAG AA) */

  --display:"Poppins",system-ui,sans-serif;              /* bold headlines only */
  --body:"Noto Sans Display",system-ui,sans-serif;       /* all small text */
  --label:"Noto Sans Display",system-ui,sans-serif;      /* uppercase labels + captions */

  --gut:clamp(1rem,5vw,4rem);      /* page side gutter */
  --sec:clamp(3.5rem,9vw,7rem);    /* space between sections */
  --wrap:1240px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--paper);color:var(--grey);
  font:400 1rem/1.65 var(--body);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%;display:block}
a{color:inherit}

h1,h2,h3{font-family:var(--display);color:var(--ink);line-height:1.1;margin:0;letter-spacing:-.02em}
h1{font-weight:700;font-size:clamp(2.1rem,6vw,4.1rem)}
h2{font-weight:600;font-size:clamp(1.6rem,3.6vw,2.6rem)}
h3{font-weight:600;font-size:1.15rem;letter-spacing:-.01em}
p{margin:0 0 1rem}
.lede{font-size:clamp(1.05rem,1.6vw,1.25rem);max-width:60ch}
h1+.lede,h2+.lede,h1+p,h2+p{margin-top:1.25rem}
.wrap{max-width:var(--wrap);margin-inline:auto;padding-inline:var(--gut)}
.section{padding-block:var(--sec)}
section[id]{scroll-margin-top:110px}   /* sticky header must not cover an anchored section */

/* focus - visible everywhere, never removed */
:focus-visible{outline:3px solid var(--orange);outline-offset:3px;border-radius:2px}

/* text for screen readers only (button labels, live counts) */
.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- signature: the dimension line ---------- */
/* a setting-out annotation: hairline rule, tick at each end, label in the middle */
.dim{
  display:flex;align-items:center;gap:1rem;
  font:400 .72rem/1 var(--label);letter-spacing:.18em;text-transform:uppercase;
  color:var(--ink);margin-bottom:2.5rem;
}
.dim::before,.dim::after{
  content:"";flex:1;height:1px;background:var(--hairline);
}
.dim::before{box-shadow:inset 6px 0 0 -5px var(--orange)}
.dim::after{box-shadow:inset -6px 0 0 -5px var(--orange)}
.dim span{flex:0 0 auto}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  min-height:44px;padding:.7rem 1.4rem;
  font:500 .95rem/1 var(--body);text-decoration:none;cursor:pointer;
  background:var(--orange);color:#fff;border:1px solid var(--orange);border-radius:2px;
  transition:background .2s ease,border-color .2s ease;
}
.btn:hover{background:#A5360A;border-color:#A5360A}
.btn-lg{font-size:1.05rem;padding:1rem 1.9rem;min-height:56px}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--ink)}
.btn-ghost:hover{background:var(--ink);color:var(--paper)}

/* ---------- header ---------- */
.hdr{
  position:sticky;top:0;z-index:100;
  background:rgba(250,250,248,.94);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--hairline);
}
.hdr-inner{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;padding-block:.8rem}
.brand{margin-right:auto;display:block;line-height:0}
.brand img{height:40px;width:auto}
.nav{
  order:3;flex-basis:100%;display:flex;gap:1.5rem;
  border-top:1px solid var(--hairline);padding-top:.7rem;
}
.nav a{
  display:inline-flex;align-items:center;min-height:44px;   /* full touch target on a phone */
  font:500 .9rem/1 var(--body);text-decoration:none;color:var(--grey);
  transition:color .2s ease;
}
.nav a:hover{color:var(--ink)}
/* underline hugs the text, not the 44px touch box */
.nav a[aria-current="page"]{
  color:var(--ink);text-decoration:underline;text-decoration-color:var(--orange);
  text-decoration-thickness:2px;text-underline-offset:6px;
}
@media(min-width:760px){
  .nav{order:0;flex-basis:auto;border-top:0;padding-top:0;margin-right:1.75rem;gap:2rem}
  .hdr-inner{padding-block:1rem}
  .brand img{height:52px}
}

/* ---------- hero banner (auto-rotating, pausable) ---------- */
.hero{position:relative;isolation:isolate;background:#E8E8E3}
.hero-stage{position:relative;aspect-ratio:16/9;max-height:78vh;overflow:hidden}
@media(max-width:700px){.hero-stage{aspect-ratio:4/5;max-height:none}}

.slide{
  position:absolute;inset:0;opacity:0;transition:opacity 1.1s ease;
  display:grid;place-items:start end;   /* parks the placeholder tag in the empty top corner */
}
.slide[data-active]{opacity:1}
/* out of the grid flow, so it fills the stage instead of being sized by its own
   aspect ratio as a grid item (place-items above is for the placeholder tag) */
.slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
/* light placeholders, so the ink headline stays readable when the banner rotates onto them */
.slide.ph{background:repeating-linear-gradient(45deg,#EDEDE8 0 22px,#E4E4DE 22px 44px)}
.slide.ph.ph2{background:repeating-linear-gradient(45deg,#E9E9E3 0 22px,#E0E0D9 22px 44px)}
.slide.ph.ph3{background:repeating-linear-gradient(45deg,#EFEFEA 0 22px,#E6E6E0 22px 44px)}
.ph-tag{
  font:400 .72rem/1 var(--label);letter-spacing:.2em;color:#8A8A83;
  border:1px dashed #C6C6BF;padding:.6rem 1rem;margin:1rem 1rem 0 0;
}
/* paper wash: keeps ink text legible over ANY photo dropped in later.
   80% paper over even pure black composites to ~#CACAC8, so contrast holds. */
.hero-stage::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,
    rgba(250,250,248,.88) 0%,rgba(250,250,248,.74) 42%,
    rgba(250,250,248,.26) 75%,rgba(250,250,248,.10) 100%);
}
@media(max-width:700px){
  /* text spans the full width on a phone, so wash the whole frame -
     .72 is the floor: any weaker and body text drops under 4.5:1 on a dark photo */
  .hero-stage::after{background:linear-gradient(180deg,rgba(250,250,248,.74),rgba(250,250,248,.72))}
}
.hero-copy{
  position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;justify-content:center;
  max-width:var(--wrap);margin-inline:auto;padding-inline:var(--gut);padding-bottom:3.5rem;
  color:var(--ink-soft);
}
.hero-copy h1{color:var(--ink);max-width:16ch}
.hero-eyebrow{
  font:500 .72rem/1 var(--label);letter-spacing:.2em;text-transform:uppercase;
  color:var(--ink-soft);margin-bottom:1.1rem;
}
.hero-copy .lede{color:var(--ink-soft);margin:1.2rem 0 1.8rem;max-width:44ch}
.hero-actions{display:flex;gap:.75rem;flex-wrap:wrap}

/* banner controls */
.hero-ctrl{
  position:absolute;z-index:3;bottom:1rem;right:var(--gut);
  display:flex;align-items:center;gap:.5rem;
}
.dot{
  width:44px;height:44px;padding:0;background:none;border:0;cursor:pointer;
  display:grid;place-items:center;
}
.dot::before{
  content:"";width:26px;height:3px;background:rgba(10,10,10,.35);transition:background .2s ease;
}
.dot[aria-current="true"]::before{background:var(--orange)}
.dot:hover::before{background:var(--ink)}
.pause{
  width:44px;height:44px;margin-left:.25rem;cursor:pointer;
  background:rgba(250,250,248,.85);border:1px solid var(--ink);border-radius:2px;
  color:var(--ink);font:400 .8rem/1 var(--label);
  display:grid;place-items:center;transition:background .2s ease,color .2s ease;
}
.pause:hover{background:var(--ink);color:var(--paper)}

/* ---------- carousel (manual, does not auto-rotate) ---------- */
.rail-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.rail-nav{display:flex;gap:.5rem}
.rail-btn{
  width:44px;height:44px;cursor:pointer;background:transparent;
  border:1px solid var(--hairline);border-radius:2px;color:var(--ink);
  font:400 1rem/1 var(--label);transition:border-color .2s ease,background .2s ease,color .2s ease;
}
.rail-btn:hover{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.rail{
  display:flex;gap:1rem;margin-top:2rem;
  overflow-x:auto;scroll-snap-type:x mandatory;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
  padding-bottom:.5rem;
}
.rail::-webkit-scrollbar{display:none}
.rail>*{flex:0 0 min(82vw,520px);scroll-snap-align:center}
@media(min-width:760px){.rail>*{scroll-snap-align:start}}

/* ---------- project tiles (shared by carousel + grid) ---------- */
.tile{margin:0}
.tile .shot{
  aspect-ratio:4/3;background:#EDEDE8;border:1px solid var(--hairline);
  display:grid;place-items:center;overflow:hidden;
}
.tile .shot img{width:100%;height:100%;object-fit:cover}
.tile .shot .ph-tag{color:#9A9A93;border-color:#D2D2CB}
.tile figcaption{
  margin-top:.85rem;font:400 .72rem/1.5 var(--label);
  letter-spacing:.1em;text-transform:uppercase;color:var(--grey);
  font-variant-numeric:tabular-nums;   /* sq ft and weeks line up down the column */
}
.tile .title{display:block;color:var(--ink);letter-spacing:.06em;margin-bottom:.2rem}

/* a project tile opens that project's photos:
   a <button> on the Projects page, a link to it on the homepage */
.tile .shot{position:relative}
a.shot,button.shot{width:100%;padding:0;font:inherit;color:inherit;text-decoration:none;cursor:pointer}
.tile .shot img{transition:transform .5s ease}
.tile .shot:hover img{transform:scale(1.03)}
.tile[id]{scroll-margin-top:110px}   /* arriving from a homepage link, clear the sticky header */
.count{
  position:absolute;left:.75rem;bottom:.75rem;padding:.4rem .65rem;
  background:rgba(10,10,10,.8);color:var(--paper);
  font:500 .72rem/1 var(--label);letter-spacing:.06em;
}

/* ---------- project gallery (native <dialog>) ---------- */
.gallery{
  width:min(1100px,94vw);max-width:none;max-height:94vh;
  padding:0;border:0;background:var(--paper);color:var(--grey);
}
.gallery::backdrop{background:rgba(10,10,10,.85)}
body:has(dialog[open]){overflow:hidden}   /* page behind doesn't scroll while viewing */
.gallery-head{
  display:flex;align-items:center;gap:1rem;
  padding:.9rem 1.25rem;border-bottom:1px solid var(--hairline);
}
.gallery-head h2{font-size:1.2rem}
.gallery-head p{margin:0;font:400 .8125rem/1.3 var(--label)}
.gallery-close{margin-left:auto;flex:0 0 auto}
.gallery-rail{
  display:flex;overflow-x:auto;scroll-snap-type:x mandatory;
  scrollbar-width:none;background:#EDEDE8;
}
.gallery-rail::-webkit-scrollbar{display:none}
/* contain, not cover: the gallery shows the whole room, uncropped */
.gallery-rail img{
  flex:0 0 100%;width:100%;height:min(72vh,760px);
  object-fit:contain;scroll-snap-align:center;
}
.gallery-nav{display:flex;align-items:center;justify-content:center;gap:1rem;padding:.75rem}
.gallery-count{
  min-width:5ch;text-align:center;color:var(--ink);
  font:500 .8125rem/1 var(--label);font-variant-numeric:tabular-nums;
}

.tile-more{display:flex}
.tile-more a{
  flex:1;display:grid;place-items:center;text-decoration:none;
  aspect-ratio:4/3;border:1px solid var(--ink);color:var(--ink);
  font:500 .95rem/1 var(--body);transition:background .2s ease,color .2s ease;
}
.tile-more a:hover{background:var(--ink);color:var(--paper)}

/* ---------- grid (projects page) ---------- */
.grid{display:grid;gap:2rem 1.5rem;grid-template-columns:1fr;margin-top:2.5rem}
@media(min-width:620px){.grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.grid{grid-template-columns:repeat(3,1fr)}}

.filters{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1.5rem}
.filter{
  min-height:44px;padding:.6rem 1.1rem;cursor:pointer;
  background:transparent;border:1px solid var(--hairline);border-radius:2px;
  font:400 .78rem/1 var(--label);letter-spacing:.12em;text-transform:uppercase;color:var(--grey);
  transition:border-color .2s ease,color .2s ease,background .2s ease;
}
.filter:hover{border-color:var(--ink);color:var(--ink)}
.filter[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--paper)}

/* ---------- two-column service blocks ---------- */
.cols{display:grid;gap:2.5rem;grid-template-columns:1fr}
@media(min-width:880px){.cols{grid-template-columns:1fr 1fr;gap:4rem;align-items:start}}
.list{list-style:none;margin:0;padding:0}
.list li{
  padding:.9rem 0;border-bottom:1px solid var(--hairline);
  font-family:var(--display);font-weight:500;color:var(--ink);font-size:1.05rem;
}
.list li:first-child{border-top:1px solid var(--hairline)}
.list .note{display:block;font:400 .85rem/1.5 var(--body);color:var(--grey);margin-top:.15rem}

/* ---------- proof figures ---------- */
.proof{display:grid;gap:2rem;grid-template-columns:1fr}
@media(min-width:700px){.proof{grid-template-columns:repeat(3,1fr)}}
.proof .num{
  font:600 clamp(2.4rem,5vw,3.4rem)/1 var(--display);color:var(--ink);
  letter-spacing:-.03em;display:block;font-variant-numeric:tabular-nums;
}
.proof .lbl{font:400 .72rem/1.5 var(--label);letter-spacing:.14em;text-transform:uppercase;display:block;margin-top:.5rem}

/* ---------- contact ---------- */
.contact-grid{display:grid;gap:2.5rem;grid-template-columns:1fr}
@media(min-width:880px){.contact-grid{grid-template-columns:1.1fr .9fr;gap:4rem}}
.dl{margin:0}
.dl dt{font:400 .72rem/1 var(--label);letter-spacing:.16em;text-transform:uppercase;color:var(--grey);margin-top:1.75rem}
.dl dd{margin:.5rem 0 0;font-size:1.05rem;color:var(--ink)}
.dl dd a{text-decoration:none;box-shadow:0 1px 0 var(--hairline)}
.dl dd a:hover{box-shadow:0 1px 0 var(--orange)}

/* ---------- footer ---------- */
.ftr{border-top:1px solid var(--hairline);padding-block:3rem;margin-top:var(--sec)}
.ftr-inner{display:grid;gap:2rem;grid-template-columns:1fr}
@media(min-width:760px){.ftr-inner{grid-template-columns:1.5fr .8fr 1.1fr}}
.ftr img{height:56px;width:auto;margin-bottom:1.25rem}
.ftr ul{list-style:none;margin:0;padding:0}
.ftr li{margin-bottom:1rem}
.ftr a{text-decoration:none}
.ftr a:hover{color:var(--ink)}

/* footer type scale - three tiers, each a step down in size, weight and colour:
     title     16px  bold      uppercase  ink    PAGES, GET IN TOUCH
     subtitle  14px  semibold             ink    company name, contact labels
     content   13px  regular              grey   links, reg no, address, values */
.ftr h3{
  font:700 1rem/1.3 var(--label);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink);margin-bottom:1.25rem;
}
.ftr .legal strong,
.ftr .k{display:block;font:600 .875rem/1.4 var(--label);color:var(--ink)}
.ftr .legal span,
.ftr li a{font:400 .8125rem/1.7 var(--label);color:var(--grey)}

.ftr .legal strong{margin-bottom:.5rem}
.ftr .legal span{display:block}
.ftr .k{margin-bottom:.15rem}

/* black bar closing the page */
.copyright{
  background:var(--ink);color:var(--paper);text-align:center;
  padding:1.4rem var(--gut);
  font:400 .78rem/1.5 var(--label);letter-spacing:.06em;
}

/* ---------- motion off ---------- */
/* banner auto-rotation stops entirely; no content is hidden as a result */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
