/* ============================================================
   Nook Spatial — styles
   Colours, type and spacing live in :root below.
   ============================================================ */

/* ---------- Ubuntu (local files only) ---------- */
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-LightItalic.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-MediumItalic.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("assets/font/Ubuntu/Ubuntu-BoldItalic.ttf") format("truetype");
}

:root {
  --bg:     #0d0d0d;   /* rich charcoal */
  --ink:    #ffffff;   /* headings / primary text */
  --muted:  #b3aea6;   /* secondary text (light grey) */
  --line:   #2a2a28;   /* hairlines */

  /* Ubuntu is the single family for the whole experience */
  --font: "Ubuntu", sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   OPENING SCREEN — fades in, then dissolves into the homepage
   ============================================================ */
html.intro-lock,
html.intro-lock body { overflow: hidden; }

#intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  transition: opacity 1.8s ease;
}
#intro.dissolve { opacity: 0; }

.intro-brand,
.intro-center {
  opacity: 0;
  transition: opacity 1.2s ease;
}
#intro.in .intro-brand,
#intro.in .intro-center { opacity: 1; }

.intro-brand {
  position: absolute;
  top: clamp(28px, 5vw, 44px);   /* generous top spacing */
  left: 0;
  right: 0;
  /* Align to the header logo: match the centered .container content edge */
  padding-left: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  font-family: var(--font);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #111111;
}
.intro-brand img {
  display: block;
  height: 38px;      /* match dark-header logo; width auto keeps aspect ratio */
  width: auto;
  max-width: none;
}
@media (max-width: 1024px) {
  .intro-brand img { height: 34px; }   /* tablet */
}
@media (max-width: 600px) {
  .intro-brand img { height: 30px; }   /* mobile */
}

.intro-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter);
}
.intro-hero {
  margin: 0;
  max-width: 760px;
  font-family: var(--font);
  font-weight: 400;              /* Ubuntu Regular — understated but readable */
  text-transform: uppercase;
  font-size: clamp(0.8rem, 1.4vw, 0.85rem);   /* only slightly larger than the location line */
  line-height: 1.55;
  letter-spacing: 0.08em;
  color: #111111;
  white-space: nowrap;      /* keep on one line on desktop */
}
@media (max-width: 600px) {
  .intro-hero {
    white-space: normal;    /* wrap on small screens for readability */
    max-width: 24ch;
    line-height: 1.7;
  }
}
.intro-loc {
  margin: clamp(1rem, 2.4vw, 1.35rem) 0 0;   /* connect it to the statement */
  font-family: var(--font);
  font-weight: 500;              /* Ubuntu Medium — legible at small size */
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  color: #6a6a6a;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 72px;
}
.brand {
  font-family: var(--font);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand img {
  display: block;
  height: 38px;      /* desktop; width auto preserves aspect ratio */
  width: auto;
  max-width: none;
}
@media (max-width: 1024px) {
  .brand img { height: 34px; }   /* tablet */
}
@media (max-width: 600px) {
  .brand img { height: 30px; }   /* mobile */
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vw, 6rem) clamp(3.5rem, 9vw, 8rem);
}
.carousel-stage {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 4 / 3;
}
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
}
.slide img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slide figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}
.slide-title {
  font-family: var(--font);
  font-weight: 500;              /* Ubuntu Medium — primary focus */
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.slide-loc {
  font-family: var(--font);
  font-weight: 300;              /* Ubuntu Light — quiet subtitle */
  font-size: 0.82rem;
  line-height: 1.5;
  letter-spacing: 0;             /* normal — plain readable text */
  color: var(--muted);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  color: var(--ink);
  padding: 0.5rem;
  opacity: 0.5;
  transition: opacity .25s ease;
}
.carousel-arrow:hover { opacity: 1; }
.carousel-prev { left: clamp(0.5rem, 3vw, 2.5rem); }
.carousel-next { right: clamp(0.5rem, 3vw, 2.5rem); }

/* Mobile & small tablets: a little more air below the header divider,
   above the first project image. Desktop spacing is unchanged. */
@media (max-width: 768px) {
  .carousel { padding-top: calc(clamp(2.5rem, 8vw, 6rem) + 28px); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
}
.footer-columns {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  /* wider right column so the two-line heading isn't cramped */
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.footer-col p {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--ink);
}
.footer-label {
  text-transform: uppercase;
  font-weight: 500;              /* Ubuntu Medium — column headings */
  font-size: 0.76rem;            /* slightly smaller */
  letter-spacing: 0.03em;        /* minimal — not stretched */
  line-height: 1.4;              /* comfortable leading for two-line headings */
  margin-bottom: 0.35rem;
}
.footer-detail {
  text-transform: none;
  font-weight: 400;              /* Ubuntu Regular — readable detail lines */
  letter-spacing: 0;             /* normal */
}
.footer-col a { color: inherit; text-decoration: none; }
.footer-col a:hover { color: var(--muted); }
.footer-space { margin-top: 1.6rem; }

/* Indonesia phone — trigger looks identical to a detail link */
.footer-phone { position: relative; }
.phone-trigger {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.phone-trigger:hover { color: var(--muted); }
.phone-trigger:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: 3px;
}

/* Popover: dark, subtle border, compact, fades in only */
.phone-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 0.3rem 0;
  background: #141414;
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.phone-popover.open { opacity: 1; visibility: visible; }
.phone-popover a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.phone-popover a:hover { color: var(--muted); }
.phone-popover a:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: -3px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .footer-columns { grid-template-columns: 1fr; gap: clamp(2rem, 8vw, 3rem); }
}
