/* Sino Fabrications — rebuild of the Wix site.
   Measurements were taken off the live page at a 1440px viewport:
   header 110, slider 502, grey block 840, contact 884, footer 236, bar 61.
   Wix ships Proxima Nova under licence; Nunito Sans stands in for it, and
   Roboto is the same face Wix uses for the two light headings. */

:root {
  --grey: #e8eaed;         /* section fill */
  --field: #e3e3e3;        /* form inputs */
  --link: #25318d;         /* contact links */
  --link-about: #384ad3;   /* link inside the FDA paragraph */
  --body: 'Nunito Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
  --thin: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  color: #000;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px;
  z-index: 60;
  padding: 10px 16px;
  background: #000; color: #fff;
}

/* Reveal targets start hidden only when scripting is on, so a failed script
   or a blocked file can never leave the page blank. */
.js .reveal,
.js .about-copy,
.js .contact-title { opacity: 0; }

/* ---------- header ---------- */

/* Wix keeps the type at fixed sizes and lets the artwork and the columns
   grow with the window. Everything below follows that: px for text, vw for
   logos, images and column widths — measured off the original at 1440 and
   2548, where the header logo is 74px and 134px tall respectively. */

.site-header {
  background: #fff;
  position: relative;
  padding: clamp(14px, 1.25vw, 26px) 0;
  z-index: 20;
}
.header-inner {
  padding: 0 45px 0 clamp(30px, 3.75vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand img {
  width: auto;
  height: clamp(38px, 5.15vw, 150px);
  transition: transform .5s var(--ease);
}
.brand:hover img { transform: scale(1.03); }

.nav {
  display: flex;
  gap: 36px;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}
.nav a {
  position: relative;
  text-decoration: none;
  padding-bottom: 4px;
}
/* a rule that draws itself from the left, the same gesture the new site uses */
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- slider ---------- */

.slider {
  --panel: min(1440px, 100vw);   /* a panel is the artwork's own size */
  position: relative;
  overflow: hidden;
  height: 500px;
  background: #d9dcdf;           /* shows only while a panel loads */
}
.slides {
  display: flex;
  height: 100%;
  will-change: transform;
}
.slide {
  position: relative;
  flex: 0 0 var(--panel);
  width: var(--panel);
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* only bites below 1440, where the panel narrows */
  will-change: transform;
}

/* One band across the whole viewport, as on the original, carrying the text
   for whichever panel is centred. */
.caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 96px;
  text-align: center;
  font-family: var(--thin);
  font-weight: 300;
  font-size: 21px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .3));
  overflow: hidden;
  z-index: 2;
}

.arrow {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  width: 49px;
  height: 49px;
  border: 0;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .3s, opacity .3s;
  z-index: 3;
}
.arrow svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.arrow:hover { background: rgba(0, 0, 0, .82); }
.arrow.prev { left: 0; }
.arrow.next { right: 0; }
.arrow[hidden] { display: none; }   /* [hidden] alone loses to display:grid */

.dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 84px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}
.dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s;
}
.dots button[aria-selected="true"] {
  background: #fff;
  transform: scale(1.5);
}

/* ---------- about ---------- */

.about {
  background: var(--grey);
  padding-top: 86px;
}
.about-inner {
  padding: 0 4.1vw 0 13px;
  display: flex;
  align-items: center;
  gap: 2.8vw;
}
.fda {
  flex: 0 0 30.8vw;
  width: 30.8vw;
  height: auto;
}
.about p {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.8;
}
.about p a {
  color: var(--link-about);
  font-style: italic;
  text-decoration: underline;
}

