/* ===== IAAS - Innovation As A Service ===== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand: #033a2e;
  --brand-light: #065e4a;
  --brand-dark: #022920;
  --black: #111111;
  --black-soft: #1e1e1e;
  --white: #ffffff;
  --off-white: #f5f7f6;
  --gray: #6b7c76;
  --gray-light: #a3b0ab;
  --text: #1a1a1a;
  --section-padding: 6rem 2rem;
  --radius: 8px;
  --ease: cubic-bezier(.25, .46, .45, .94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* Focus visible for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
}

/* ---------- Utility ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--black);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
  transition: transform .35s var(--ease), background .3s var(--ease);
}

.site-header--hidden {
  transform: translateY(-100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.nav__logo {
  margin-left: 1rem;
}

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 2rem;
  margin-right: 1rem;
}

.nav__links a {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: opacity .2s var(--ease);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  opacity: .75;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(160deg, var(--black) 0%, var(--brand) 50%, var(--brand-light) 100%);
  color: var(--white);
}

.hero__logo {
  width: min(520px, 80vw);
  margin-bottom: 2.5rem;
  animation: fadeUp .8s var(--ease) both;
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  max-width: 600px;
  opacity: .9;
  animation: fadeUp .8s .2s var(--ease) both;
}

.hero__cta {
  margin-top: 2.5rem;
  display: inline-block;
  padding: .85rem 2.4rem;
  border: 2px solid var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  color: var(--white);
  transition: background .25s var(--ease), color .25s var(--ease);
  animation: fadeUp .8s .4s var(--ease) both;
  min-height: 48px;
  cursor: pointer;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--white);
  color: var(--black);
}

/* ---------- Sections Common ---------- */
.section {
  padding: var(--section-padding);
}

.section--alt {
  background: var(--off-white);
}

.section--dark {
  background: var(--black);
  color: var(--white);
}

.section--dark .section__title {
  color: var(--white);
}

.section--dark .section__subtitle {
  color: var(--gray-light);
}

.section__title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  color: var(--black);
  text-align: center;
  margin-bottom: .6rem;
}

.section__subtitle {
  text-align: center;
  color: var(--gray);
  max-width: 660px;
  margin: 0 auto 3rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
}

/* ---------- About ---------- */
.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about__symbol {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.about__text p {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1.05rem;
}

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border-top: 3px solid var(--black);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

.service-card__icon {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: .5rem;
}

.service-card__desc {
  color: var(--gray);
  font-size: 1.02rem;
}

/* ---------- Values ---------- */
.values__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.value-item {
  padding: 1.5rem;
}

.value-item__number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand);
}

.value-item__label {
  color: var(--gray-light);
  font-size: 1rem;
  margin-top: .25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--brand);
  color: var(--white);
  text-align: center;
  padding: var(--section-padding);
}

.contact .section__title {
  color: var(--white);
}

.contact .section__subtitle {
  color: rgba(255, 255, 255, .75);
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form__group {
  margin-bottom: 1rem;
}

.contact-form__label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: rgba(255, 255, 255, .85);
  letter-spacing: .02em;
}

.contact-form__input {
  width: 100%;
  padding: .75rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  min-height: 44px;
}

.contact-form__input::placeholder {
  color: var(--gray-light);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(6, 94, 74, .25);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form__btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .85rem 2.4rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--brand);
  background: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
  min-height: 48px;
}

.contact-form__btn:hover,
.contact-form__btn:focus-visible {
  background: transparent;
  color: var(--white);
}

.contact__or {
  margin-top: 2rem;
  font-size: .9rem;
  color: rgba(255, 255, 255, .5);
}

.contact__email {
  display: inline-block;
  margin-top: .5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, .4);
  padding-bottom: 2px;
  transition: border-color .2s var(--ease);
  min-height: 44px;
}

.contact__email:hover {
  border-color: var(--white);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, .5);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: .85rem;
}

.site-footer .footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

/* ---------- Large desktop ---------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }

  .hero__logo {
    width: 560px;
  }
}

/* ---------- Tablet landscape ---------- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 4.5rem 1.5rem;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ---------- Tablet portrait / Mobile landscape ---------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 1.25rem;
  }

  .nav {
    height: 72px;
  }

  .nav__logo img {
    height: 36px;
  }

  .nav__links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    background: var(--black);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s .3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav__links.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .3s var(--ease), visibility 0s 0s;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: calc(100vh - 72px);
    min-height: 100dvh;
    padding: 6rem 1.25rem 3rem;
  }

  .hero__logo {
    width: min(380px, 85vw);
  }

  .hero__tagline {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  .about__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__symbol {
    max-width: 220px;
    order: -1;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .values__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

}

/* ---------- Small phones (iPhone SE, Galaxy S8, etc.) ---------- */
@media (max-width: 400px) {
  :root {
    --section-padding: 3rem 1rem;
  }

  .hero__logo {
    width: 90vw;
  }

  .hero__cta {
    padding: .75rem 1.8rem;
    font-size: .9rem;
  }

  .section__title {
    font-size: 1.4rem;
  }

  .values__list {
    grid-template-columns: 1fr 1fr;
  }

  .value-item {
    padding: 1rem .5rem;
  }

  .value-item__number {
    font-size: 2rem;
  }

}

/* ---------- Landscape phones ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 5rem 2rem 2.5rem;
  }

  .hero__logo {
    width: min(280px, 40vw);
    margin-bottom: 1rem;
  }

  .hero__tagline br {
    display: none;
  }
}

/* ---------- Safe area (notch devices) ---------- */
@supports (padding: env(safe-area-inset-left)) {
  .site-header .nav {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}
