@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;600&display=swap');

:root {
  --black: #373737;
  --white: #fbf7f4;
  --green: #7ea45e;
  --orange: #ea873e;
  --gray: #737373;
  --content-width: 1280px;
  --gutter: clamp(24px, 5vw, 64px);
  --header-height: 86px;
  --header-scrolled-height: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-scrolled-height) + 12px); }
body { margin: 0; background: var(--white); color: var(--black); font-family: Lexend, Arial, sans-serif; }
body.overlay-active, html.overlay-active { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.section { position: relative; width: 100%; overflow: hidden; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 10; color: #fff; transition: background .25s, backdrop-filter .25s, box-shadow .25s; }
.site-header.scrolled { background: rgba(55, 55, 55, .82); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
.nav { width: min(100%, var(--content-width)); height: var(--header-height); margin: auto; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; transition: height .3s ease, padding .3s ease; }
.site-header.scrolled .nav { height: var(--header-scrolled-height); padding-block: 4px; }
.wordmark { color: #fff; font-size: 20px; font-weight: 600; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(24px, 3vw, 42px); font-size: 16px; }
.nav-links a { color: #fff; }
.nav-button { padding: 8px 10px; border-radius: 8px; background: var(--white); color: var(--black) !important; transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.nav-button:hover { background: var(--green); color: var(--black) !important; transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0, 0, 0, .2); }
.menu-toggle { display: none; border: 0; background: none; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; margin: 5px; background: #fff; }

/* Hero */
.hero { min-height: 640px; height: 100svh; background: var(--black); color: #fff; }
.hero-content { width: min(100%, var(--content-width)); min-height: 100%; margin: auto; padding: var(--header-height) var(--gutter) 48px; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.hero h1 { margin: 0; font-size: clamp(70px, 5vw, 80px); line-height: 1.08; font-weight: 600; letter-spacing: -.02em; }
.hero h1 > span { display: block; }
.hero h1 .letters { display: inline; }
.hero h1.typing > span { opacity: 0; }
.hero h1.typing > span.is-visible { opacity: 1; }
.hero h1 .underscore { display: inline-block; animation: terminal-blink 1s steps(1, start) infinite; }
.hero-art { flex: 0 0 clamp(300px, 30vw, 400px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; }

/* About */
.about { min-height: 560px; height: 82svh; background: var(--black) url('assets/bg_about_us.webp') center / cover; }
.about-card { position: absolute; top: 50%; left: max(calc(47% - var(--content-width) / 2), var(--gutter)); width: min(500px, calc(100% - 2 * var(--gutter))); min-height: 420px; padding: 36px; display: flex; flex-direction: column; justify-content: center; border-radius: 18px; background: #fff; transform: translateY(-50%); }
.about h2, .text-block h2 { margin: 0; font-size: clamp(48px, 4vw, 54px); line-height: 1.08; font-weight: 600; }
.about h2 { margin-bottom: 26px; }
.about-copy { font-size: 14px; line-height: 1.3; text-transform: uppercase; }
.about-copy p { margin: 0 0 18px; }
.about-copy p:last-child { margin-bottom: 0; }
.muted { color: var(--gray); }

/* Bodio */
.product { min-height: 560px; height: 82svh; background: var(--white); }
.product-art { position: absolute; top: clamp(42px, 10vh, 40px); left: 0; width: 742px; height: 984px; transform: scale(1.2); transform-origin: left top; }
.phone-stack { position: absolute; top: 54px; left: 136px; width: 471px; height: 876px; transform: rotate(20deg); transform-origin: center; }
.phone { position: absolute; width: 236px; height: auto; border: 1px solid var(--gray); border-radius: 20px; display: block; box-shadow: 0 4px 5px rgba(0, 0, 0, .25); }
.phone-left { top: 65px; left: 0; }
.phone-right { top: 137px; left: 235px; }
.app-mark { position: absolute; z-index: 2; top: 220px; left: 300px; width: 220px; height: 220px; border-radius: 22px; object-fit: contain; filter: drop-shadow(0 2.4px 12px rgba(0, 0, 0, .25)); }
.bodio-copy { position: absolute; top: 50%; left: calc(50% + 40px); width: min(600px, calc(50% - 80px)); display: flex; flex-direction: column; gap: 14px; transform: translateY(-50%); }
.bodio-heading { display: flex; flex-direction: column; align-items: flex-start; }
.bodio-copy h2 { height: 60px; margin: 0; font-size: clamp(42px, 3.75vw, 48px); line-height: normal; font-weight: 600; white-space: nowrap; }
.bodio-copy h2 span { color: var(--green); }
.bodio-copy h3 { margin: 0; font-size: clamp(16px, 1.4vw, 18px); line-height: normal; letter-spacing: clamp(8px, 1vw, 12px); font-weight: 600; }
.bodio-meta { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: clamp(16px, 1.4vw, 18px); line-height: normal; }
.bodio-meta strong:first-child { color: var(--gray); }
.bodio-meta strong:last-child { color: var(--orange); white-space: nowrap; }
.bodio-description { font-size: clamp(13px, 1.1vw, 14px); line-height: 1.3; text-transform: uppercase; }
.bodio-description p { margin: 0; }
.bodio-description p + p { margin-top: 18px; }
.coming-soon { width: 220px; height: 52px; margin: 4px 0 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(0, 0, 0, .4); color: var(--white); font-size: 15px; font-weight: 600; }

/* Contact and careers */
.contact-panel { min-height: 540px; height: 82svh; background: var(--black); color: var(--white); }
.careers { min-height: 540px; height: 82svh; background: var(--white); }
.section-content { width: min(100%, var(--content-width)); min-height: 100%; margin: auto; padding: 64px var(--gutter); display: flex; align-items: center; }
.text-block { width: 100%; min-height: 380px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.text-block h2 { width: min(600px, 100%); }
.contact-panel h2 span { color: #e98a15; }
.careers h2 span { color: var(--orange); }
.text-block > p, .career-copy { max-width: 960px; margin: 0; font-size: 16px; line-height: 1.3; text-transform: uppercase; }
.career-copy p { margin: 0 0 14px; }
.career-copy p:last-child { margin-bottom: 0; }
.contact-button { align-self: flex-end; min-width: 160px; height: 52px; padding: 8px 48px; border: 0; border-radius: 8px; background: var(--green); color: var(--black); font: 600 16px Lexend, Arial, sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.contact-button:hover { background: #91b86f; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, .22); }
.careers .contact-button { color: var(--white); }

/* Contact overlays */
.contact-overlay { position: absolute; z-index: 5; top: 50%; left: 50%; width: min(960px, calc(100% - 48px)); min-height: 460px; display: grid; grid-template-columns: 1fr 1fr; transform: translate3d(100%, -50%, 0); transition: transform .55s cubic-bezier(.76, 0, .24, 1); will-change: transform; backface-visibility: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
.contact-overlay.is-open { transform: translate3d(-50%, -50%, 0); }
.overlay-info, .overlay-form { min-width: 0; padding: 44px; }
.overlay-info { display: flex; flex-direction: column; justify-content: space-between; padding-block: 84px; }
.contact-overlay--light .overlay-info { background: var(--white); color: var(--black); }
.contact-overlay--dark .overlay-info { background: var(--black); color: var(--white); }
.overlay-group h3, .overlay-form h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.2; font-weight: 600; }
.overlay-group h3 { display: flex; align-items: center; gap: 10px; }
.overlay-group p { margin: 0 0 8px; font-size: 15px; line-height: 1.3; }
.overlay-group p:last-child { margin-bottom: 0; }
.overlay-icon { width: 22px; height: 22px; flex: 0 0 22px; }
.overlay-form { display: flex; flex-direction: column; justify-content: center; gap: 18px; background: #d9d9d9; }
.overlay-form h3 { margin-bottom: 2px; color: var(--gray); font-size: 22px; text-align: center; text-transform: uppercase; }
.overlay-form label { display: block; }
.overlay-form input, .overlay-form textarea { width: 100%; border: 0; border-radius: 0; padding: 0 18px; background: #eee; color: var(--black); font: 400 14px Lexend, Arial, sans-serif; }
.overlay-form input { height: 45px; }
.overlay-form textarea { height: 130px; padding-top: 18px; resize: vertical; }
.overlay-form input::placeholder, .overlay-form textarea::placeholder { color: #bababa; opacity: 1; }
.overlay-form > button { height: 45px; border: 0; background: #ee964b; color: var(--white); font: 400 16px Lexend, Arial, sans-serif; cursor: pointer; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.overlay-form > button:hover { background: #f5a765; transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0, 0, 0, .18); }
.overlay-close { position: absolute; z-index: 2; top: 14px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(55, 55, 55, .12); color: var(--black); font: 400 28px/1 Arial, sans-serif; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.overlay-close:hover { background: rgba(55, 55, 55, .22); transform: rotate(90deg); }
.contact-overlay--dark .overlay-close { background: rgba(251, 247, 244, .12); color: var(--white); }
.contact-overlay--dark .overlay-close:hover { background: rgba(251, 247, 244, .24); }
.nav-button:focus-visible, .contact-button:focus-visible, .overlay-form > button:focus-visible, .overlay-close:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.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; }

@keyframes terminal-blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  :root { --header-height: 62px; --header-scrolled-height: 60px; }

  html { scroll-padding-top: calc(var(--header-scrolled-height) + 8px); }
  .site-header { width: 100vw; max-width: none; right: auto; overflow: hidden; }
  .nav { width: 100%; max-width: none; margin: 0; padding-inline: 20px; }
  .site-header.scrolled .nav { padding-block: 3px; }
  .wordmark { font-size: 16px; }
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .site-header.menu-open { width: 100vw; background: rgba(55, 55, 55, .96); backdrop-filter: blur(12px); }
  .site-header.menu-open .nav,
  .site-header.scrolled.menu-open .nav { min-height: var(--header-height); height: auto; padding: 16px 20px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .site-header.menu-open .menu-toggle { grid-column: 2; grid-row: 1; }
  .site-header.menu-open .nav-links { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 14px 0 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 17px; }
  .site-header.menu-open .nav-links a { padding: 12px 8px; }

  .hero { height: auto; }
  .hero-content { min-height: 100svh; padding: 120px 32px 64px; display: block; }
  .hero h1 { font-size: clamp(42px, 8vw, 55px); }
  .hero-art { width: min(76vw, 360px); margin: 36px auto 0; }

  .about { height: auto; min-height: 80svh; }
  .about-card { position: relative; top: auto; left: auto; width: calc(100% - 48px); min-height: 420px; margin: 70px 24px 38px; padding: 28px; transform: none; }
  .about h2 { font-size: clamp(34px, 9vw, 42px); }
  .about-copy { font-size: 12px; }

  .product { height: auto; min-height: 80svh; }
  .product-art { top: -30px; left: 50%; transform: translateX(-50%) scale(.7); transform-origin: center top; }
  .bodio-copy { position: relative; top: auto; left: auto; width: auto; padding: 555px 28px 38px; transform: none; }
  .bodio-copy h2 { height: auto; font-size: clamp(34px, 9vw, 42px); }
  .bodio-copy h3 { font-size: 15px; letter-spacing: 7px; }
  .bodio-meta { font-size: 14px; }
  .bodio-description, .text-block > p, .career-copy { font-size: 12px; }
  .coming-soon { width: 185px; height: 48px; font-size: 14px; }

  .contact-panel, .careers { height: auto; min-height: 80svh; }
  .section-content { padding: 70px 28px 38px; }
  .text-block { min-height: 450px; }
  .text-block h2 { font-size: clamp(34px, 9vw, 42px); }
  .contact-button { min-width: 150px; height: 48px; padding: 7px 28px; font-size: 14px; }

  .contact-overlay { position: fixed; top: calc(var(--header-scrolled-height) + 8px); bottom: 12px; left: 16px; width: calc(100% - 32px); min-height: 0; grid-template-columns: minmax(0, 1fr); overflow-x: hidden; overflow-y: auto; transform: translate3d(110vw, 0, 0); }
  .contact-overlay.is-open { transform: translate3d(0, 0, 0); }
  .overlay-info { min-height: 245px; padding: 50px 28px 28px; gap: 26px; }
  .overlay-form { min-height: 450px; padding: 28px; }
  .overlay-group p { font-size: 14px; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 .underscore { animation: none; }
  .nav-button, .contact-button, .overlay-form > button, .overlay-close { transition: none; }
}
