/*
 * General
 */
:root {
  --bg: #fcfdff;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.65);
  --muted-dark: rgba(0, 0, 0, 0.8);
  --line: rgba(15, 23, 42, 0.1);
  --card-border: rgba(15, 23, 42, 0.08);
  --white: #ffffff;
  --accent: #eff6ff;
  --sticky-height: 62px;
  --max-width: 1600px;
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter Tight", sans-serif;
}

a {
  color: var(--text);
  text-decoration: underline;
}

.text-small {
  font-size: 0.8rem !important;
}

.text-muted {
  color: var(--muted);
}

.text-muted-dark {
  color: var(--muted-dark);
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content {
  max-width: var(--max-width);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.is-visible {
  opacity: 1 !important;
}

.section {
  width: 100%;
  padding-left: 28px;
  padding-right: 28px;
  padding-top: calc(var(--sticky-height) - 1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: rgb(23, 23, 23);
  color: #fff;
}

.btn-primary:hover {
  background: rgb(0, 0, 0);
}

.btn-secondary {
  background: var(--line);
  color: var(--text);
}

.btn-default {
  border: 1px solid var(--line);
  color: var(--text);
}

.underlined-header {
  display: inline-block;
  position: relative;
  transform-style: preserve-3d;
}

.underlined-header:before {
  content: '';
  display: inline-block;
  position: absolute;
  top: 2rem;
  left: -0.5rem;
  transform: translateZ(-1px);
  height: 2rem;
  width: calc(100% + 1rem);
  background-color: var(--accent);
}

/*
 * Topbar
 */
.topbar {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.sticky-topbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: var(--sticky-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 200ms ease, transform 200ms ease;
}

.sticky-topbar .btn {
  font-size: 0.85rem;
}

.sticky-topbar.is-visible {
  transform: translateY(0);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 100px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav-link::after {
  content: '+';
  display: inline-flex;
  height: 21px;
  font-size: 1.1rem;
  line-height: 1.1;
  transform-origin: center;
  transition: transform 200ms ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: rotate(45deg);
}

/*
 * Popup message
 */
.popup-tab {
  position: fixed;
  width: 100%;
  padding: 0 28px 0 28px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#popup-message {
  position: relative;
  padding: 0;
  font-size: 1.1rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity 300ms ease, transform 300ms ease;
  transform: translateY(100%);
  overflow: hidden;
  height: 0;
}

#popup-message.is-visible {
  padding: 2rem 4rem 2rem 3rem;
  transform: translateY(0);
  height: auto;
  margin-bottom: 28px;
}

#popup-close {
  display: inline-block;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(calc(-50% - 0.2rem));
  font-size: 2rem;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
}

#popup-close:hover {
  color: var(--text);
}

/*
 * Hero section
 */
#hero {
  padding-top: 0;
}

#hero > div {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 28px 28px 0 28px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 1100px;
  font-size: clamp(3rem, 4vw, 4.5rem);
  line-height: 0.95;
  font-weight: 900;
  text-wrap: balance;
}

.subcopy {
  font-family: "Inter Tight", sans-serif;
  max-width: 700px;
  margin-top: 24px;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.hero-visual {
  position: relative;
  height: 460px;
}

.visual-card {
  position: absolute;
  border-radius: var(--border-radius);
}

.accent-card {
  inset: 30px 50px 70px 20px;
  background-image: url(images/doctor.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
}

.detail-card {
  right: 0;
  bottom: 0;
  width: 200px;
  height: 160px;
  background: var(--text);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.detail-card span {
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
}

.detail-card small {
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 900;
}

/*
 * Product section
 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid article {
  padding: 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.stats-grid p {
  color: var(--muted);
}

.stats-grid article:last-child {
  border-right: none;
}

.stat-image {
  display: block;
  width: 100%;
  min-height: 170px;
  height: 250px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
}

.image-usb {
  background-image: url(images/usb.jpg);
}

.image-cd {
  background-image: url(images/cd.jpg);
}

.image-folder {
  background-image: url(images/folder.jpg);
}

.image-cartridge {
  background-image: url(images/cartridge.jpg);
}

.image-usb-small {
  background-image: url(images/usb-small.jpg);
}

.image-cd-small {
  background-image: url(images/cd-small.jpg);
}

.image-folder-small {
  background-image: url(images/folder-small.jpg);
}

.image-cartridge-small {
  background-image: url(images/cartridge-small.jpg);
}

.stats-grid h3 {
  margin: 0 0 5px;
  font-size: 1.8rem;
  line-height: 1;
}

/*
 * Who we are section
 */
#who {
  min-height: calc(100vh - 150px - var(--sticky-height) - 1px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#who > div {
  padding-top: 54px;
  padding-bottom: 54px;
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 900ms ease, transform 900ms ease;
}

#who > div.is-visible {
  transform: translateX(0);
}

.who-we-are-header {
  position: relative;
  text-align: center;
}

.who-we-are-header h2 {
  margin: 0 0 80px;
  font-size: 3rem;
  line-height: 1.05;
  text-align: center;
}

.who-we-are-body {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.who-we-are-body:before,
.who-we-are-body:after {
  content: '';
  display: block;
  width: 25px;
  height: 25px;
  position: absolute;
  z-index: 9;
  border: 20px solid #000000;
}

.who-we-are-body:before {
  top: 0;
  left: 0;
}

.who-we-are-body:after {
  bottom: 0;
  right: 0;
}

.who-we-are-body > div {
  background: var(--bg);
  position: relative;
  z-index: 10;
  padding: 40px 60px;
}

.who-we-are-body > div p {
  margin: 0 0 1.25em;
  font-family: "PT Serif", serif;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  line-height: 1.25em;
  letter-spacing: -0.02em;
  text-align: justify;
  text-justify: auto;
}

.who-we-are-body p:last-child {
  margin-bottom: 0;
}

/*
 * Quotation section
 */
#quotation > div {
  position: relative;
  padding-top: 100px;
  padding-bottom: 100px;
}

#quotation > div > div:nth-child(n + 2) {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

#quotation > div > div:nth-child(2),
#quotation > div > div:nth-child(3) {
  width: 400px;
  height: 650px;
  z-index: 8;

  transition: opacity 500ms ease, transform 1000ms ease;
}

#quotation > div > div:nth-child(4),
#quotation > div > div:nth-child(5) {
  width: 300px;
  height: 550px;
  z-index: 7;
  transition: opacity 600ms ease, transform 1100ms ease;
}

