/* ==========================================================================
   Interior Republic Australia — interiorrepublic.com.au
   Architectural-editorial single page. Hairline "ceiling grid" rule system,
   Fraunces display over Instrument Sans, brand steel-teal accents.
   ========================================================================== */

:root {
  /* Brand — sampled from the Interior Republic logo bars */
  --pale:  #D5ECF0;
  --teal:  #5290A6;
  --slate: #264452;
  --ink:   #10181D;

  /* Derived */
  --teal-deep: #2F6B80;      /* AA text accent on paper */
  --paper: #FCFDFD;
  --tint:  #F1F7F8;
  --dark:  #0F2129;          /* contact band */
  --dark-2:#0B1920;
  --line:  #DCE5E8;          /* hairlines on paper */
  --line-dark: rgba(255,255,255,.14);
  --muted: #4E5B62;
  --muted-dark: #A9BCC4;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Fragment Mono", "SF Mono", Menlo, monospace;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.25rem;

  --ease: cubic-bezier(.22,.61,.2,1);
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-weight: 380; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--pale); color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Anchored sections clear the sticky header */
section[id], [id="projects"], [id="services"], [id="service-area"], [id="contact"] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* ---------- Type helpers ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.4rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.kicker-light { color: var(--pale); }

.bars { width: 15px; height: 15px; flex: none; }
.bars-lg { width: 22px; height: 22px; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7.2vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

h1 em, h3 em {
  font-style: italic;
  font-weight: 340;
  color: var(--teal-deep);
}

.section-lede {
  max-width: 56ch;
  margin-top: 1.35rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}
.btn-ghost:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

.btn-light { background: var(--pale); color: var(--dark-2); }
.btn-light:hover { background: #fff; }
.btn-light[disabled] { opacity: .55; cursor: wait; transform: none; }

.btn-small { padding: .7rem 1.15rem; font-size: .85rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(16,24,29,.02), 0 12px 32px -24px rgba(16,24,29,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand img { width: auto; height: 40px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.2rem);
}
.site-nav a {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding-block: .4rem;
}
.site-nav a:hover { color: var(--teal-deep); text-decoration: none; }

.nav-cta a {
  font-family: var(--font-mono);
  font-size: .85rem;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: 2px;
  padding: .55rem .95rem;
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.nav-cta a:hover { border-color: var(--teal-deep); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .5rem .25rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-toggle-box { display: inline-flex; flex-direction: column; gap: 5px; width: 22px; }
.nav-toggle-box span {
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(3.5rem, 9vh, 6.5rem); }

.hero-lede {
  max-width: 58ch;
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.1rem;
}

.suppliers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .6rem;
  margin-top: 2.75rem;
}
.suppliers-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .2rem;
}
.supplier {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--slate);
  padding: .42rem .8rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}

.hero-media {
  margin: clamp(2.75rem, 7vh, 4.5rem) auto 0;
  max-width: calc(var(--container) + 6vw);
  padding-inline: clamp(.75rem, 2vw, 2rem);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 1920 / 910;
  object-fit: cover;
  border-radius: 2px;
}
.hero-media figcaption,
.tile figcaption {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
  padding-top: .8rem;
}
.hero-media figcaption { text-align: right; }

/* Stats strip */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(2.5rem, 6vh, 4rem) 0 0;
  border-block: 1px solid var(--line);
}
.stat {
  padding: 1.6rem 1.5rem 1.7rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat dd {
  margin: .55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
  color: var(--slate);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4.5rem, 11vh, 8rem); }
.section-tint { background: var(--tint); border-block: 1px solid var(--line); }
.section-tint + .section-tint,
.section-tint:first-child { border-top: 0; }

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }

/* ---------- Projects ---------- */

.clients { margin-bottom: clamp(2.5rem, 6vh, 4rem); }

.clients-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0;
}

.clients-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.clients-list li {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.25;
  padding: 1.35rem 1.75rem 1.45rem 0;
  border-bottom: 1px solid var(--line);
}
.clients-list li::before {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  margin-bottom: .85rem;
  background: linear-gradient(90deg, var(--teal) 0 50%, var(--slate) 50% 100%);
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
}
/* Bottom-align tiles so caption baselines meet across each row */
.tile { margin: 0; display: flex; flex-direction: column; }
.tile-media { margin-top: auto; }
.tile-a { grid-column: 1 / span 7; }
.tile-b { grid-column: 8 / span 5; }
.tile-c { grid-column: 1 / span 5; }
.tile-d { grid-column: 6 / span 7; }
.tile-e { grid-column: 1 / -1; }

.tile-media {
  overflow: hidden;
  border-radius: 2px;
  background: var(--pale);
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.tile:hover .tile-media img { transform: scale(1.035); }

.tile-a .tile-media img, .tile-d .tile-media img { aspect-ratio: 1400 / 990; }
.tile-b .tile-media img, .tile-c .tile-media img { aspect-ratio: 900 / 1270; }
.tile-e .tile-media img { aspect-ratio: 21 / 9; }

.tile figcaption {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .8rem;
}
.tile-index { color: var(--teal-deep); }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.25rem, 5vw, 4.5rem) clamp(2.25rem, 5vw, 5rem);
}

