/* Ariana Electrical — one page, no build step.
   Values match the Next.js app this replaced (NikzadOS apps/ariana-electrical).
   Breakpoints: 640px (sm), 768px (md), 1024px (lg). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

/* Arial tuned to Inter's metrics, so the swap does not shift the layout. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  color-scheme: light;

  --primary: oklch(0.22 0.065 264);
  --primary-foreground: oklch(0.985 0 264);
  --highlight: oklch(0.94 0.17 123);
  --highlight-foreground: oklch(0.145 0 0);
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --border: oklch(0.922 0 0);

  --chrome-nav-top: oklch(from var(--primary) calc(l * 0.72) c h);
  --chrome-nav-scrolled: oklch(from var(--chrome-nav-top) l c h / 96%);
  --chrome-foreground: oklch(0.985 0 264);
  --chrome-border: oklch(0.985 0 264 / 8%);

  --content-max-w: 72rem;
  --gutter: 1rem;
  --nav-h: 2.75rem;
  --photo-radius: 0.2232rem;

  --ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-standard: cubic-bezier(0.22, 0.9, 0.28, 1);
  --duration-slowest: 1s;
  --duration-glacial: 4s;
  --duration-crawl: 2s;
  --delay-short: 40ms;

  --font: "Inter", "Inter Fallback", system-ui, sans-serif;
}

@media (min-width: 640px) {
  :root {
    --gutter: 1.5rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 2rem;
  }
}

/* ---------- Base ---------- */

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

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

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

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

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

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  letter-spacing: -0.04em;
}

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

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

/* ---------- Nav ---------- */

/* Fixed, not sticky: the bar holds still while the page rubber-bands under
   it. The spacer keeps its height in flow. */
.nav-spacer {
  height: var(--nav-h);
  flex-shrink: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  isolation: isolate;
}

.site-header__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: transparent;
  transition:
    background-color var(--duration-crawl) var(--ease-standard),
    backdrop-filter var(--duration-crawl) var(--ease-standard);
}