#quotation > div > div:nth-child(2).is-visible {
  background-position: calc(50% - 190px) center;
  transform: translate(calc(-50% - 350px), -50%);
}

#quotation > div > div:nth-child(3).is-visible {
  background-position: calc(50%) center;
  transform: translate(calc(-50% + 350px), -50%);
}

#quotation > div > div:nth-child(4).is-visible {
  background-position: calc(50% + 90px) center;
  transform: translate(calc(-50% - 550px), -50%);
}

#quotation > div > div:nth-child(5).is-visible {
  background-position: calc(50%) center;
  transform: translate(calc(-50% + 550px), -50%);
}

.quotation-tab {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 9;
  border: 1px solid var(--line);
  padding: 70px;
  background-color: var(--bg);
}

.quotation-header {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.quotation-header h2 {
  margin: 0 0 60px;
  font-size: 3rem;
  line-height: 1.1;
}

#quotation-form {
  display: grid;
  grid-auto-flow: column;
  gap: 6px 12px;
  grid-template-columns: repeat(2, 1fr);
}

#quotation-form > *:nth-child(-n + 4) {
  grid-column: 1 / span 1;
}

#quotation-form > *:nth-child(n + 3):nth-child(-n + 4) {
  grid-column: 2 / span 1;
}

#quotation-form > *:nth-child(n + 5) {
  grid-column: 1 / span 2;
}

#quotation-form label {
  font-size: 0.95rem;
  font-weight: 700;
}

#quotation-form input,
#quotation-form select,
#quotation-form textarea {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
}

#quotation-form textarea {
  height: 180px;
  resize: vertical;
}

#quotation-button {
  height: 40px;
  width: 140px;
  border: none;
  cursor: pointer;
  margin-top: 14px;
}

.quotation-products {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.5em 1.5em;
  font-size: 0.9em;
}

.quotation-products div {
  white-space: nowrap;
}

/*
 * Footer section
 */
#footer {
  padding-top: 0;
  border-top: 1px solid var(--line);
  background-color: var(--accent);
}

#footer > div {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.footer-container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.footer-grid {
  width: 100%;
  padding: 54px 0;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 54px 16px;
}

.footer-grid > div{
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.footer-grid h6 {
  display: block;
  margin: 0 0 1.5em 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 800;
}

.footer-grid p {
  display: block;
  font-size: 0.9rem;
  margin: 0.75em 0 0 0;
  line-height: 1.5em;
  color: var(--muted-dark);
}

.footer-grid a {
  display: block;
  font-size: 0.9rem;
  text-decoration: underline;
  margin: 0.75em 0 0 0;
  line-height: 1.5em;
  color: var(--muted-dark);
}

.footer-grid a:hover {
  color: var(--muted);
}

.footer-trademark {
  width: 100%;
  max-width: var(--max-width);
  padding-top: 2em;
  padding-bottom: 2em;
  grid-column: 1 / -1;
  color: var(--muted-dark);
  border-top: 1px solid var(--line);
  text-align: center;
}

/*
 * Media
 */
@media(max-width: 1600px) {
  .page-content {
    border: 0px;
  }

  #quotation > div > div:nth-child(n + 2) {
    width: 300px;
    height: 600px;
  }

  #quotation > div > div:nth-child(n + 4) {
    display: none;
  }
}

@media(max-width: 1024px) {
  .hero,
  .footer-top,
  .stats-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .stats-grid article {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .sticky-topbar .btn,
  .nav-links,
  #quotation > div > div:not(:first-child) {
    display: none;
  }

  .quotation-tab {
    padding: 50px;
  }

  .footer-grid > div {
    width: fit-content;
    display: block;
  }

  .footer-grid {
    width: fit-content;
    grid-template-columns: repeat(1, 1fr);
  }

  
}

@media(max-width: 640px) {
  .hero,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  #quotation-form > * {
    grid-column: 1 / span 2 !important;
  }

  .hero-visual {
    display: none;
  }

  .quotation-tab {
    padding: 30px;
  }

  .section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .who-we-are-body > div {
    padding: 25px;
  }

  .quotation-products {
    display: grid;
    grid-template-columns: auto;
  }
}
