/* LatiTech - style.css
   Minimal, Apple-inspired design. Works on desktop and mobile. */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --blue: #0071e3;
  --btn: #0071e3;
  --btn-hover: #0062c4;
  --il-surface: #ffffff;
  --il-stroke: #d2d2d7;
  --il-gray: #e8e8ed;
  --ok: #1d8a3d;
  --err: #d70015;
  --header-bg: rgba(251, 251, 253, .78);
  --radius: 28px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --bg-alt: #161618;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --line: #38383a;
    --blue: #2997ff;
    --il-surface: #2c2c2e;
    --il-stroke: #48484a;
    --il-gray: #3a3a3c;
    --ok: #30d158;
    --err: #ff6961;
    --header-bg: rgba(0, 0, 0, .72);
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

svg { display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.bar {
  width: min(1120px, 100% - 48px);
  height: 64px;
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.3rem; letter-spacing: -.03em; }
.mark { width: 32px; height: 32px; flex: none; }
.w-light { font-weight: 300; }
.w-bold { font-weight: 700; }

nav ul { list-style: none; display: flex; gap: 36px; padding: 0; }
nav a { text-decoration: none; font-size: .92rem; color: var(--ink-2); transition: color .2s; }
nav a:hover, nav a[aria-current="true"] { color: var(--ink); }

.tools { display: flex; align-items: center; gap: 8px; }

.lang {
  font: inherit; font-size: .85rem; color: var(--ink);
  padding: 6px 14px; border-radius: 980px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background .2s;
}
.lang:hover { background: var(--bg-alt); }

.menu-btn {
  display: none;
  width: 40px; height: 40px; padding: 0;
  place-content: center; gap: 6px;
  background: none; border: 0; cursor: pointer;
}
.menu-btn span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .25s;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 620px;
  min-height: min(86svh, 800px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.hero-inner {
  width: min(880px, 100% - 48px);
  margin-block: auto;
  padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px);
}

/* The line art lives in its own band BELOW the text and buttons,
   so it can never overlap them, whatever the screen size. */
.arcs {
  flex: none; display: block;
  width: 100%; height: clamp(150px, 24vw, 300px);
  pointer-events: none;
}
.arcs path {
  fill: none; stroke: var(--line); stroke-width: 1.2;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(.22, .61, .36, 1) forwards;
  animation-delay: calc(var(--i) * .14s);
}
.arcs .accent { stroke: url(#arcGrad); stroke-width: 2.2; }
.arcs .node { fill: var(--blue); opacity: 0; animation: appear .8s ease-out 1.7s forwards; }
.arcs .node-ring { fill: none; stroke: var(--blue); stroke-width: 1.5; opacity: 0; animation: ring .9s ease-out 1.7s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes ring { to { opacity: .35; } }

h1 {
  font-size: clamp(2.5rem, 7.2vw, 5rem);
  line-height: 1.05; font-weight: 700; letter-spacing: -.04em;
  text-wrap: balance;
}
.lead {
  margin: 24px auto 0; max-width: 34em;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.4;
  letter-spacing: -.01em; color: var(--ink-2);
  text-wrap: balance;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center; align-items: center; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 1.0625rem; text-decoration: none;
  padding: 12px 26px; border-radius: 980px; border: 0; cursor: pointer;
  transition: background .2s, opacity .2s;
}
.btn.primary { background: var(--btn); color: #fff; }
.btn.primary:hover { background: var(--btn-hover); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.text { color: var(--blue); padding-inline: 0; }
.btn.text:hover { text-decoration: underline; text-underline-offset: 4px; }

h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08; font-weight: 700; letter-spacing: -.035em;
  text-wrap: balance;
}

/* ---------- Services ---------- */
.services { padding: 120px 0; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head p { margin-top: 16px; font-size: 1.3125rem; line-height: 1.4; color: var(--ink-2); }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }

.card {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 36px 36px 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.card h3 { font-size: 1.625rem; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
.card .txt p { margin-top: 10px; color: var(--ink-2); max-width: 30em; }

.art { margin-top: auto; padding: 32px 0 28px; }
.art.bleed { padding-bottom: 0; }

.il { width: 100%; height: auto; max-width: 520px; margin-inline: auto; }
.il .s { fill: var(--il-surface); stroke: var(--il-stroke); stroke-width: 1.5; }
.il .g { fill: var(--il-gray); }
.il .k { fill: var(--ink); }
.il .b { fill: var(--blue); }
.il .ln { fill: none; stroke: var(--il-stroke); stroke-width: 1.5; }
.il .ln2 { fill: none; stroke: var(--il-stroke); stroke-width: 2; stroke-linecap: round; }
.il .bl { fill: none; stroke: var(--blue); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.il .wh { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

.c-web { grid-column: span 7; }
.c-mobile { grid-column: span 5; }
.c-net, .c-sec, .c-cons { grid-column: span 4; }
.c-app {
  grid-column: span 12;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px; align-items: center; padding: 36px 36px 36px;
}
.c-app .art { padding: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); padding: 120px 0; }

.contact-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 96px); align-items: start;
}

.person { display: grid; gap: 28px; }

.portrait {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 320px;
  overflow: hidden; border-radius: var(--radius); background: var(--il-gray);
}
.portrait .ph { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--il-stroke); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }

.person-copy { display: grid; gap: 14px; }
.person-copy p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; max-width: 32em; }
.person-copy .who { display: grid; gap: 2px; font-size: 1rem; }
.person-copy .who strong { color: var(--ink); font-size: 1.625rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.email-link { font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; color: var(--blue); text-decoration: none; word-break: break-word; }
.email-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.muted { font-size: .95rem; }

#contactForm { display: grid; gap: 20px; }
#contactForm label { display: grid; gap: 8px; font-size: .92rem; font-weight: 500; }
.opt { color: var(--ink-2); font-weight: 400; }

input, textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  width: 100%; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-status { font-size: .95rem; min-height: 1.5em; flex: 1 1 220px; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--err); }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .c-web, .c-mobile, .c-net, .c-sec { grid-column: span 6; }
  .c-cons { grid-column: span 12; }
  .c-app { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 240px; }
}

@media (max-width: 760px) {
  .menu-btn { display: grid; }
  nav {
    position: absolute; left: 0; right: 0; top: 64px;
    display: none;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 4px 24px 16px;
  }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; }
  nav li + li { border-top: 1px solid var(--line); }
  nav a { display: block; padding: 16px 0; font-size: 1.25rem; color: var(--ink); }
  .services, .contact { padding: 84px 0; }
}

@media (max-width: 620px) {
  .c-web, .c-mobile, .c-net, .c-sec, .c-cons { grid-column: span 12; }
  .card { padding: 28px 24px 0; }
  .c-app { padding: 28px 24px; }
  .bar, .wrap, .hero-inner { width: min(1120px, 100% - 40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arcs path { animation: none; stroke-dashoffset: 0; }
  .arcs .node { animation: none; opacity: 1; }
  .arcs .node-ring { animation: none; opacity: .35; }
}
