/* =========================================================
   THE CAR PLATE MAKER — landing page
   assests/css/style.css
   ========================================================= */

:root {
  --red: #e1121a;
  --red-dark: #b60d14;
  --ink: #16181c;
  --ink-2: #4a4f57;
  --ink-3: #8a9099;
  --line: #d2d6db;
  --plate-black: #16171a;

  --steel-1: #fbfbfc;
  --steel-2: #e9ebed;
  --steel-3: #dcdfe3;

  --display: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --util: "Barlow Condensed", "Barlow", sans-serif;

  --header-h: 84px;
  --rail-w: 168px;

  /* plate dimensions — every 3D face is derived from these */
  --pw: 620px;   /* width  */
  --ph: 168px;   /* height */
  --pd: 26px;    /* depth  */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--display);
  color: var(--ink);
  background: #0d0e10;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header,
.hero {
  background: linear-gradient(160deg, var(--steel-1) 0%, var(--steel-2) 45%, var(--steel-3) 72%, var(--steel-1) 100%);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 34px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
/* =========================================================
   VIEWPORT FIT — must stay last in this file
   ========================================================= */

html:root {
  --ph: clamp(96px, 17vh, 168px);
  --pw: calc(var(--ph) * 3.7);
  --pd: calc(var(--ph) * 0.155);
}

.site-header,
.hero {
background: radial-gradient(105% 62% at 50% 20%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 40%, transparent 72%), linear-gradient(180deg, #acb2b7 0%, #f1f8ff 30%, #d4d8dc 58%, #c9cdd2 76%, #d3d4d4 84%, #cbcfd2 86%, #848c98 100%);
}

html, body { height: 100%; }

.hero {
  height: calc(100dvh - var(--header-h));
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.hero-centre {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(12px, 2.4vh, 32px) 30px 0;
}

.plate-scene {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin-top: clamp(4px, 1.2vh, 16px);
}

.eyebrow      { margin-bottom: clamp(5px, 1vh, 14px); }
.rule         { margin: clamp(8px, 1.8vh, 22px) auto clamp(6px, 1.4vh, 18px); }
.hero-kicker  { margin-bottom: clamp(5px, 1vh, 14px); }
.hero-copy    { margin-bottom: clamp(12px, 2.4vh, 30px); }
.hero-actions { margin-bottom: 0; }

@keyframes plate-spin {
  from { transform: rotateX(12deg) rotateY(0deg); }
  to   { transform: rotateX(12deg) rotateY(360deg); }
}

.plate-obj {
  animation: plate-spin 18s linear infinite;
  top: 44%;
}


.plate-obj:hover,
.plate-obj.is-grabbing {
  animation-play-state: paused;
}
.plate-scene {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin-top: clamp(4px, 1.2vh, 16px);
  perspective-origin: 50% 40%;
}

.plate-obj {
  top: 44%;
}

@media (max-height: 700px) {
  .plate-hint { display: none; }
  .hero-copy br { display: none; }
}

@media (max-width: 900px) {
  .hero {
    height: auto;
    min-height: calc(100dvh - var(--header-h));
    overflow: visible;
  }

  .hero-centre { display: block; }
  .plate-scene { height: calc(var(--ph) + 130px); }
}

@media (prefers-reduced-motion: reduce) {
  .plate-obj { animation: none; }
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  display: block;
  height: 54px;
  width: auto;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 30px;
}

.site-nav a {
  font-family: var(--util);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--red);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--util);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease,
              box-shadow 0.18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-corporate {
  height: 44px;
  padding: 0 20px;
  background: rgba(255,255,255,0.82);
  border-color: var(--line);
  color: var(--ink);
}

.btn-corporate:hover {
  background: #fff;
  border-color: var(--ink-3);
}

.btn-primary {
  height: 56px;
  padding: 0 34px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(225,18,26,0.26);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(225,18,26,0.32);
}

.btn-ghost {
  height: 56px;
  padding: 0 26px;
  background: rgba(255,255,255,0.9);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--ink-3);
  transform: translateY(-2px);
}

.btn:focus-visible,
.site-nav a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* =========================================================
   HERO LAYOUT
   ========================================================= */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: var(--rail-w) 1fr var(--rail-w);
  align-items: start;
  padding-bottom: 40px;
}

.rail {
  display: flex;
  flex-direction: column;
  padding: 34px 0;
}

