/* ===========================================================================
   J.J. Corporation FZE
   Minimal, typographic layout. Hairline rules instead of cards and shadows.
   =========================================================================== */

:root {
  --paper:      #ffffff;
  --paper-alt:  #f2f6fb;   /* cool tint, used on alternating sections */
  --paper-warm: #fdf7f0;   /* warm tint, used once so the page is not all blue */
  --ink:        #0f1b2d;
  --ink-soft:   #56626f;
  --line:       rgba(15, 27, 45, 0.14);
  --line-soft:  rgba(15, 27, 45, 0.07);

  --accent:      #10538f;  /* deep blue, the primary colour */
  --accent-deep: #0a3c6b;
  --accent-tint: #e3eefa;
  --accent-ink:  #ffffff;

  --warm:        #b26a1f;  /* copper, for small secondary accents */
  --warm-tint:   #fbeeda;

  --wrap: 1140px;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --section-y: clamp(4.5rem, 11vw, 8.5rem);
  --radius: 14px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
.prose a, .form-note a, .office-contacts a { color: var(--accent); }
a:hover { text-decoration-color: currentColor; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

.wrap {
  width: min(100% - 2 * var(--gap), var(--wrap));
  margin-inline: auto;
}

.muted { color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: 0 6px 18px rgba(16, 83, 143, 0.22);
}
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: none;
}

.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.875rem; }

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-header[data-scrolled] { border-bottom-color: var(--line-soft); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 500; letter-spacing: -0.015em; font-size: 0.98rem; }
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav { display: flex; gap: 1.9rem; }
.nav a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--accent); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
  padding: 0.5rem var(--gap) 1rem;
}
.mobile-nav a {
  padding: 0.75rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.98rem;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav[data-open] { display: flex; }

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: clamp(3.5rem, 9vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

/* Soft wash behind the hero so the white page is not completely flat. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 78%;
  background:
    radial-gradient(900px 420px at 78% 8%, var(--accent-tint), transparent 68%),
    radial-gradient(700px 380px at 8% 0%, var(--warm-tint), transparent 62%);
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero-title {
  max-width: 15ch;
  font-size: clamp(2.2rem, 1.1rem + 3.6vw, 3.5rem);
}

.hero-lede {
  margin-top: 1.6rem;
  max-width: 52ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.18rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat { margin: 0; padding-left: 1rem; border-left: 3px solid var(--accent-tint); }
.stat:nth-child(2) { border-left-color: var(--warm-tint); }
.stat-value {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}
.stat:nth-child(2) .stat-value { color: var(--warm); }
.stat-label {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 26ch;
}

/* --------------------------------------------------------------- photos */

/* The source photographs are the company's originals and are not large, so
   every figure is capped near its native width. Beyond that they go soft. */
.figure { margin: 0; }

.figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.hero-figure { max-width: 480px; margin-left: auto; }
.media .figure { max-width: 440px; }
.media-narrow .figure { max-width: 240px; }
.strip .figure { max-width: 460px; }

.figure figcaption {
  margin-top: 0.85rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Hero photo, tilted very slightly and framed so the low source resolution
   reads as deliberate rather than soft. */
.hero-figure img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(15, 27, 45, 0.16);
}

/* Photo paired with a block of text. */
.media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 4.5rem);
}
.media-narrow { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
.media-body h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); margin-bottom: 0.85rem; }
.media-body p { color: var(--ink-soft); max-width: 52ch; }

.media .figure img { aspect-ratio: 3 / 2; object-fit: cover; }
.media-narrow .figure img { aspect-ratio: 3 / 4; }

/* Wide photo paired with a note. */
.strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}
.strip .figure img { aspect-ratio: 20 / 7; object-fit: cover; }
.strip-note h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); margin-bottom: 0.8rem; }
.strip-note p { font-size: 0.95rem; max-width: 46ch; }

/* -------------------------------------------------------------- marquee */

.marquee-section { padding: clamp(2.5rem, 6vw, 4rem) 0; }

