/* Teknikin — all styles.
   Translated from the styled-components definitions in the old Next.js app.
   Every original block was static (no prop interpolation), so this is a
   1:1 conversion: nested `&` selectors unnested, component names now classes. */

/* ---------- global (was Layout.js <style jsx global>) ---------- */

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
.site-title,
.subheading .word {
  font-family: "Roboto Mono", monospace;
  font-weight: 300;
  margin: 0;
}

/* Visible to screen readers and search engines, not to the eye. Used for the
   per-page <h1> on pages whose design has no visible heading. Unlike
   display:none this is still announced. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Was Layout.js `Grid`, plus the #__next / .root height rules it depended on. */
.layout {
  max-width: 56em;
  margin: 0 auto;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ---------- header / nav / subheading (Header.js, Nav.js, SubHeading.js) ---------- */

.site-header {
  width: 100%;
  padding: 12px;
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .site-header {
    padding: 24px;
  }
}

.site-title {
  font-size: calc(24px + (39 - 24) * ((100vw - 300px) / (1600 - 300)));
}

.site-title a {
  text-decoration: none;
  color: #000;
}

.site-nav {
  font-family: "Roboto Mono", monospace;
  font-weight: 300;
  margin: 0 auto 24px;
  padding: 10px 0;
  border-bottom: 1px solid #000;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .site-nav {
    max-width: 50%;
  }
}

.site-nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.site-nav li > a {
  font-size: calc(14px + (16 - 14) * ((100vw - 300px) / 1300));
  text-decoration: none;
  color: #999;
}

.site-nav li > a.active {
  color: #000;
}

.subheading {
  text-align: center;
}

.subheading .word {
  display: inline-block;
  font-size: calc(12px + (14 - 12) * ((100vw - 300px) / (1600 - 300)));
  font-weight: 300;
}

.subheading span {
  display: inline-block;
  margin: 0 8px;
}

@media (min-width: 768px) {
  .subheading span {
    margin: 0 13px;
    font-size: 15px;
    font-weight: 500;
  }
}

/* ---------- footer (Footer.js) ---------- */

.site-footer {
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  font-size: calc(12px + (14 - 12) * ((100vw - 300px) / (1600 - 300)));
  margin-top: auto;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 24px;
  }
}

.site-footer .locations {
  text-transform: uppercase;
}

.site-footer .locations span {
  margin: 0 2px;
}

@media (min-width: 768px) {
  .site-footer .locations span {
    margin: 0 4px;
  }
}

/* ---------- hero slider (HeroSlider.js — replaces react-slick + slick.css) ---------- */

.hero {
  height: calc(100% - 119px - 69px);
  padding: 0 16px;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    height: calc(100% - 160px - 90px);
  }
}

.hero-track {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Slides stack on top of each other and crossfade. `speed: 2000` in the old
   react-slick config becomes this transition duration. */
.hero-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 2000ms ease-in-out;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  align-self: center;
}

@media (min-width: 768px) {
  .hero-slide {
    display: block;
  }

  .hero-slide img {
    width: auto;
    height: 100%;
    margin: 0 auto;
  }
}

/* Was CustomArrow: two invisible half-width click zones. Buttons rather than
   divs so the carousel can be reached from the keyboard. */