.rail-left { border-right: 1px solid rgba(0,0,0,0.07); }
.rail-right { border-left: 1px solid rgba(0,0,0,0.07); }

.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  color: var(--ink-2);
}

.rail-item + .rail-item {
  border-top: 1px solid rgba(0,0,0,0.07);
}

.rail-item svg {
  width: 30px;
  height: 30px;
  color: var(--ink);
  stroke-width: 1.5;
}

.rail-item span {
  font-family: var(--util);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
  text-align: center;
}

.hero-centre {
  padding: 40px 30px 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--util);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 5.6vw, 74px);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.02;
  text-transform: uppercase;
}

.hero-title em {
  font-style: normal;
  color: var(--red);
}

.rule {
  width: 62px;
  height: 3px;
  margin: 22px auto 18px;
  background: var(--red);
  border-radius: 2px;
}

.hero-kicker {
  margin: 0 0 14px;
  font-family: var(--util);
  font-size: clamp(14px, 1.5vw, 19px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero-copy {
  margin: 0 0 30px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

/* =========================================================
   SIGNATURE — rotatable 3D plate
   ========================================================= */
.plate-scene {
  position: relative;
  width: var(--pw);
  max-width: 100%;
  height: calc(var(--ph) + 61px);
  margin: 0 auto;
  perspective: 1500px;
  perspective-origin: 50% 46%;
}

/* the rotating object */
.plate-obj {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--pw);
  height: var(--ph);
  margin-left: calc(var(--pw) / -2);
  margin-top: calc(var(--ph) / -2);
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-22deg);
  cursor: grab;
  touch-action: none;
  outline: none;
}

.plate-obj.is-grabbing { cursor: grabbing; }

.plate-obj:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 22px;
  border-radius: 8px;
}

/* every face shares this */
.pf {
  position: absolute;
  backface-visibility: hidden;
}

/* ---- front and back panels ---- */
.pf-front,
.pf-back {
  left: 0;
  top: 0;
  width: var(--pw);
  height: var(--ph);
  border-radius: 16px;
  overflow: hidden;
}

.pf-front { transform: translateZ(calc(var(--pd) / 2)); }
.pf-back  { transform: rotateY(180deg) translateZ(calc(var(--pd) / 2)); }

