/* ------------------------------------------------------------------
   STUDIO IL · styles
   Layout, sizes and breakpoints copy the Bayhauz reference page
   (768 / 1024 / 1280): no header bar, logo top-left with the menu under
   it, text | image | text, then one image per row, one-row footer.
   Colour stays Studio Il's: navy on fine dotted paper, one amber dot.
   ------------------------------------------------------------------ */

:root {
  --ink: #002f63;         /* reference: #010101 */
  --muted: #7f8791;       /* reference: #7f7f7f / #828282 */
  --paper: #efeeea;
  --amber: #e39a3b;
  --line: rgba(0, 47, 99, .14);
  --font: 'Host Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 13px/1.5 var(--font);
  color: var(--muted);
  background-color: var(--paper);
  /* small, crisp, light dots: a hard-edged half-pixel-ish point every 18px */
  background-image: radial-gradient(circle, rgba(0, 47, 99, .3) 0, rgba(0, 47, 99, .3) .9px, transparent 1px);
  background-size: 20px 20px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.page { position: relative; width: 100%; max-width: 1600px; margin: 0 auto; }

/* ---------- Type (reference sizes) ---------- */
.title { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.credits { display: flex; flex-direction: column; gap: 2px; font-size: 10px; line-height: normal; color: var(--ink); }
.copy { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: flex-end; gap: 8px; font-size: 24px; font-weight: 300; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.logo svg { width: 22px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.logo .sun { fill: var(--amber); stroke: none; }

/* ---------- Every screen size: logo left, "Menu" right.
   Press it and the options take its place, on one clean sheet of paper;
   an amber dot marks the page you are on. ---------- */
.bar { position: fixed; left: 0; right: 0; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 12px 16px; pointer-events: none; }
/* the bar is see-through at the top of the page, so only its own controls take clicks */
.bar > * { pointer-events: auto; }
.drop-open .bar, .scrolled .bar { pointer-events: auto; }
.bar::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 0; background: var(--paper); border-bottom: 1px solid transparent; transition: height .35s var(--ease), border-color .35s; }
/* once the page has scrolled, the bar stays at the top on its own strip of paper */
.scrolled .bar::before { height: 100%; background: rgba(239, 238, 234, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
/* ...and shrinks to a slim line: smaller logo, smaller words, far less padding */
.bar, .bar .logo, .bar .logo svg, .menu-word, .bar .lang { transition: padding .3s var(--ease), height .3s var(--ease), width .3s var(--ease), font-size .3s var(--ease), color .2s, background .25s, border-color .25s; }
.scrolled .bar { padding-top: 8px; padding-bottom: 8px; }
.scrolled .bar .logo { height: 30px; font-size: 18px; gap: 6px; }
.scrolled .bar .logo svg { width: 16px; height: 22px; }
.scrolled .menu-word { height: 30px; font-size: 14px; }
.scrolled .bar .lang { height: 24px; padding: 0 10px; font-size: 11px; }
.scrolled .drop a { font-size: 16px; }
.scrolled.drop-open .bar::before { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
.bar .logo { height: 60px; align-items: center; margin-right: auto; }
.drop-wrap { position: relative; }
.menu-word { display: flex; align-items: center; justify-content: flex-end; min-width: 28px; height: 34px; font-size: 18px; line-height: 1; color: var(--muted); transition: color .2s; }
.menu-word svg { display: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.menu-word:hover { color: var(--ink); }
.drop { position: absolute; top: calc(100% + 14px); right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 13px; visibility: hidden; }
.drop a { position: relative; font-size: 18px; line-height: 1; color: var(--muted); white-space: nowrap; opacity: 0; transform: translateY(-6px); transition: opacity .3s var(--ease), transform .3s var(--ease), color .2s; }
.drop a:hover, .drop a[aria-current] { color: var(--ink); }
.drop a[aria-current]::after { content: ''; position: absolute; left: calc(100% + 12px); top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--amber); }
.drop-open .bar::before { height: var(--drop-h, 300px); border-bottom-color: var(--line); }
/* open: the word becomes a cross */
.drop-open .menu-word { color: var(--ink); }
.drop-open .menu-word span { display: none; }
.drop-open .menu-word svg { display: block; }
.drop-open .drop { visibility: visible; }
.drop-open .drop a { opacity: 1; transform: none; }
.drop-open .drop a:nth-child(2) { transition-delay: .04s; }
.drop-open .drop a:nth-child(3) { transition-delay: .08s; }
.drop-open .drop a:nth-child(4) { transition-delay: .12s; }
.drop-open .drop a:nth-child(5) { transition-delay: .16s; }

.lang { height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); transition: background .25s, color .25s, border-color .25s; }
.lang:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- text | image | text ---------- */
.trio { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 128px 16px 64px; }
.trio-col { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.trio-pic { flex-shrink: 0; width: 100%; display: flex; justify-content: center; }
.trio-pic > div { position: relative; width: 100%; max-width: 300px; height: 450px; overflow: hidden; background: #e3e1da; }
.trio-pic img { width: 100%; height: 100%; object-fit: cover; }
.spaces { display: flex; flex-direction: column; }
.spaces a { width: fit-content; transition: color .2s; }
.spaces a:hover { color: var(--ink); }
.back { font-size: 10px; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--ink); }

/* ---------- one image per row ---------- */
.shot { display: block; width: 100%; margin-bottom: 40px; padding: 20px 16px; }
.shot > div { display: flex; justify-content: center; width: 100%; overflow: hidden; }
.shot img { width: 100%; height: auto; max-height: 400px; object-fit: contain; }
.shot.plan img { background: #fff; }
button.shot { cursor: zoom-in; }
.space-name { display: none; }

/* phones: rooms as a two-column index, and each room's pictures grouped under its name */
@media (max-width: 767px) {
  .trio { padding-bottom: 32px; }
  .trio-pic > div { max-width: none; height: auto; aspect-ratio: 4 / 5; }
  .spaces { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .spaces a { width: auto; padding: 10px 0; border-top: 1px solid var(--line); }
  .space { padding: 0 16px; margin-bottom: 48px; scroll-margin-top: 72px; }
  .space-name { display: block; padding-top: 12px; margin-bottom: 12px; border-top: 1px solid var(--line); }
  .space .shot { padding: 0; margin-bottom: 8px; }
  .space .shot img { max-height: 70svh; }
}

/* ---------- pages that are a title and a grid ---------- */
.sheet { padding: 128px 16px 64px; }
.sheet > .title { margin-bottom: 24px; }
/* projects page: three filter words, an intro, then tall pictures three across */
.w-filter { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.w-filter a { color: var(--muted); transition: color .2s; }
.w-filter a:hover, .w-filter a[aria-current] { color: var(--ink); }
.w-intro { max-width: 52em; margin: 28px 0 40px; color: var(--ink); }
.works { display: grid; grid-template-columns: 1fr; gap: 40px 24px; }
.work[hidden] { display: none; }
.work .pic { aspect-ratio: 524 / 470; overflow: hidden; background: #e3e1da; }
.work .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work:hover .pic img { transform: scale(1.02); }
.work .credits { margin-top: 10px; }
.people { display: grid; grid-template-columns: 1fr; gap: 28px 24px; }
.people .name { color: var(--ink); }
.people .credits { margin: 2px 0 8px; }
.next { display: block; padding: 0 16px 64px; }
.next .credits { color: var(--muted); margin-bottom: 4px; }
.next:hover .title { color: var(--muted); }

/* ---------- Journal: one large note, then a 2 x 2 grid.
   No type of its own: headings use .title, small lines use .credits and
   everything else is the landing page's body text. ---------- */
.j-kicker { margin-bottom: 16px; }
/* credit lines here hold a single line, so they flow as text rather than stacking */
.j-kicker.credits, .j-cat.credits, .j-date.credits { display: block; }
.j-title { max-width: 26em; }
.j-sub { margin-top: 16px; max-width: 34em; }
/* each division is its own section, one after another down the page */
.j-section { margin-top: 56px; scroll-margin-top: 110px; }
.j-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.j-more { display: inline-block; margin-top: 24px; color: var(--ink); }
.j-more:hover { color: var(--muted); }
.j-kicker a:hover { color: var(--muted); }
.j-empty { margin-top: 40px; }
.j-feature { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
.j-feature .j-pic { aspect-ratio: 544 / 208; }
.j-pic { display: block; overflow: hidden; background: #e3e1da; }
.j-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
a.j-pic:hover img { transform: scale(1.03); }
.j-text { display: flex; flex-direction: column; gap: 12px; }
.j-text .title a:hover { color: var(--muted); }
.j-text p:not(.credits) { max-width: 30em; }
.j-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.j-meta a { font-size: 18px; color: var(--ink); transition: transform .3s var(--ease); }
.j-meta a:hover { transform: translateX(4px); }
.j-grid { display: grid; grid-template-columns: 1fr; gap: 36px 40px; margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
.j-card { display: grid; grid-template-columns: 1fr; gap: 16px; }
.j-card .j-pic { aspect-ratio: 148 / 110; }
.j-pages { display: flex; justify-content: space-between; margin-top: 48px; color: var(--ink); }
.j-pages a:hover { color: var(--muted); }
/* a single note */
.post-head { max-width: 46em; }
.post-head .j-title { margin-top: 12px; }
.post-pic { margin-top: 36px; aspect-ratio: 16 / 8; overflow: hidden; background: #e3e1da; }
.post-pic img { width: 100%; height: 100%; object-fit: cover; }
.post-body { max-width: 40em; margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
.post-back { display: inline-block; margin-top: 48px; color: var(--ink); }
.post-back:hover { color: var(--muted); }

/* ---------- Contact: picture | form ---------- */
.touch { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.touch-pic { aspect-ratio: 730 / 537; overflow: hidden; background: #e3e1da; }
.touch-pic img { width: 100%; height: 100%; object-fit: cover; }
.form { display: grid; grid-template-columns: 1fr; gap: 28px 16px; color: var(--ink); }
.form-intro { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 14px; }
.field input, .field textarea, .field select { width: 100%; font-family: var(--font); font-weight: 400; font-size: inherit; line-height: 1.4; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(0, 47, 99, .35); border-radius: 0; padding: 8px 0 10px; outline: none; transition: border-color .2s; }
.field textarea { resize: vertical; min-height: 38px; }
.field select { border: 1px solid rgba(0, 47, 99, .5); padding: 6px 12px; cursor: pointer; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.send { grid-column: 1 / -1; margin-top: 24px; height: 54px; background: var(--ink); color: var(--paper); transition: opacity .2s; }
.send:hover { opacity: .88; }
.send[disabled] { opacity: .5; cursor: default; }
.form-note { grid-column: 1 / -1; min-height: 1.5em; color: var(--ink); margin-top: -12px; }
.trap { position: absolute; left: -9999px; }
.details { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 64px; }
.details .credits { margin-bottom: 6px; }
.details a, .details p { display: block; width: fit-content; }
.details a { color: var(--ink); transition: color .2s; }
.details a:hover { color: var(--muted); }

/* ---------- Footer: rights on the left, contact icons on the right ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 16px 32px; font-size: 13px; color: var(--ink); }
.foot-icons { display: flex; align-items: center; gap: 18px; }
.foot-icons a { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink); transition: color .2s, transform .3s var(--ease); }
.foot-icons a:hover { color: var(--amber); transform: translateY(-2px); }
.foot-icons svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Home: one screen; info on the left, slideshow on the right ---------- */
.home { display: flex; flex-direction: column; gap: 32px; padding: 124px 16px 0; }
.home-info { display: flex; flex-direction: column; gap: 16px; }
.slides { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.slides-view { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #e3e1da; touch-action: pan-y; }
.slides-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.65, 0, .25, 1); will-change: transform; }
.slide { flex: 0 0 100%; height: 100%; display: block; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-arrow { position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; border-radius: 50%; background: rgba(239, 238, 234, .82); color: var(--ink); opacity: .85; transition: opacity .2s, background .2s; }
.slide-arrow:hover { opacity: 1; background: var(--paper); }
.slide-arrow.go-prev { left: 12px; } .slide-arrow.go-next { right: 12px; }
.slide-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slides-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 18px; }
.slide-cap { color: var(--muted); }
.slide-dots { display: flex; align-items: center; gap: 4px; }
.slide-dots button { width: 18px; height: 18px; display: grid; place-items: center; }
.slide-dots button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink); transition: background .3s, transform .3s; }
.slide-dots button[aria-current="true"]::before { background: var(--ink); transform: scale(1.15); }

/* ---------- Cursor: a small navy dot inside a fine ring that trails it ---------- */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto !important; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .2s; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--ink); }
.cursor-ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 1px solid var(--ink); transition: opacity .2s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), border-color .25s; }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-link .cursor-ring { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-color: var(--amber); }
.cursor-text .cursor-dot, .cursor-text .cursor-ring { opacity: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 24, 52, .97); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 88vw; max-height: 82vh; }
.lightbox button { position: absolute; color: var(--paper); font-size: 16px; padding: 16px; }
.lb-close { top: 8px; right: 16px; }
.lb-prev, .lb-next { bottom: 56px; font-size: 20px !important; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(239, 238, 234, .7); }

/* ---------- Tamil ---------- */
:lang(ta) body { font-family: 'Noto Sans Tamil', var(--font); line-height: 1.65; }
:lang(ta) .title { letter-spacing: 0; }
:lang(ta) .credits { font-size: 12px; }
:lang(ta) .logo, :lang(ta) .lang { font-family: var(--font); }

/* ---------- sm 640 ---------- */
@media (min-width: 640px) {
  .shot img { max-height: 500px; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- md 768 ---------- */
@media (min-width: 768px) {
  .j-feature { grid-template-columns: minmax(0, 544fr) minmax(0, 200fr); gap: 28px; }
  .j-feature .j-text { padding-top: 6px; }
  .j-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .j-card { grid-template-columns: minmax(0, 148fr) minmax(0, 166fr); gap: 24px; }
  .foot { padding: 28px 80px 32px; }
  .home { padding: 144px 80px 0; }
  body { font-size: 14px; }
  .title { font-size: 18px; }
  .credits { font-size: 11px; }
  .copy, .trio-col { gap: 20px; }
  .bar .logo { height: 64px; }
  .trio { gap: 32px; padding: 144px 80px 80px; }
  .trio-pic > div { max-width: 470px; }
  .shot { margin-bottom: 80px; padding: 40px 80px; }
  .shot img { max-height: 600px; }
  .sheet { padding: 144px 80px 80px; }
  .next { padding: 0 80px 80px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
  .form { grid-template-columns: 1fr 1fr; gap: 36px 22px; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-prev, .lb-next { bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* ---------- lg 1024: the desktop layout ---------- */
@media (min-width: 1024px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot { padding: 0 128px 28px; }
  /* home fits the screen: no scrolling, the slideshow takes what is left */
  .home-page { height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
  .home-page .page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .home { flex: 1; min-height: 0; flex-direction: row; align-items: stretch; gap: 48px; padding: 136px 128px 20px; }
  .home-info { flex: 0 0 300px; justify-content: flex-start; padding-top: 4px; }
  .slides { flex: 1; min-height: 0; }
  .slides-view { flex: 1; min-height: 0; aspect-ratio: auto; }
  .slide-arrow { width: 32px; height: 32px; margin-top: -16px; }
  .slide-arrow.go-prev { left: 18px; } .slide-arrow.go-next { right: 18px; }
  body { font-size: 15px; }
  .title { font-size: 20px; }
  .bar { padding: 14px 16px; }
  .trio { flex-direction: row; padding: 100px 128px 80px; }
  .trio-col { flex: 1 1 0; min-width: 0; width: auto; }
  .trio-pic { width: auto; justify-content: flex-start; }
  /* reference: a fixed 750 x 700 picture; it scales down on narrower desktops instead of overflowing */
  .trio-pic > div { width: min(750px, 52vw); max-width: none; height: auto; aspect-ratio: 750 / 700; }
  .shot { margin-bottom: 120px; padding: 40px 96px; }
  .shot img { max-height: 800px; }
  .sheet { padding: 100px 128px 80px; }
  .next { padding: 0 128px 80px; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
  .touch { grid-template-columns: minmax(0, 730fr) minmax(0, 860fr); gap: 60px; }
  .details { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- xl 1280 ---------- */
@media (min-width: 1280px) {
  .foot { padding: 0 120px 28px; }
  .home { padding: 136px 120px 20px; gap: 64px; }
  .home-info { flex-basis: 320px; }
  body { font-size: 16px; }
  .title { font-size: 22px; }
  .trio { gap: 48px; padding: 120px 120px 80px; }
  .shot { padding: 40px 100px; }
  .sheet { padding: 120px 120px 80px; }
  .next { padding: 0 120px 80px; }
}

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

/* ---------- content starts just below the (now slimmer) top bar ---------- */
.home, .trio, .sheet { padding-top: 104px; }
@media (min-width: 768px) { .home, .trio, .sheet { padding-top: 116px; } }
