/* Hugo Maldonado — maintenance landing */

:root {
  --bg: #000000;
  --text: #f3f3f3;
  --text-soft: rgba(243, 243, 243, .82);
  --muted: rgba(243, 243, 243, .56);
  --line: rgba(255, 255, 255, .16);
  --track: rgba(255, 255, 255, .14);
  --thumb: #f2f2f0;
  --thumb-shadow: rgba(0, 0, 0, .25);
  --focus: rgba(255, 255, 255, .75);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="light"] {
  --bg: #f4efe6;
  --text: #121212;
  --text-soft: rgba(18, 18, 18, .78);
  --muted: rgba(18, 18, 18, .52);
  --line: rgba(18, 18, 18, .18);
  --track: rgba(18, 18, 18, .12);
  --thumb: #151515;
  --thumb-shadow: rgba(255, 255, 255, .3);
  --focus: rgba(18, 18, 18, .7);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  transition: background-color .8s var(--ease), color .7s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 2.4vw, 34px);
  overflow: hidden;
  isolation: isolate;
}

.background,
.bg,
.shade {
  position: absolute;
  inset: 0;
}

.background {
  z-index: -3;
  overflow: hidden;
  background: var(--bg);
  transition: background-color .5s var(--ease);
}

.bg {
  background-size: cover;
  background-position: center center;
  transform: scale(1.01);
  transition:
    opacity 1.15s var(--ease),
    transform 1.35s var(--ease),
    filter 1.15s var(--ease);
  will-change: opacity, transform;
}

.bg-dark {
  background-image: url("assets/coal-dark-desktop.webp");
  opacity: 1;
  filter: brightness(1) contrast(1);
}

.bg-light {
  background-image: url("assets/coal-light-desktop.webp");
  opacity: 0;
  filter: brightness(.96) contrast(1.02);
}

html[data-theme="light"] .bg-dark {
  opacity: 0;
  transform: scale(1.03);
  filter: brightness(.78) contrast(1.08);
}

html[data-theme="light"] .bg-light {
  opacity: 1;
  transform: scale(1.01);
  filter: brightness(1) contrast(1);
}

/* The overlay follows the theme rather than inverting the photography. */
.shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,.91) 0%, rgba(0,0,0,.72) 34%, rgba(0,0,0,.34) 62%, rgba(0,0,0,.05) 100%),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.22));
  transition: background 1.05s var(--ease), opacity 1.05s var(--ease);
}

