/* ============================================================
   Dawnmark Industries — dawnmark.com.au
   Dark corporate design system
   Brand: Industries navy #33415C · Group grey #5B606C · B/W
   ============================================================ */

:root {
  --ink-0: #04060b;          /* page base — near black, navy cast */
  --ink-1: #070b13;          /* section base */
  --ink-2: #0b1120;          /* raised panel */
  --ink-3: #111a2e;          /* hover panel */
  --navy: #33415c;           /* brand primary */
  --navy-bright: #4d6188;    /* lifted navy for lines/glows */
  --steel: #8fa3c8;          /* readable navy tint */
  --grey: #5b606c;           /* Dawnmark Group grey */
  --white: #f4f6fa;
  --muted: #9aa3b2;
  --faint: #5d6575;
  --hairline: rgba(244, 246, 250, 0.08);
  --hairline-strong: rgba(244, 246, 250, 0.14);
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--ink-0);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--navy); color: var(--white); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Preloader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink-0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader__mark {
  width: clamp(240px, 34vw, 460px);
  height: auto;
  opacity: 0;
  transform: scale(0.95);
}

.loader__line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--navy-bright);
}

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

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 4vw, 56px);
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(4, 6, 11, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
  padding-top: 14px;
  padding-bottom: 14px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__brand img { height: 44px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav__link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav__link:hover { color: var(--white); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, color 0.35s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
}

.btn:hover { border-color: var(--navy-bright); }
.btn:hover::before { transform: translateY(0); }

.btn--solid { background: var(--navy); border-color: var(--navy); }
.btn--solid::before { background: var(--navy-bright); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Section scaffolding ---------- */

.section {
  position: relative;
  padding: clamp(96px, 12vw, 180px) clamp(24px, 4vw, 56px);
}

.container { max-width: 1320px; margin: 0 auto; }

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 28px;
}

.kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--navy-bright);
}

.h-display {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.h-section {
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 640px;
}

.line-mask { overflow: hidden; display: block; }
.line-mask > span { display: block; will-change: transform; }

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 160px clamp(24px, 4vw, 56px) 120px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 163, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 200, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 20%, transparent 75%);
}

.hero__glow {
  position: absolute;
  top: -20%;
  right: -12%;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(circle, rgba(51, 65, 92, 0.55) 0%, rgba(51, 65, 92, 0.14) 40%, transparent 68%);
  filter: blur(40px);
}

.hero__map {
  position: absolute;
  top: 52%;
  right: clamp(-60px, -1.5vw, 0px);
  transform: translateY(-50%);
  width: clamp(520px, 56vw, 1060px);
  aspect-ratio: 1.07;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, black 72%, transparent 100%);
  mask-image: linear-gradient(to left, black 72%, transparent 100%);
}

@media (max-width: 1024px) {
  .hero__map { opacity: 0.55; width: 78vw; right: -12vw; }
}

@media (max-width: 760px) {
  .hero__map { opacity: 0.4; width: 125vw; right: -22vw; top: 58%; }
}

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

.hero__title {
  font-weight: 800;
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 36px;
  max-width: 13ch;
}

.hero__title .accent { color: var(--steel); }

.hero__sub {
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 48px;
}

.hero__actions { display: flex; gap: 18px; flex-wrap: wrap; }

.hero__meta {
  position: absolute;
  bottom: 40px;
  left: clamp(24px, 4vw, 56px);
  right: clamp(24px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: var(--hairline-strong);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--steel);
  animation: scrollhint 2.2s var(--ease-out) infinite;
}

@keyframes scrollhint {
  0% { top: -100%; }
  55% { top: 0; }
  100% { top: 100%; }
}

/* ---------- Trust strip ---------- */

.strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--ink-1);
}

.strip__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.strip__item {
  padding: 44px 32px;
  border-left: 1px solid var(--hairline);
}
.strip__item:first-child { border-left: 0; }

.strip__value {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.strip__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Capabilities ---------- */

.caps { background: var(--ink-0); }

.caps__head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}

.caps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.cap {
  background: var(--ink-1);
  padding: clamp(36px, 3.6vw, 56px);
  position: relative;
  overflow: hidden;
  transition: background 0.45s ease;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.cap:hover { background: var(--ink-2); }

.cap__num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--steel);
  margin-bottom: clamp(48px, 6vw, 88px);
}

.cap__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  color: var(--steel);
}

