/* ==========================================================================
   Valmark Ltd — Stylesheet
   Minimal, premium, monochrome design system
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --color-bg:        #ffffff;
  --color-bg-alt:    #fafafa;
  --color-surface:   #ffffff;
  --color-border:    #e8e8e8;
  --color-border-2:  #eeeeee;
  --color-text:      #0a0a0a;
  --color-text-mid:  #3f3f3f;
  --color-text-soft: #6b6b6b;
  --color-accent:    #0a0a0a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-md: 0 6px 24px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 20px 60px rgba(10, 10, 10, 0.08);

  --ease: cubic-bezier(.2, .7, .2, 1);

  --container: 1180px;
  --gutter: 24px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: #0a0a0a; color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 120px 0;
  border-top: 1px solid var(--color-border-2);
}
.section-alt {
  background: var(--color-bg-alt);
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--color-text);
}

.section-lead {
  margin: 24px 0 0;
  max-width: 560px;
  color: var(--color-text-mid);
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .2s var(--ease),
              background-color .2s var(--ease),
              color .2s var(--ease),
              border-color .2s var(--ease),
              box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-wide { justify-content: center; width: 100%; margin-top: 12px; }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: #1f1f1f;
  border-color: #1f1f1f;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.brand-mark { display: inline-flex; color: var(--color-accent); }
.brand-name { font-family: var(--font-display); }

.nav-links {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.nav-links a {
  font-size: 14.5px;
  color: var(--color-text-mid);
  transition: color .2s var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--color-text); }

.nav-cta { /* visible on desktop */ }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 140px;
  overflow: hidden;
}
.hero::before {
  /* Subtle radial background */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 500px at 50% -10%, rgba(10,10,10,0.05), transparent 70%),
    radial-gradient(600px 300px at 85% 20%, rgba(10,10,10,0.03), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-copy { max-width: 620px; }

/* Hero device mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.device-stage {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 320 / 660;
}
.device-glow {
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(10,10,10,0.14), transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
.device {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(10,10,10,0.22))
          drop-shadow(0 8px 16px rgba(10,10,10,0.08));
}

.hero-title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--color-text);
}

.hero-sub {
  margin: 0 0 40px;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text-mid);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-soft);
  font-size: 13.5px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.hero-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: #c7c7c7;
}

/* ---------- About ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.about-body p {
  margin: 0 0 20px;
  color: var(--color-text-mid);
  font-size: 17px;
  line-height: 1.7;
}
.about-points {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
.about-points li {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-mid);
}
.about-points strong {
  color: var(--color-text);
  font-weight: 600;
  margin-right: 6px;
}

/* Code window visual in About */
.about-visual {
  margin-top: 40px;
  position: relative;
}
.window {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.window-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--color-border-2);
}
.window-top span:nth-child(-n+3) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.window-title {
  margin-left: auto;
  margin-right: 8px;
  font-size: 11.5px;
  color: #9a9a9a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.01em;
}
.window-body { padding: 18px 20px 22px; }
.code {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: #0a0a0a;
  white-space: pre;
  overflow-x: auto;
}
.c-kw { color: #9333ea; font-weight: 500; }  /* keyword */
.c-ty { color: #0a0a0a; font-weight: 600; }  /* type */
.c-st { color: #15803d; }                    /* string */
.c-nb { color: #b45309; }                    /* number */

/* ---------- Services / cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform .25s var(--ease),
              border-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: #d6d6d6;
  box-shadow: var(--shadow-md);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #0a0a0a;
  color: #fff;
  margin-bottom: 22px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-mid);
}

/* ---------- Products ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s var(--ease),
              border-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.product:hover {
  transform: translateY(-3px);
  border-color: #d6d6d6;
  box-shadow: var(--shadow-md);
}
.product-visual {
  aspect-ratio: 16 / 11;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 34px;
  background:
    radial-gradient(80% 70% at 50% 120%, rgba(10,10,10,0.08), transparent 70%),
    linear-gradient(180deg, #f6f6f6 0%, #ececec 100%);
  border-bottom: 1px solid var(--color-border-2);
}
.product-phone {
  width: 52%;
  max-width: 170px;
  height: auto;
  transform: translateY(18%);
  filter: drop-shadow(0 18px 28px rgba(10,10,10,0.22))
          drop-shadow(0 4px 8px rgba(10,10,10,0.08));
  transition: transform .35s var(--ease);
}
.product:hover .product-phone {
  transform: translateY(16%);
}
.product-body { padding: 26px 26px 28px; }
.product-status {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-mid);
  background: #f4f4f4;
  border-radius: 999px;
}
.product h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.product p {
  margin: 0;
  font-size: 14.5px;
  color: var(--color-text-mid);
  line-height: 1.6;
}

/* ---------- Contact ---------- */
.section-contact { background: var(--color-bg-alt); }
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-details {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 16px;
}
.contact-row:first-child { padding-top: 6px; }
.contact-row:last-of-type { border-bottom: none; }
.contact-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.contact-value {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--color-text);
  transition: color .2s var(--ease);
}
a.contact-value:hover { color: #555; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0a0a0a;
  color: #e8e8e8;
  padding: 72px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 480px;
}
.footer-brand .brand-mark { color: #fff; }
/* Footer logo uses an inverted variant: white rounded square with a dark V */
.footer-brand .brand-mark svg path { stroke: #0a0a0a; }
.footer-name {
  margin: 0 0 6px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.footer-tag {
  margin: 0;
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: flex-end;
}
.footer-links a {
  font-size: 14px;
  color: #bcbcbc;
  transition: color .2s var(--ease);
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  color: #7a7a7a;
  font-size: 13px;
  gap: 16px;
}
.footer-meta { margin: 0; }

/* ==========================================================================
   Legal pages (terms.html / privacy.html)
   ========================================================================== */
.legal-page {
  padding: 80px 0 120px;
  border-top: 1px solid var(--color-border-2);
}
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.legal-wrap .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-soft);
  margin-bottom: 40px;
  transition: color .2s var(--ease);
}
.legal-wrap .back-link:hover { color: var(--color-text); }

.legal-wrap h1 {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.1;
}
.legal-wrap .legal-meta {
  color: var(--color-text-soft);
  font-size: 14px;
  margin: 0 0 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.legal-wrap h2 {
  margin: 48px 0 14px;
  font-size: 22px;
  letter-spacing: -0.012em;
  font-weight: 600;
}
.legal-wrap h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
}
.legal-wrap p,
.legal-wrap li {
  color: var(--color-text-mid);
  font-size: 16px;
  line-height: 1.75;
}
.legal-wrap p { margin: 0 0 18px; }
.legal-wrap ul {
  padding-left: 20px;
  margin: 0 0 18px;
}
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap a { color: var(--color-text); text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 3px; }
.legal-wrap a:hover { text-decoration-color: var(--color-text); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .section { padding: 96px 0; }
  .hero { padding: 80px 0 100px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
    text-align: left;
  }
  .hero-copy { max-width: 100%; }
  .hero-visual { order: 2; }
  .device-stage { max-width: 300px; margin: 0 auto; }

  .about-visual { margin-top: 8px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  body.nav-open .nav-links {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    margin: 0;
    z-index: 49;
  }
  body.nav-open .nav-links a {
    padding: 16px var(--gutter);
    border-bottom: 1px solid var(--color-border-2);
    font-size: 16px;
    color: var(--color-text);
  }
  body.nav-open .nav-links a:last-child { border-bottom: none; }

  .cards { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }

  .section { padding: 80px 0; }
  .hero { padding: 72px 0 96px; }
  .section-head { margin-bottom: 48px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links {
    justify-content: flex-start;
    gap: 20px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-meta { font-size: 12.5px; padding: 8px 14px; gap: 10px; }
  .btn { padding: 12px 18px; font-size: 14.5px; }

  .device-stage { max-width: 260px; }
  .window-body { padding: 14px 16px 18px; }
  .code { font-size: 11.5px; line-height: 1.7; }
  .product-phone { width: 60%; }
}

@media (max-width: 420px) {
  :root { --gutter: 20px; }
  .hero-title { font-size: 42px; letter-spacing: -0.03em; }
  .hero-sub { font-size: 16.5px; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
