/* Rubik Team - shared styles. Values mirror the design mockup 1:1. */

:root {
  --accent: #D23A31;
  --ink: #141414;
  --night: #0D0D0E;
  --paper: #EFEDEA;
  --line: #E2DED8;
  --input-line: #CFCBC5;
  --muted: #6E6A64;
  --body: #4A4845;
  --body-strong: #3E3C39;
  --on-dark: #C9C5BE;
  --on-dark-muted: #B9B5AE;
  --display: 'Barlow Condensed', sans-serif;

  --belt-white: #F4F2EE;
  --belt-blue: #3D66A6;
  --belt-purple: #5E4290;
  --belt-brown: #6A473A;
  --belt-black: #141414;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, sans-serif;
}

a { color: var(--ink); }
a:hover { color: #000000; }

.accent { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.stack { display: flex; flex-direction: column; }

.dark { background: var(--night); color: #FFFFFF; }

.section { padding: 104px 0; }
.section--flush-top { padding-top: 0; }
.section > .container { display: flex; flex-direction: column; gap: 48px; }

/* ---------- Type ---------- */

.tag {
  align-self: flex-start;
  padding: 4px 12px;
  background: var(--accent);
  color: #FFFFFF;
  transform: skewX(-12deg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag--sm { padding: 3px 10px; font-size: 14px; letter-spacing: 0.12em; }
.tag--dark { background: var(--ink); }

.display {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
}

.section-title { font-size: clamp(40px, 5vw, 64px); line-height: 0.92; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head__title { display: flex; flex-direction: column; gap: 16px; }

.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--body); }
.lead--story { line-height: 1.65; color: var(--body-strong); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn--accent { background: var(--accent); color: #FFFFFF; }
.btn--dark { background: var(--ink); color: #FFFFFF; }
.btn--ghost { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 2px #FFFFFF; }
.btn--md { gap: 10px; padding: 0 24px; font-size: 19px; }
.btn--sm { min-height: 44px; font-size: 17px; padding: 0 20px; }
.btn:hover { color: #FFFFFF; }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--outline:hover { color: var(--ink); }

/* ---------- Header ---------- */

.site-header { background: var(--night); color: #FFFFFF; border-bottom: 1px solid #222224; }
.site-header .container {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: #FFFFFF; text-decoration: none; }
.brand:hover { color: #FFFFFF; }
.brand img { width: 46px; height: 51px; object-fit: contain; }
.brand span {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.main-nav__link { color: #E4E1DC; text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 0; }
.main-nav__link:hover { color: #FFFFFF; }
.main-nav__link[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--accent); }
.site-header .lang-switch { margin-left: 12px; } /* 16px container gap + 12px = the nav's 28px rhythm */

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #1C1C1E;
  color: #FFFFFF;
  cursor: pointer;
}
.menu-toggle__close, .site-header.is-open .menu-toggle__open { display: none; }
.site-header.is-open .menu-toggle__close { display: block; }

/* The one-line header needs ~1214px in Portuguese (the longer labels), plus room for a desktop scrollbar. */
@media (max-width: 1240px) {
  .site-header .container { min-height: 72px; gap: 12px; }
  .site-header .lang-switch { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; order: 1; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .site-header.is-open .main-nav { display: flex; }
  .main-nav__link { padding: 14px 0; font-size: 17px; border-top: 1px solid #222224; }
  .main-nav__link[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .main-nav .btn { margin-top: 12px; }
}
@media (max-width: 400px) {
  .brand img { width: 38px; height: 42px; }
  .brand span { font-size: 22px; }
}

/* Belt-colour stripe */
.stripe { display: flex; height: 10px; }
.stripe--thin { height: 6px; }
.stripe span { flex: 1 1 0; }
.stripe span:nth-child(1) { background: var(--belt-white); }
.stripe span:nth-child(2) { background: var(--belt-blue); }
.stripe span:nth-child(3) { background: var(--belt-purple); }
.stripe span:nth-child(4) { background: var(--belt-brown); }
.stripe span:nth-child(5) { background: var(--belt-black); }

/* ---------- Hero ---------- */

.hero .container {
  padding-top: 88px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}
.hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__title { font-size: clamp(64px, 9vw, 132px); line-height: 0.86; }
.hero__text { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.6; color: var(--on-dark); }
.hero__text strong { color: #FFFFFF; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero__logo { flex: 0 1 380px; width: 100%; max-width: 380px; height: auto; object-fit: contain; }

/* ---------- Class colours (cards + timetable sessions) ---------- */

.c-kids, .c-1, .c-12, .c-2, .c-nogi, .c-comp, .c-open {
  --fg: #FFF;
  --edge: inset 0 3px 0 rgba(255,255,255,0.14);
  --pill: rgba(0,0,0,0.25);
}
.c-kids { --bg: #FFFFFF; --fg: #121212; --edge: inset 0 0 0 2px #121212; --pill: rgba(0,0,0,0.08); }
.c-1 { --bg: #3D66A6; }
.c-12 { --bg: #5E4290; }
.c-2 { --bg: #6A473A; }
.c-nogi { --bg: #2E2E30; }
.c-comp { --bg: #B7332C; }
.c-open { --bg: #D6D2CB; --fg: #121212; --pill: rgba(0,0,0,0.08); }

/* ---------- Classes ---------- */

.classes__lead { max-width: 440px; }

.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }

.class-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--line);
}
.class-card__head {
  padding: 20px 22px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--edge);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.class-card__name { font-size: 30px; line-height: 1; }
.class-card__level { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.class-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.class-card__body p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body-strong); }
.class-card__when { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- Timetable ---------- */

.timetable > .container { gap: 40px; }

.timetable__frame { overflow-x: auto; border-radius: 20px; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line); }
.timetable__grid {
  min-width: 900px;
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.day { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); }
.day__short { font-size: 32px; line-height: 1; }
.day__long { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }

.period { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.period__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.period__rule { flex-grow: 1; height: 1px; background: var(--input-line); }

.slot { display: flex; flex-direction: column; gap: 10px; }
.slot__empty { padding: 12px 0; font-size: 13px; color: #8A867F; }

.session {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--edge), 0 6px 14px rgba(20,20,20,0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.session__name { font-weight: 600; font-size: 24px; line-height: 0.95; }
.session__time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.session__coach { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: var(--pill); font-size: 12px; font-weight: 500; }

/* ---------- Coaches ---------- */

.coach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 1100px) { .coach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .coach-grid { grid-template-columns: 1fr; } }
.coach { display: flex; flex-direction: column; gap: 16px; }
.coach__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 16px;
  background: #1C1C1E;
}
.coach__info { display: flex; flex-direction: column; gap: 6px; }
.coach__name { font-size: 34px; line-height: 1; color: #FFFFFF; }
.coach__info p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--on-dark-muted); }

/* Photo placeholder */
.placeholder {
  border-radius: 16px;
  background: #1C1C1E;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  box-sizing: border-box;
}
.placeholder--portrait { aspect-ratio: 4 / 5; }
.placeholder--landscape { aspect-ratio: 3 / 2; }
.placeholder span { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: #8F8B85; text-transform: uppercase; }

/* ---------- Contact ---------- */

.contact .container { flex-direction: row; flex-wrap: wrap; }
.contact__intro { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__lead { max-width: 460px; }
.contact__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.contact__quick .btn { gap: 10px; padding: 0 24px 0 20px; }
.contact__hint { font-size: 14px; color: var(--muted); }

.details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 0;
  padding: 24px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--line);
}
.details div { display: flex; flex-direction: column; gap: 2px; }
.details dt, .facts dt { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.details dd { margin: 0; font-size: 16px; }

.trial-form {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 20px 40px rgba(20,20,20,0.08), inset 0 0 0 1px var(--line);
}
.trial-form__row { display: flex; flex-wrap: wrap; gap: 18px; }
.trial-form__row .field { flex: 1 1 200px; }
.trial-form .btn { margin-top: 6px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--body-strong); }
.field input, .field select, .field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--input-line);
  background: #FFFFFF;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field textarea { resize: vertical; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: var(--on-dark-muted); }
.site-footer .container {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__brand img { width: 40px; height: 44px; object-fit: contain; }
.site-footer__brand span { font-size: 14px; }
.motto {
  padding: 4px 14px;
  background: #FFFFFF;
  color: var(--night);
  transform: skewX(-12deg);
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ================= Inner pages ================= */

.page-hero .container { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 24px; }
.page-hero__title { max-width: 980px; font-size: clamp(56px, 8vw, 116px); line-height: 0.88; }
.page-hero__text { margin: 0; max-width: 640px; font-size: 19px; line-height: 1.6; color: var(--on-dark); }
.page-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.page-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #1C1C1E; color: #FFFFFF; text-decoration: none; font-size: 15px; font-weight: 500; }
.page-nav a:hover { color: #FFFFFF; }

/* History */
.history__lead { max-width: 480px; }
.timeline { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 28px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--line);
}
.timeline__year { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 40px; line-height: 1; color: var(--accent); }
.timeline h3 { font-size: 26px; line-height: 1; }
.timeline p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); }

/* Philosophy */
.philosophy .section-head { gap: 32px; }
.philosophy__copy { max-width: 540px; display: flex; flex-direction: column; gap: 16px; }
.philosophy__copy p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--on-dark); }

.belt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.belt { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 16px; background: #1A1A1C; box-shadow: inset 0 0 0 1px #2A2A2D; }
.belt__swatch { width: 56px; height: 56px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 3px 0 rgba(255,255,255,0.14); }
.belt__swatch--black { box-shadow: inset 0 3px 0 rgba(255,255,255,0.14), inset 0 0 0 1px #3A3A3D; }
.belt h3 { font-size: 28px; line-height: 1; color: #FFFFFF; }
.belt p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); }

/* Culture */
.culture__lead { max-width: 460px; }
.values { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 32px; }
.value { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 3px solid var(--ink); }
.value__num { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; color: var(--accent); }
.value h3 { font-size: 30px; line-height: 0.95; }
.value p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }

/* Lineage */
.lineage__panel {
  border-radius: 24px;
  background: #E4E1DC;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
}
.lineage__copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.lineage__tree { flex: 1 1 420px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.lineage__tree li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lineage__tree li + li::before { content: ""; width: 2px; height: 28px; background: #B5B0A8; }
.lineage__node {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 18px 24px;
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lineage__node span:first-child { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 28px; line-height: 1; text-transform: uppercase; }
.lineage__node span:last-child { font-size: 14px; color: #5C5A57; }
.lineage__node--head { background: var(--accent); color: #FFFFFF; box-shadow: none; }
.lineage__node--head span:last-child { color: rgba(255,255,255,0.85); }
.lineage__node--team { background: var(--ink); color: #FFFFFF; box-shadow: none; }
.lineage__node--team span:last-child { color: var(--on-dark-muted); }

/* Closing CTA */
.cta { padding: 88px 0; }
.cta .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }

/* ================= Locations ================= */

.locations { padding: 96px 0; }
.locations .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 28px;
  align-items: start;
}
.page-hero__text--narrow { max-width: 620px; }

.location {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 20px 40px rgba(20,20,20,0.08), inset 0 0 0 1px var(--line);
}
.location__map { display: block; aspect-ratio: 16 / 9; background: #E4E1DC; }
.location__map img { display: block; width: 100%; height: 100%; object-fit: cover; }
.location__body { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 18px; }
.location__head { display: flex; flex-direction: column; gap: 10px; }
.location__name { font-size: clamp(44px, 5vw, 60px); line-height: 0.9; }
.location__region { font-size: 15px; color: #5C5A57; }
.location__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.facts { display: flex; flex-direction: column; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts dd { margin: 0; font-size: 16px; line-height: 1.5; }

.band {
  border-radius: 24px;
  background: #E4E1DC;
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.band__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.band__copy p { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--body-strong); }
.band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Language switch ---------- */

.lang-switch { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: #1C1C1E; }
.lang-switch button {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #8F8B85;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-switch button:hover { color: #FFFFFF; }
.lang-switch button[aria-pressed="true"] { background: #FFFFFF; color: var(--night); }