.hero-arrow {
  width: 50%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  cursor: pointer;
  z-index: 10;
  border: 0 none;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.hero-arrow.prev {
  left: 0;
}

.hero-arrow.next {
  right: 0;
}

.hero-arrow:focus-visible {
  outline: 2px solid #000;
  outline-offset: -4px;
}

/* ---------- shared page wrapper (the three CenterContent definitions) ---------- */

.center-content {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.center-content .left-column,
.center-content .right-column {
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .center-content {
    width: 80%;
  }
}

@media (min-width: 1024px) {
  .center-content {
    width: 100%;
    padding: 0;
  }
}

/* ---------- services page ---------- */

.center-content.services {
  margin-top: 60px;
}

@media (min-width: 1024px) {
  .center-content.services {
    display: flex;
    justify-content: space-between;
  }

  .center-content.services .column {
    width: 45%;
  }

  .center-content.services .left-column {
    margin-right: 8px;
    margin-bottom: 60px;
    order: 2;
    width: 35%;
  }

  .center-content.services .left-column ul {
    margin-top: 0;
  }

  .center-content.services .right-column {
    margin-bottom: 60px;
    margin-left: 8px;
    order: 1;
    width: 55%;
  }
}

.center-content.services p {
  margin-top: 0;
  line-height: 1.6;
  text-align: justify;
}

.center-content.services li {
  margin-bottom: 24px;
}

/* ---------- testimonials page ---------- */

.testimonial {
  quotes: "\201C" "\201D";
  margin-left: 0;
  margin-right: 0;
}

.testimonial:before {
  content: "";
  display: block;
  margin: 72px auto;
  max-width: 120px;
  border-top: dashed 1px #000;
}

.testimonial:last-of-type {
  margin-bottom: 72px;
}

.testimonial:last-of-type:after {
  content: "";
  display: block;
  margin: 72px auto;
  max-width: 120px;
  border-top: dashed 1px #000;
}

.testimonial p {
  text-align: center;
  margin-top: 0;
  line-height: 1.6;
  font-size: calc(12px + (16 - 12) * ((100vw - 300px) / (1600 - 300)));
}

.testimonial .quotes {
  position: relative;
  display: block;
  text-decoration: none;
  color: black;
}

.testimonial .quotes:active,
.testimonial .quotes:visited {
  color: black;
}

.testimonial .quotes:before {
  content: open-quote;
  font-family: auto;
  font-size: 30px;
  line-height: 0;
  position: absolute;
  right: 100%;
  color: #666;
}

.testimonial .quotes:after {
  content: close-quote;
  font-family: auto;
  font-size: 30px;
  line-height: 0;
  position: absolute;
  left: 100%;
  bottom: 40px;
  color: #666;
}

.testimonial span {
  display: block;
  width: 100%;
  text-align: center;
  color: #000;
  font-size: calc(12px + (16 - 12) * ((100vw - 300px) / (1600 - 300)));
}

/* The live site shows the attribution in italics. Targeted at [rel="author"]
   so it doesn't catch the span.quotes wrapper the second testimonial uses. */
.testimonial span[rel="author"] {
  font-style: italic;
}

/* ---------- work page (work.js Grid) ---------- */

.work-grid {
  margin: 50px auto 0;
  max-width: 100%;
  padding-inline: 8px;
}

/* One column on narrow screens, three from 640px up. Multi-column rather than
   grid because that reproduces the live site's fill order: items run down
   column one, then column two, then column three. */
.work-grid > div {
  columns: 1;
  column-gap: 6px;
}

.work-grid a {
  display: block;
  margin-bottom: 6px;
  break-inside: avoid;
}

@media (min-width: 640px) {
  .work-grid {
    padding: 0;
  }

  .work-grid > div {
    columns: 3;
  }
}

.work-grid img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- lightbox (replaces react-lightgallery) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 92vw;
  max-height: 88vh;
  display: block;
  transition: opacity 200ms ease, transform 200ms ease;
}

.lightbox-stage img.is-sliding {
  opacity: 0;
  transform: translateX(-24px);
}

.lightbox button {
  position: absolute;
  border: 0 none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: "Roboto Mono", monospace;
  font-size: 28px;
  line-height: 1;
  padding: 16px;
}

.lightbox button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.lightbox-close {
  top: 8px;
  right: 8px;
}

.lightbox-prev {
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  top: 18px;
  left: 16px;
  color: #fff;
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
}

body.lightbox-open {
  overflow: hidden;
}

/* ---------- contact page + form (contact.js CenterContent, Form.js) ---------- */

.center-content.contact .inline-contact {
  list-style: none;
  padding: 0;
  margin: 60px 0 70px;
}

.center-content.contact a {
  text-decoration: none;
  color: black;
  font-size: calc(12px + (16 - 12) * ((100vw - 300px) / (1600 - 300)));
}

@media (min-width: 768px) {
  .center-content.contact {
    width: 60%;
  }
}

@media (min-width: 1024px) {
  .center-content.contact {
    width: 60%;
    padding: 0;
  }
}

.inline-contact {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

.inline-contact li {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

@media (min-width: 480px) {
  .inline-contact {
    flex-direction: row;
  }
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-inline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-direction: column;
}

@media (min-width: 480px) {
  .form-inline {
    flex-direction: row;
  }
}

.form-row {
  position: relative;
  height: 42px;
  font-family: "Roboto Mono", monospace;
}

.form-row.inline {
  width: 100%;
}

.form-row.textarea {
  height: 72px;
}

.form-row label {
  position: absolute;
  left: 0;
  top: 10px;
  width: 100%;
  transition: all 0.16s;
  font-family: "Roboto Mono", monospace;
}

.form-row label span {
  color: red;
}

@media (min-width: 768px) {
  .form-row label {
    font-size: 14px;
  }
}

.form-row input,
.form-row textarea {
  border: 0 none;
  border-bottom: solid 1px #999;
  position: absolute;
  width: 100%;
  background-color: transparent;
  font-size: 16px;
  font-family: "Roboto Mono", monospace;
  bottom: 0;
  box-sizing: border-box;
}

.form-row input {
  height: 32px;
}

.form-row textarea {
  resize: none;
  height: 72px;
}

.form-row input:-webkit-autofill,
.form-row input:-webkit-autofill:hover,
.form-row input:-webkit-autofill:focus,
.form-row input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
  box-shadow: 0 0 0 30px white inset !important;
}

.form-row input:invalid {
  box-shadow: none;
}

/* The placeholder is a single space on every field, so :placeholder-shown is
   true only while the field is empty. This replaces the `filled` class the old
   React form toggled from state — the floating label now needs no JavaScript. */
.form-row input,
.form-row textarea {
  outline: none;
}

.form-row input:focus + label,
.form-row textarea:focus + label,
.form-row input:not(:placeholder-shown) + label,
.form-row textarea:not(:placeholder-shown) + label {
  font-size: 12px;
  top: -10px;
  left: 0;
  color: #999;
}

/* Only flag a required field once it has been touched and left empty, so
   nothing is red on first paint. */
.form-row input:required:invalid:not(:placeholder-shown) {
  border-color: red;
  color: red;
}

.form-row input:required:invalid:not(:placeholder-shown) + label {
  color: red;
}

.form-button {
  border: 0 none;
  height: 32px;
  background-color: transparent;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
}

/* ---------- thank-you message (Message.js) ---------- */

.message {
  border-radius: 3px;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 24px;
}

.message h2 {
  font-size: 18px;
}

.message p {
  font-size: 14px;
}

/* ---------- simple centred pages (thank you, 404) ---------- */

.center-content.simple {
  margin-top: 80px;
  text-align: center;
}

.center-content.simple p {
  line-height: 1.6;
  font-size: calc(12px + (16 - 12) * ((100vw - 300px) / (1600 - 300)));
}

.center-content.simple a {
  color: #000;
}