.cap__title {
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.cap__body {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 32px;
  flex-grow: 1;
}

.cap__list {
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.cap__list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cap__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--navy-bright);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.cap__edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--navy-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.cap:hover .cap__edge { transform: scaleX(1); }

/* ---------- CivilSuite / portfolio ---------- */

.portfolio { background: var(--ink-1); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

.portfolio__card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}

.portfolio__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

.portfolio__name {
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 24px;
}

.portfolio__body { color: var(--muted); font-size: clamp(16px, 1.4vw, 18.5px); margin-bottom: 40px; max-width: 520px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid var(--navy-bright);
  padding-bottom: 8px;
  transition: gap 0.3s var(--ease-out), color 0.3s ease;
}

.link-arrow svg { transition: transform 0.3s var(--ease-out); }
.link-arrow:hover { gap: 18px; color: var(--steel); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

.portfolio__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, var(--ink-2) 0%, var(--navy) 160%);
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portfolio__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244,246,250,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,246,250,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

.portfolio__visual-mark {
  width: 38%;
  opacity: 0.9;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.5));
}

.portfolio__visual-name {
  position: absolute;
  bottom: 28px;
  left: 32px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.portfolio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid var(--hairline-strong);
  padding: 8px 14px;
  border-radius: 2px;
}

/* ---------- Principles ---------- */

.principles__head { max-width: 720px; margin-bottom: clamp(56px, 7vw, 96px); }

.principles__rows { border-top: 1px solid var(--hairline); }

.principle {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(36px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}

.principle__num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--faint);
  padding-top: 6px;
}

.principle__title {
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.principle__body { color: var(--muted); font-size: 16px; max-width: 560px; }

/* ---------- Contact ---------- */

.contact { text-align: left; overflow: hidden; position: relative; }

.contact__glow {
  position: absolute;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(51, 65, 92, 0.4) 0%, transparent 65%);
  filter: blur(50px);
  pointer-events: none;
}

.contact__title {
  font-weight: 800;
  font-size: clamp(44px, 7vw, 110px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
  max-width: 12ch;
}

.contact__title .accent { color: var(--steel); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.contact__note { color: var(--muted); max-width: 440px; font-size: 17px; }

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.form__field input,
.form__field textarea {
  font-family: var(--font);
  font-size: 15.5px;
  color: var(--white);
  background: var(--ink-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  padding: 15px 16px;
  transition: border-color 0.3s ease, background 0.3s ease;
  resize: vertical;
}

.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--navy-bright);
  background: var(--ink-3);
}

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

.form__submit { align-self: flex-start; }
.form__submit:disabled { opacity: 0.55; cursor: wait; }

.form__status {
  font-size: 14.5px;
  color: var(--steel);
  min-height: 22px;
}
.form__status.is-error { color: #c88f8f; }

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

.footer {
  border-top: 1px solid var(--hairline);
  padding: 56px clamp(24px, 4vw, 56px) 40px;
  background: var(--ink-0);
}

.footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer__brand img { height: 60px; width: auto; margin-bottom: 18px; }

.footer__tag { font-size: 13px; color: var(--faint); max-width: 300px; }

.footer__cols { display: flex; gap: clamp(40px, 6vw, 100px); flex-wrap: wrap; }

.footer__col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}

.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 5px 0;
  transition: color 0.25s ease;
}
.footer__col a:hover { color: var(--white); }

.footer__address {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 5px 0;
  line-height: 1.7;
}

.footer__base {
  max-width: 1320px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
}

/* ---------- Reveal defaults (JS toggles) ---------- */

.js .reveal { opacity: 0; }
.js .line-mask > span { transform: translateY(110%); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .caps__head { grid-template-columns: 1fr; gap: 28px; }
  .caps__grid { grid-template-columns: 1fr; }
  .cap { min-height: 0; }
  .portfolio__card { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .principle { grid-template-columns: 48px 1fr; }
  .principle__body { grid-column: 2; }
  .strip__inner { grid-template-columns: 1fr 1fr; }
  .strip__item:nth-child(3) { border-left: 0; }
  .strip__item { border-top: 1px solid var(--hairline); }
  .strip__item:nth-child(-n+2) { border-top: 0; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(4, 6, 11, 0.97);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav__link { font-size: 18px; }
  .nav-toggle { display: block; position: relative; z-index: 110; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero__meta { display: none; }
  .strip__inner { grid-template-columns: 1fr; }
  .strip__item { border-left: 0; border-top: 1px solid var(--hairline); padding: 32px 24px; }
  .strip__item:first-child { border-top: 0; }
  .form__row { grid-template-columns: 1fr; }
  .header__brand img { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