.marquee-title {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.marquee {
  overflow: hidden;
  padding: 1.15rem 0;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-list { display: flex; }
.marquee-list li {
  transition: color 0.2s var(--ease);
  padding-inline: 1.75rem;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: var(--ink-soft);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-note { margin-top: 1.35rem; font-size: 0.9rem; max-width: 60ch; }

/* ------------------------------------------------------------- sections */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper-alt); }
.section-warm { background: var(--paper-warm); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.section-head h2 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  max-width: 18ch;
}

.prose { max-width: 62ch; }
.prose p + p { margin-top: 0; }
.prose p { color: var(--ink-soft); }
.prose p:first-child { color: var(--ink); }

.list-caption {
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding-bottom: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------- capabilities */

.capabilities {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.capability {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem clamp(1rem, 4vw, 3rem);
  padding: clamp(1.6rem, 3.5vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line-soft);
}

.capability-number {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.capability:nth-child(even) .capability-number {
  background: var(--warm-tint);
  color: var(--warm);
}

.capability h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  margin-bottom: 0.6rem;
}
.capability p { max-width: 66ch; font-size: 0.98rem; }

/* ------------------------------------------------------------- products */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.product-group {
  padding: clamp(1.75rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}
.product-group:first-child { padding-left: 0; }
.product-group:last-child { border-right: 0; }

.product-group h3 {
  font-size: 1.02rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.product-group ul li {
  position: relative;
  padding: 0.42rem 0 0.42rem 1rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.product-group ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.02em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warm);
  opacity: 0.65;
}

/* ------------------------------------------------------------- partners */

.partners { border-top: 0; }

.partner {
  padding: clamp(1.4rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 0.6rem clamp(1rem, 4vw, 3rem);
  align-items: start;
}

.partner h3 { font-size: 1.05rem; }
.partner p { font-size: 0.95rem; max-width: 58ch; }

/* ---------------------------------------------------------------- facts */

.facts {
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0.35rem clamp(1rem, 4vw, 3rem);
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.fact dt { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--accent); font-weight: 500; }
.fact dd { margin: 0; font-size: 1rem; }

/* -------------------------------------------------------------- offices */

.offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}

.office-label {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-tint);
}
.office-name { margin: 0 0 0.5rem; font-weight: 500; }

.office address {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

.office-contacts { margin-top: 1.1rem; }
.office-contacts li {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.92rem;
}
.office-contacts span.muted { font-size: 0.8rem; padding-top: 0.06rem; }
.office-contacts a { text-decoration: none; border-bottom: 1px solid var(--line); }
.office-contacts a:hover { border-bottom-color: currentColor; }

.contact-lede { margin-top: 1.25rem; max-width: 46ch; }

/* ----------------------------------------------------------------- form */

.form {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  max-width: 780px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 1.5rem;
}

.field { margin-bottom: 1.35rem; }

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.req { color: var(--warm); }

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--ink-soft) 65%, transparent); }

.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field [aria-invalid="true"] { border-color: #c0392b; }

.field-error {
  margin: 0.4rem 0 0;
  min-height: 1.1em;
  font-size: 0.82rem;
  color: #c0392b;
}

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

.form-status {
  display: none;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.93rem;
  border: 1px solid var(--line);
}
.form-status[data-state] { display: block; }
.form-status[data-state="ok"] {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.form-status[data-state="error"] {
  border-color: color-mix(in srgb, #c0392b 45%, transparent);
  background: color-mix(in srgb, #c0392b 8%, transparent);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 0.5rem;
}
.form-note { font-size: 0.88rem; margin: 0; }

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-name { margin: 0 0 0.5rem; font-weight: 500; }
.footer-brand p.muted { max-width: 46ch; font-size: 0.9rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-content: start; }
.footer-nav a { font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.footer-base p { font-size: 0.82rem; margin: 0; }

/* -------------------------------------------------------------- reveals */

/* Scoped to .js so the page still shows everything if the script never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------- breakpoints */

@media (max-width: 900px) {
  .hero-grid,
  .media,
  .media-narrow,
  .strip { grid-template-columns: 1fr; }
  .hero-figure,
  .media .figure,
  .media-narrow .figure,
  .strip .figure { max-width: 100%; margin-left: 0; }
  .media-narrow .figure { max-width: 300px; }
  .section-grid { grid-template-columns: 1fr; }
  .section-head h2 { max-width: 24ch; }
  .partner { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; }
  .product-group,
  .product-group:first-child { padding-inline: 0; border-right: 0; }
}

@media (max-width: 780px) {
  .nav, .header-inner > .btn-sm { display: none; }
  .menu-toggle { display: flex; }
  .stats { grid-template-columns: 1fr; gap: 1.75rem; }
  .stat-label { max-width: none; }
  .capability { grid-template-columns: 1fr; gap: 0.5rem; }
  .capability-number { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