.building-frame {
  margin-top: 86px;
  height: 420px;
  overflow: hidden;
}
.building {
  width: 100%;
  height: 125%;              /* headroom for the parallax drift */
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

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

.contact {
  background: var(--grey);
  padding: 100px 0 120px;
}
/* Two blocks of equal width: the text starts 7.5vw in, the card 51vw in.
   Both are 34vw wide, which is 490px at 1440 — the original's card. */
.contact-inner {
  padding: 0 0 0 7.5vw;
  display: grid;
  grid-template-columns: 34vw 34vw;
  gap: 9.5vw;
  align-items: start;
}

.contact-text {
  text-align: center;
  padding-top: 30px;
}
.contact-text h2 {
  margin: 0 0 34px;
  font-family: var(--thin);
  font-weight: 300;
  font-size: 45px;
  line-height: 63px;
}
.contact-text p {
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 32px;
}
.contact-text .lede { margin-bottom: 34px; }
.contact-text a {
  color: var(--link);
  text-decoration-color: rgba(37, 49, 141, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .3s;
}
.contact-text a:hover { text-decoration-color: currentColor; }

/* Phone numbers dial on a phone but stay plain text to the eye, the way the
   original printed them. */
a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
}

.card {
  background: #fff;
  padding: 40px 36px;
}
.field { margin-bottom: 22px; }
.card label {
  display: block;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1;
}
.card label span { color: #b3261e; }
.card input,
.card textarea {
  width: 100%;
  background: var(--field);
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  color: #000;
  transition: box-shadow .3s, background .3s;
}
.card input { height: 54px; padding: 3px 3px 3px 20px; }
.card textarea {
  height: 119px;
  padding: 12px 10px 3px 20px;
  resize: vertical;
}
.card input:focus,
.card textarea:focus {
  outline: none;
  background: #ededed;
  box-shadow: 0 0 0 2px #000;
}
.card input.bad,
.card textarea.bad { box-shadow: 0 0 0 2px #b3261e; }

.submit {
  position: relative;
  width: 100%;
  height: 55px;
  border: 1px solid #000;
  border-radius: 100px;
  background: #000;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .35s var(--ease);
}
.submit span { position: relative; z-index: 1; }
/* a wash that sweeps across on hover rather than a flat colour change */
.submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #2b2b2b;
  transform: translateX(-101%);
  transition: transform .5s var(--ease);
}
.submit:hover::before { transform: translateX(0); }
.submit:active { transform: scale(.99); }
.submit[disabled] { opacity: .55; cursor: default; }

.note {
  margin: 18px 0 0;
  min-height: 22px;
  text-align: center;
  font-size: 16px;
}

/* ---------- footer ---------- */

.site-footer {
  background: #fff;
  padding: 30px 20px 26px;
  text-align: center;
}
.footer-logo {
  width: auto;
  height: clamp(30px, 3.75vw, 110px);
  margin: 0 auto 12px;
}
.site-footer p {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}
.site-footer a { color: #000; }

.copyright {
  height: 61px;
  background: #000;
  display: grid;
  place-items: center;
}
.copyright p {
  margin: 0;
  font-size: 15px;
  color: #fff;
}

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  right: 46px;
  top: 50%;
  margin-top: -26px;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(.7);
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s;
  z-index: 40;
}
.to-top.on {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.to-top:hover { background: #1c1c1c; }

.to-top-ring {
  position: absolute;
  inset: 0;
  width: 52px; height: 52px;
  transform: rotate(-90deg);   /* progress starts at twelve o'clock */
}
.to-top-ring circle {
  fill: none;
  stroke-width: 2;
  cx: 26; cy: 26; r: 24;
}
.ring-track { stroke: rgba(255, 255, 255, .22); }
.ring-value {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 150.8;     /* 2 * pi * 24 */
  stroke-dashoffset: 150.8;
}

.to-top-arrow {
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.to-top:hover .to-top-arrow { transform: translateY(-2px); }

/* ---------- narrow screens ---------- */

@media (max-width: 1100px) {
  .contact-inner { grid-template-columns: 1fr; gap: 40px; padding: 0 5vw; }
  .card { max-width: 490px; margin: 0 auto; width: 100%; }
  .about-inner { flex-direction: column; text-align: center; padding: 0 5vw; gap: 20px; }
  .fda { flex: none; width: min(320px, 60vw); }
}

@media (max-width: 700px) {
  .site-header { height: auto; padding: 14px 0; }
  .header-inner { padding: 0 16px; flex-wrap: wrap; }
  .brand img { height: 34px; }
  .nav { font-size: 18px; gap: 24px; }

  /* Wix crops the panel to a portrait-ish box on a phone rather than
     shrinking it to a letterbox strip. */
  .slider { height: 430px; }
  .caption { font-size: 16px; padding: 0 20px; height: 66px; }
  .dots { bottom: 78px; }
  .arrow { width: 40px; height: 40px; margin-top: -20px; }

  .about { padding-top: 40px; }
  .about-inner { padding: 0 16px; gap: 20px; }
  .about p { font-size: 15px; line-height: 1.7; text-align: left; }
  .building-frame { margin-top: 40px; height: 150px; }

  .contact { padding: 40px 0 50px; }
  .contact-inner { padding: 0 16px; }
  .contact-text h2 { font-size: 32px; line-height: 44px; margin-bottom: 20px; }
  .contact-text p { font-size: 16px; line-height: 26px; }
  .card { padding: 26px 20px; }

  .site-footer p { font-size: 16px; line-height: 24px; }
  .footer-logo { height: 34px; }

  .to-top {
    right: 16px;
    top: auto; bottom: 22px;
    margin: 0;
    width: 46px; height: 46px;
  }
  /* the ring scales with the viewBox — geometry and dash length stay put */
  .to-top-ring { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .about-copy,
  .js .contact-title { opacity: 1; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