html[data-theme="light"] .shade {
  background:
    linear-gradient(90deg, rgba(247,242,233,.92) 0%, rgba(247,242,233,.73) 37%, rgba(247,242,233,.29) 67%, rgba(247,242,233,.03) 100%),
    linear-gradient(180deg, rgba(247,242,233,.07), rgba(247,242,233,.16));
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.topbar {
  min-height: 44px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  transition: border-color .75s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  width: 32px;
  height: 32px;
}

.logo {
  position: absolute;
  display: block;
  width: 29px;
  height: auto;
  object-fit: contain;
  transition:
    opacity .72s var(--ease),
    transform .85s var(--ease);
}

.logo-dark {
  opacity: 1;
  transform: scale(1);
}

.logo-light {
  opacity: 0;
  transform: scale(.88);
}

html[data-theme="light"] .logo-dark {
  opacity: 0;
  transform: scale(.88);
}

html[data-theme="light"] .logo-light {
  opacity: 1;
  transform: scale(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-status,
.footer,
.eyebrow,
.label,
.type {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 4px;
  display: grid;
  grid-template-columns: 20px 40px 20px;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 4px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  transition:
    color .65s var(--ease),
    opacity .65s var(--ease),
    transform .8s var(--ease);
}

.theme-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.theme-icon-moon {
  color: var(--text);
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-sun {
  opacity: .42;
  transform: rotate(-25deg) scale(.88);
}

html[data-theme="light"] .theme-icon-moon {
  opacity: .38;
  transform: rotate(18deg) scale(.9);
}

html[data-theme="light"] .theme-icon-sun {
  color: var(--text);
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  border: 1px solid var(--line);
  background: var(--track);
  border-radius: 999px;
  transition:
    border-color .7s var(--ease),
    background-color .7s var(--ease);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--thumb);
  box-shadow: 0 1px 5px var(--thumb-shadow);
  transform: translateX(0);
  transition:
    transform .62s var(--ease),
    background-color .7s var(--ease),
    box-shadow .7s var(--ease);
}

html[data-theme="light"] .toggle-thumb {
  transform: translateX(18px);
}

.content {
  align-self: center;
  position: relative;
  z-index: 3;
  width: min(760px, 62vw);
  padding: clamp(42px, 7vh, 88px) 0;
}

.eyebrow,
.label {
  margin: 0;
}

h1 {
  margin: 14px 0 12px;
  max-width: 9ch;
  font-size: clamp(58px, 8.8vw, 142px);
  line-height: .88;
  letter-spacing: -.065em;
  font-weight: 500;
}

h1 strong {
  font-weight: 760;
}

.status {
  margin: 22px 0 0;
  font-size: clamp(22px, 2.3vw, 36px);
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--text-soft);
  transition: color .7s var(--ease);
}

.contacts {
  margin-top: clamp(48px, 8vh, 88px);
  width: min(680px, 100%);
  border-top: 1px solid var(--line);
  transition: border-color .75s var(--ease);
}

.contacts .label {
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--line);
  transition: border-color .75s var(--ease);
}

.contacts a {
  display: grid;
  grid-template-columns: 170px 1fr 22px;
  gap: 24px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .75s var(--ease);
}

.value {
  font-size: clamp(16px, 1.45vw, 22px);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  transition: opacity .22s ease, transform .35s var(--ease);
}

.arrow {
  font-size: 15px;
  color: var(--muted);
  transition: transform .35s var(--ease), color .35s ease;
}

.footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  transition: border-color .75s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .contacts a:hover .value {
    opacity: .68;
    transform: translateX(3px);
  }

  .contacts a:hover .arrow {
    color: var(--text);
    transform: translate(2px, -2px);
  }

  .theme-toggle:hover .toggle-track {
    background: color-mix(in srgb, var(--track) 70%, var(--text) 8%);
  }
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 18px;
  }

  .bg-dark {
    background-image: url("assets/coal-dark-mobile.webp");
    background-position: center center;
  }

  .bg-light {
    background-image: url("assets/coal-light-mobile.webp");
    background-position: center center;
  }

  .shade {
    background:
      linear-gradient(180deg, rgba(0,0,0,.80) 0%, rgba(0,0,0,.54) 40%, rgba(0,0,0,.57) 100%),
      linear-gradient(90deg, rgba(0,0,0,.61), rgba(0,0,0,.16));
  }

  html[data-theme="light"] .shade {
    background:
      linear-gradient(180deg, rgba(247,242,233,.88) 0%, rgba(247,242,233,.58) 42%, rgba(247,242,233,.66) 100%),
      linear-gradient(90deg, rgba(247,242,233,.66), rgba(247,242,233,.16));
  }

  .site-status {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .theme-toggle {
    grid-template-columns: 18px 38px 18px;
    gap: 3px;
  }

  .toggle-track {
    width: 38px;
  }

  html[data-theme="light"] .toggle-thumb {
    transform: translateX(16px);
  }

  .content {
    width: 100%;
    padding: 54px 0 64px;
  }

  h1 {
    max-width: 7ch;
    font-size: clamp(50px, 16vw, 88px);
  }

  .status {
    max-width: 14ch;
  }

  .contacts {
    margin-top: 44px;
  }

  .contacts a {
    grid-template-columns: 1fr 22px;
    gap: 7px 12px;
  }

  .contacts .type {
    grid-column: 1 / -1;
  }

  .contacts .value {
    grid-column: 1;
  }

  .contacts .arrow {
    grid-column: 2;
    grid-row: 2;
  }

  .footer span:last-child {
    display: none;
  }
}

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


/* Smooth theme morph */
.content,
.topbar,
.footer,
.contacts,
.contacts .label,
.contacts a,
.status,
.site-status,
.eyebrow,
.label,
.type,
.arrow {
  transition:
    color .72s var(--ease),
    border-color .72s var(--ease),
    background-color .72s var(--ease),
    opacity .72s var(--ease);
}
