/**
 * Malta 360 — tokens, reset, type, container, buttons, labels.
 * Owner: Foundation A. See docs/frontend-conventions.md.
 * Tokens eyedropped from the settled frame; swap when the token export lands.
 */

:root {
  /* Figma styles: Base, Ink, Off-White, Primary, Secondary, Accent/500 + the
     per-section accents used in the file. */
  --m360-bg: #000000;
  --m360-surface: #0B0B0D;
  --m360-surface-2: #141416;
  --m360-line: rgba(255, 255, 255, .1);
  --m360-line-2: rgba(255, 255, 255, .2);

  --m360-text: #F7F7F3;
  --m360-text-2: #A7A7A2;
  --m360-text-3: #6B6B6B;
  --m360-white: #FFFFFF;
  --m360-ink: #0B0B0D;

  --m360-green: #4D9D5D;
  --m360-blue: #2A3FBF;
  --m360-orange: #E65F34;
  --m360-sky: #54A5DB;
  --m360-magenta: #D346A6;
  --m360-violet: #9747FF;
  --m360-lime: #22C55E;
  --m360-royal: #1E40AF;
  --m360-tangerine: #F97316;
  --m360-cobalt: #2F49CA;

  --m360-font-display: Inter, system-ui, sans-serif;
  --m360-font-hero: "Inter Tight", Inter, system-ui, sans-serif;
  --m360-font-body: Inter, system-ui, sans-serif;
  --m360-font-label: "Inter Tight", Inter, system-ui, sans-serif;

  --m360-container: 1280px;
  --m360-gutter: clamp(24px, 5.5vw, 80px);
  --m360-section-y: clamp(72px, 11vw, 160px);
  --m360-radius: 0;

  /* One Figma pixel: 1px from the 1440 canvas up, scales down below it.
     Shape geometry is written as calc(N * var(--u)) with N straight from Figma. */
  --u: min(1px, calc(100vw / 1440));

  --m360-ease: cubic-bezier(.22, 1, .36, 1);
  --m360-dur: .8s;

  /* Default section accent; sections override on their own scope. */
  --accent: var(--m360-green);
}

/* ---- reset ------------------------------------------------------------- */

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

body,
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }

img, svg, video { max-width: 100%; height: auto; display: block; }

body {
  background: var(--m360-bg);
  color: var(--m360-text);
  font-family: var(--m360-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- layout ------------------------------------------------------------ */

.m360-container {
  /* Content column is 1280 (design: 80px gutters on the 1440 canvas). The gutter
     is padding inside a border-box, so add it to the max-width, not subtract. */
  max-width: calc(var(--m360-container) + 2 * var(--m360-gutter));
  margin-inline: auto;
  padding-inline: var(--m360-gutter);
}

.m360-section {
  position: relative;
  padding-block: var(--m360-section-y);
  overflow: hidden;
}

.m360-section--light {
  background: var(--m360-white);
  color: var(--m360-ink);
}

.m360-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1024px) {
  .m360-grid { grid-template-columns: repeat(min(2, var(--cols, 3)), minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .m360-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- type -------------------------------------------------------------- */

/* Section eyebrow: Inter Medium 12/16, 4.8px tracking. */
.m360-eyebrow {
  font-family: var(--m360-font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Section heading: Inter Regular 72/72, -4.8px tracking, caps. */
.m360-display {
  font-family: var(--m360-font-display);
  font-weight: 400;
  letter-spacing: -.0667em;
  line-height: 1;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 40px);
}

/* Hero / CTA band: Inter Tight Regular 100/100. */
.m360-display--xl { font-family: var(--m360-font-hero); font-size: clamp(52px, 6.95vw, 100px); letter-spacing: -.048em; }
.m360-display--lg { font-size: clamp(40px, 5vw, 72px); }
.m360-display--md { font-size: clamp(28px, 2.8vw, 40px); }

/* Card / row titles: Inter 24/28, -0.375px, caps. */
.m360-title {
  font-family: var(--m360-font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -.375px;
  text-transform: uppercase;
}

/* Two-tone headline: *asterisks* in the field become this. */
.m360-accent {
  color: var(--accent);
  font-style: normal;
}

.m360-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.625;
  color: var(--m360-text-2);
  max-width: 560px;
}

.m360-section-head {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.m360-section-head--center {
  align-items: center;
  gap: 24px;
  text-align: center;
}

.m360-section-head--center .m360-lede { margin-inline: auto; }

.m360-section--light .m360-lede { color: #4A4A4A; }

/* Figma mobile: section headings 40/48, −2.4px; ledes 20/32.5. */
@media (max-width: 640px) {
  .m360-display--lg { font-size: 40px; line-height: 48px; letter-spacing: -2.4px; }
  .m360-lede { font-size: 20px; line-height: 32.5px; }
}

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

/* Figma "Button": Inter Tight Bold 12, 2.16px tracking, 20/24 padding, 16px arrow. */
.m360-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid transparent;
  border-radius: var(--m360-radius);
  background: none;
  color: inherit;
  font-family: var(--m360-font-label);
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--m360-ease), color .25s var(--m360-ease), border-color .25s var(--m360-ease);
}

.m360-btn__icon { width: 16px; height: 16px; flex: 0 0 16px; }

.m360-btn--primary {
  background: var(--m360-green);
  color: var(--m360-text);
}

.m360-btn--primary:hover { background: #3F8650; }

.m360-btn--ghost { border-color: var(--m360-white); color: var(--m360-white); }
.m360-btn--ghost:hover { background: var(--m360-white); color: var(--m360-ink); }

.m360-btn--ghost-dark { border-color: var(--m360-ink); color: var(--m360-ink); }
.m360-btn--ghost-dark:hover { background: var(--m360-ink); color: var(--m360-white); }

.m360-btn:focus-visible,
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--m360-green);
  outline-offset: 3px;
}

/* ---- surfaces ---------------------------------------------------------- */

.m360-card {
  background: var(--m360-surface);
  border: 1px solid var(--m360-line);
  border-radius: var(--m360-radius);
}

.m360-card--accent { border-left: 2px solid var(--accent); }

/* Holds layout when an image field is empty. */
.m360-placeholder {
  display: block;
  width: 100%;
  border-radius: var(--m360-radius);
  /* Reads as a deliberate image slot, not a dead box: fine diagonal hairlines over a dark gradient. */
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 16px),
    linear-gradient(160deg, #1C1C1C 0%, #0D0D0D 100%);
}

/* ---- a11y -------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The vendored parent theme forces `ol, ul { margin: 1em 0 !important;
   padding-left: 40px !important }`, which offsets every list we use for layout
   (menus, footer columns, socials, legend). Reset it for our components only;
   rich-text lists keep theirs. */
.m360-header ul,
.m360-footer ul,
.m360-exhibit__legend {
  margin: 0 !important;
  padding-left: 0 !important;
}
.m360-exhibit .m360-exhibit__legend { margin-top: 48px !important; }