/* ---- the four side walls: this is the actual thickness ---- */
.pf-top,
.pf-bottom {
  left: 0;
  top: calc(50% - var(--pd) / 2);
  width: var(--pw);
  height: var(--pd);
  background: linear-gradient(180deg, #f6f7f8 0%, #c3c8ce 40%, #878e96 100%);
}

.pf-top    { transform: rotateX(90deg)  translateZ(calc(var(--ph) / 2)); }
.pf-bottom { transform: rotateX(-90deg) translateZ(calc(var(--ph) / 2)); }

.pf-bottom { background: linear-gradient(180deg, #6f767e 0%, #9aa1a9 55%, #d5d9dd 100%); }

.pf-left,
.pf-right {
  top: 0;
  left: calc(50% - var(--pd) / 2);
  width: var(--pd);
  height: var(--ph);
  background: linear-gradient(90deg, #8b929a 0%, #c9ced4 45%, #f2f4f5 100%);
}

.pf-left  { transform: rotateY(-90deg) translateZ(calc(var(--pw) / 2)); }
.pf-right { transform: rotateY(90deg)  translateZ(calc(var(--pw) / 2)); }

.pf-right { background: linear-gradient(90deg, #f2f4f5 0%, #b9bfc6 50%, #7d848c 100%); }

/* ---- chrome frame + black face on the front panel ---- */
.plate-face {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(148deg,
    #ffffff 0%, #b9bfc6 15%, #7c828a 31%, #e8eaed 49%,
    #9aa0a8 64%, #6d737b 81%, #f2f4f6 100%);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.9),
    inset 0 -2px 3px rgba(0,0,0,0.3);
}

.plate-face::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 9px;
  background:
    linear-gradient(163deg, rgba(255,255,255,0.08) 0%, transparent 36%),
    linear-gradient(175deg, #2b2e33 0%, var(--plate-black) 44%, #08090b 100%);
  box-shadow: inset 0 3px 9px rgba(0,0,0,0.85);
}

/* red inlay */
.plate-face::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 2;
  border: 1px solid rgba(225,18,26,0.7);
  border-radius: 6px;
  pointer-events: none;
}

/* ---- raised characters ---- */
.plate-text {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  font-family: var(--display);
  font-size: calc(var(--ph) * 0.60);
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1;
  text-align: center;
  color: #3a3f46;
  text-shadow:
    1px 1px 0 #34383f,
    2px 2px 0 #2e3238,
    3px 3px 0 #282c32,
    4px 4px 0 #22262b,
    5px 5px 0 #1c2025,
    6px 6px 0 #16191e,
    7px 7px 1px rgba(0,0,0,0.7),
    10px 12px 16px rgba(0,0,0,0.65);
}

.plate-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  color: #ffffff;
  transform: translate3d(-1.5px, -2.5px, 0);
}

/* ---- reverse side ---- */
.plate-back {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(148deg, #dfe2e6 0%, #a8aeb5 34%, #ced3d8 60%, #8f959d 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

.plate-back-mark {
  font-family: var(--display);
  font-size: calc(var(--ph) * 0.26);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #5a6068;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}

.plate-back-sub {
  font-family: var(--util);
  font-size: calc(var(--ph) * 0.09);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #767d85;
}

/* ---- ground shadow, moved by JS ---- */
.plate-shadow {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: calc(var(--pw) * 0.82);
  height: 30px;
  margin-left: calc(var(--pw) * -0.41);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.15) 46%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.plate-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  font-family: var(--util);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-3);
  transition: opacity 0.4s ease;
}

.plate-hint.is-hidden { opacity: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  :root {
    --rail-w: 132px;
    --pw: 520px;
    --ph: 142px;
    --pd: 22px;
  }

  .rail-item { padding: 16px 8px; }
  .rail-item svg { width: 25px; height: 25px; }
  .rail-item span { font-size: 11px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }

  .hero-centre {
    order: 1;
    padding: 30px 20px 0;
  }

  .rail {
    order: 2;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 16px;
    border: 0;
  }

  .rail-left { margin-top: 30px; }

  .rail-item {
    flex: 1 1 132px;
    padding: 18px 8px;
  }

  .rail-item + .rail-item { border-top: 0; }

  .site-nav { display: none; }
  .brand img { height: 44px; }
}

@media (max-width: 560px) {
  :root {
    --pw: 300px;
    --ph: 84px;
    --pd: 14px;
  }

  .site-header { padding: 12px 16px; gap: 12px; }
  .brand img { height: 38px; }

  .btn-corporate {
    height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .eyebrow { letter-spacing: 0.28em; font-size: 13px; }
  .hero-copy { font-size: 15px; }

  .hero-actions .btn {
    width: 100%;
    height: 52px;
  }

  .plate-face { padding: 8px; border-radius: 11px; }
  .plate-face::after { inset: 8px; border-radius: 6px; }
  .plate-face::before { inset: 14px; }
  .pf-front, .pf-back { border-radius: 11px; }

  .rail-item { flex: 1 1 44%; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .btn:hover { transform: none; }
}
/* =========================================================
   MOBILE FIT — this block must stay last in the file
   ========================================================= */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* size the plate by whichever of height/width is tighter */
html:root {
  --ph: clamp(58px, min(17vh, 21vw), 168px);
  --pw: calc(var(--ph) * 3.7);
  --pd: calc(var(--ph) * 0.155);
}
/* ============================================================
   OVERFLOW FIX — keep this as the LAST rule in the file
   ============================================================ */
@media (max-width: 900px) {
  /* the earlier 900px block sets overflow:visible, which lets the
     absolutely-positioned plate widen the page - clip it here */
  .hero {
    width: 100%;
    max-width: 100vw;
    grid-template-columns: 1fr;
    overflow-x: clip;
  }

  .hero-centre {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  .hero-title,
  .hero-kicker,
  .hero-copy,
  .eyebrow {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .hero-title { font-size: clamp(20px, 6.2vw, 74px); }

  .hero-kicker {
    font-size: clamp(10px, 2.7vw, 19px);
    letter-spacing: 0.1em;
  }

  .hero-copy {
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 30ch;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-copy br { display: none; }

  .hero-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 14px;
    font-size: 13px;
    letter-spacing: 0.07em;
    box-sizing: border-box;
  }

  /* the plate is absolutely positioned, so cap the scene itself */
  .plate-scene {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  .site-header {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
}