.site-header.is-scrolled .site-header__backdrop {
  background-color: var(--chrome-nav-scrolled);
  backdrop-filter: blur(8px);
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  min-height: 2.75rem;
  flex-shrink: 1;
  color: var(--chrome-foreground);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand__logo {
  height: 1.25rem;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.brand__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  color: var(--chrome-foreground);
  font-size: 0.75rem;
  line-height: 1rem;
  white-space: nowrap;
  /* Faux bold that does not change the link's width. */
  text-shadow:
    -0.3px 0 0 currentColor,
    0.3px 0 0 currentColor;
  transition: color var(--duration-crawl) var(--ease-standard);
}

.nav-link:hover {
  color: var(--highlight);
}

@media (min-width: 640px) {
  .site-header__bar {
    gap: 1rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand__logo {
    height: 1.5rem;
  }

  .brand__name {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .nav-list {
    gap: 0.25rem;
  }

  .nav-link {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .brand__name {
    font-size: 1.25rem;
  }
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(var(--nav-h) * -1);
  padding: var(--nav-h) var(--gutter) 0;
  background-color: var(--primary);
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* site.js moves this layer at 0.55× scroll for a slow parallax. */
.hero__parallax {
  position: absolute;
  inset-inline: 0;
  top: -30%;
  height: 160%;
}

.hero__parallax.is-moving {
  will-change: transform;
}

.hero__shimmer {
  position: absolute;
  inset: 0;
  background-color: var(--primary);
  background-image: linear-gradient(
    125deg,
    var(--primary) 0%,
    color-mix(in oklch, var(--highlight) 42%, var(--primary)) 26%,
    var(--primary) 48%,
    color-mix(in oklch, var(--highlight) 32%, var(--primary)) 70%,
    var(--primary) 100%
  );
  background-size: 260% 260%;
  animation: hero-shimmer calc(var(--duration-glacial) * 6) var(--ease-standard)
    infinite alternate;
}

@keyframes hero-shimmer {
  from {
    background-position: 0% 35%;
  }

  to {
    background-position: 100% 65%;
  }
}

.hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-block: 4rem;
}

.hero__title {
  max-width: 56rem;
  color: var(--primary-foreground);
  font-size: 2.25rem;
  animation: fade-in var(--duration-glacial) var(--ease-emphasized) both;
}

.hero__lead {
  max-width: 42rem;
  margin-top: 1.5rem;
  color: var(--primary-foreground);
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  margin-top: 2.5rem;
  padding-inline: 2.5rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background-color: var(--highlight);
  color: var(--highlight-foreground);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.hero__cta:hover {
  background-color: color-mix(in oklch, var(--highlight) 90%, transparent);
}

.reveal-child {
  animation: rise-in var(--duration-slowest) ease both;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .hero__content {
    padding-block: 6rem 4rem;
  }

  .hero__title {
    font-size: 3.75rem;
  }

  .hero__lead {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero__content {
    padding-block: 8rem 5rem;
  }

  .hero__title {
    font-size: 4.5rem;
  }
}

.not-found {
  min-height: 100dvh;
  margin-top: 0;
  padding-top: 0;
}

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

.section {
  scroll-margin-top: 6rem;
  border-top: 1px solid var(--border);
  background-color: var(--background);
}

.section__inner {
  padding-block: 4rem;
}

.section__inner.section__inner--leading {
  padding-block: 1rem 4rem;
}

.section__title {
  font-size: 1.875rem;
}

.section__body {
  margin-top: 2.5rem;
}

.lead {
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.625;
}

.services {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.service {
  padding-left: 1.25rem;
  border-left: 4px solid var(--primary);
}

.service h3 {
  font-size: 1.125rem;
}

.service p {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .section__inner {
    padding-block: 5rem;
  }

  .section__inner.section__inner--leading {
    padding-block: 1.25rem 5rem;
  }

  .section__title {
    font-size: 2.25rem;
  }

  .services {
    gap: 2rem;
  }

  .service {
    padding-left: 1.5rem;
  }

  .service h3 {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .section__inner {
    padding-block: 6rem;
  }

  .section__inner.section__inner--leading {
    padding-bottom: 6rem;
  }
}

/* ---------- Photo strip ----------
   The track slides sideways forever. Corners are rounded on the <img>
   itself, because an ancestor's transform drops overflow clipping. */

.marquee {
  position: relative;
  overflow-x: hidden;
  width: 100%;
  margin-bottom: 1.5rem;
  padding-block: 1.5rem;
}

.marquee__fade {
  position: absolute;
  inset-block: 0;
  z-index: 40;
  width: 4rem;
  pointer-events: none;
}

.marquee__fade--left {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.marquee__fade--right {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

/* Spacing is each photo's right margin, not `gap`: the track is then two
   identical halves, so sliding by -50% loops with no visible jump. */
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee calc(var(--duration-glacial) * 5) linear infinite;
}

/* Pause only while a photo itself is hovered, not the padded edges. */
.marquee__track:has(.photo:hover) {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.photo {
  position: relative;
  flex: none;
  width: 9rem;
  margin-right: 1rem;
  aspect-ratio: 4 / 3;
  transform-origin: center;
  transition: transform var(--duration-slowest) var(--ease-emphasized);
}

/* Grow in place over the neighbours. Changing margins here would slide the
   photo out from under the pointer and make it flicker on and off. */
.photo:hover {
  z-index: 50;
  transform: scale(1.4);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--photo-radius);
}

@media (min-width: 640px) {
  .marquee {
    padding-block: 2rem;
  }

  .marquee__fade {
    width: 5rem;
  }

  .photo {
    width: 10rem;
  }
}

@media (min-width: 768px) {
  .marquee {
    margin-bottom: 2rem;
    padding-block: 2.5rem;
  }

  .marquee__fade {
    width: 6rem;
  }

  .photo {
    width: 12rem;
  }
}

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

.footer {
  scroll-margin-top: 6rem;
  border-top: 1px solid var(--chrome-border);
  background-color: var(--chrome-nav-top);
  color: var(--chrome-foreground);
}

.kicker,
.contact__label {
  display: block;
  color: var(--highlight);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.footer__title {
  margin-top: 0.5rem;
  font-size: 1.875rem;
}

.footer__bar {
  width: 4rem;
  height: 0.25rem;
  margin-top: 1rem;
  border-radius: 9999px;
  background-color: var(--highlight);
}

.footer__lead {
  max-width: 42rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
}

.contact {
  display: grid;
  gap: 1.25rem;
  max-width: 28rem;
  margin-top: 2rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-underline-offset: 4px;
}

.contact__link:hover {
  color: var(--highlight);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .footer__title {
    font-size: 2.25rem;
  }
}

/* ---------- Entrance motion ---------- */

.section-reveal {
  animation: rise-in var(--duration-slowest) var(--ease-emphasized) both;
  animation-delay: calc(var(--reveal-order, 0) * 6 * var(--delay-short));
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .reveal-child,
  .section-reveal {
    animation: none;
  }

  .hero__bg {
    display: none;
  }

  .nav-link,
  .site-header__backdrop {
    transition: none;
  }

  /* No auto-scroll: the strip becomes a normal scrollable row. */
  .marquee {
    overflow-x: auto;
  }

  .marquee__track {
    animation: none;
  }

  .photo--duplicate {
    display: none;
  }

  .photo {
    transition: none;
  }

  .photo:hover {
    transform: none;
  }
}