.service-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1rem;
}
.service-index {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--teal-deep);
}
.service-head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
}

.service-list li {
  position: relative;
  padding: .85rem 0 .9rem 1.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  transition: color .3s var(--ease);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--teal);
  transform: translateY(-50%) scaleX(.55);
  transform-origin: left center;
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.service-list li:hover { color: var(--ink); }
.service-list li:hover::before { transform: translateY(-50%) scaleX(1); background: var(--teal-deep); }

/* ---------- Service area / map ---------- */

.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: stretch;
}

.address-card {
  font-style: normal;
  margin-top: 2.5rem;
  padding: 1.75rem 1.85rem 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 2px;
}
.address-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
.address-line {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.3;
  margin-bottom: 1.1rem;
}
.address-contacts { margin-bottom: 1.5rem; }
.address-contacts li { padding-block: .2rem; }
.address-contacts a { color: var(--teal-deep); font-weight: 500; overflow-wrap: anywhere; }

.area-map {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--pale);
}
.area-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.04);
  transition: filter .45s var(--ease);
}
.area-map:hover iframe { filter: grayscale(0) contrast(1); }

/* ---------- Contact (dark band) ---------- */

.section-dark {
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, var(--dark), var(--dark-2));
  background-size: 72px 72px, 72px 72px, 100% 100%;
  color: #EAF2F4;
}
.section-dark h2 { color: #fff; }
.section-dark .section-lede { color: var(--muted-dark); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.75rem, 6vw, 6rem);
  align-items: start;
}

.contact-direct { margin: 2.5rem 0 0; }
.contact-direct > div {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact-direct > div:first-child { border-top: 1px solid var(--line-dark); }
.contact-direct dt {
  flex: 0 0 5.5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-dark);
  padding-top: .2rem;
}
.contact-direct dd { margin: 0; flex: 1 1 14rem; min-width: 0; }
.contact-direct dd, .contact-direct a { color: #fff; overflow-wrap: anywhere; }
.contact-direct a:hover { color: var(--pale); }

/* Form */

.contact-form {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line-dark);
  border-radius: 3px;
}

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { margin-bottom: 1.35rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.field label span { color: var(--pale); }

.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field input::placeholder, .field textarea::placeholder { color: rgba(234,242,244,.4); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255,255,255,.08);
}
.field input.invalid, .field textarea.invalid { border-color: #E08A7A; }

.contact-form .btn { width: 100%; margin-top: .35rem; }

.form-status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  font-size: .92rem;
  color: var(--pale);
}
.form-status.error { color: #F0B4A8; }
.form-status a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark-2);
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1fr;
  gap: 2.5rem;
  padding-block: clamp(3rem, 7vh, 4.5rem);
}

.footer-brand .bars { margin-bottom: 1.1rem; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: .3rem;
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--teal);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 1rem;
}
.footer-col li { padding-block: .28rem; font-size: .95rem; overflow-wrap: anywhere; }
.footer-col a { color: #E5EEF1; }
.footer-col a:hover { color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: .85rem;
}
.footer-legal p { margin: 0; }
.back-to-top { color: var(--muted-dark); font-family: var(--font-mono); font-size: .78rem; }
.back-to-top:hover { color: #fff; }

/* ---------- Motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.anim { animation: rise .9s var(--ease) both; }
.anim-1 { animation-delay: .05s; }
.anim-2 { animation-delay: .15s; }
.anim-3 { animation-delay: .28s; }
.anim-4 { animation-delay: .4s; }
.anim-5 { animation-delay: .5s; }
.anim-6 { animation-delay: .62s; }
.anim-7 { animation-delay: .75s; }

/* Reveal styles apply only when JS is running (html.js set in <head>) */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile-media img, .btn { transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .services-grid { gap: 2.5rem 2.5rem; }

  .area-grid, .contact-grid { grid-template-columns: 1fr; }
  .area-map { min-height: 0; height: clamp(320px, 70vw, 460px); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --header-h: 3.75rem; }

  .brand img { height: 32px; }

  /* Mobile nav */
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px -24px rgba(16,24,29,.28);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .site-nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
  }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: block; padding: 1rem 0; font-size: 1.05rem; }
  .nav-cta { margin-top: .85rem; }
  .nav-cta a { display: block; text-align: center; padding: .9rem 1rem; border-color: var(--ink); }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.25rem 1rem 1.35rem 1.25rem; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

  /* Hero caption reads better left-aligned than crowding the right edge */
  .hero-media figcaption { text-align: left; }

  /* Gallery collapses to a single column (drop the 12-track desktop grid,
     whose min-content floor overflowed narrow phones) */
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .tile { min-width: 0; }
  .tile-a, .tile-b, .tile-c, .tile-d, .tile-e { grid-column: 1 / -1; }
  .tile-b .tile-media img, .tile-c .tile-media img { aspect-ratio: 4 / 4.6; }
  .tile-e .tile-media img { aspect-ratio: 16 / 10; }

  .services-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 2.25rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }

  .hero-actions .btn { flex: 1 1 100%; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 1.35rem; }

  .stats { grid-template-columns: 1fr 1fr; }

  .clients-list { grid-template-columns: 1fr; }

  .footer-legal { flex-direction: column; align-items: flex-start; }
}
