/* =========================================================
   Cace Designer | Paola Carreto — shared styles
   Colours: #1c1c1c #eeeeee #5635ee #d000c2 #fb7b62
   Font: Lato
   ========================================================= */

/* ---------- Brand font: Lato (files in /fonts, license in fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Thin.woff") format("woff"), url("fonts/Lato-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-ThinItalic.woff") format("woff"), url("fonts/Lato-ThinItalic.ttf") format("truetype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Light.woff") format("woff"), url("fonts/Lato-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-LightItalic.woff") format("woff"), url("fonts/Lato-LightItalic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Regular.woff") format("woff"), url("fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Italic.woff") format("woff"), url("fonts/Lato-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Bold.woff") format("woff"), url("fonts/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-BoldItalic.woff") format("woff"), url("fonts/Lato-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Black.woff") format("woff"), url("fonts/Lato-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-BlackItalic.woff") format("woff"), url("fonts/Lato-BlackItalic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1c1c1c;
  --paper: #eeeeee;
  --violet: #5635ee;
  --magenta: #d000c2;
  --coral: #fb7b62;

  --font: "Lato", system-ui, sans-serif;
  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 56px);
  --space: clamp(80px, 12vw, 160px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Keep the footer at the bottom on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; display: flex; flex-direction: column; }
main > section:last-child { flex: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--violet); color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Language switch: show only the chosen language */
html[data-lang="en"] .es,
html[data-lang="es"] .en { display: none !important; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
}
.skip:focus { left: 8px; }

/* ---------- Small text pieces ---------- */
.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--violet);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.link:hover { color: var(--violet); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 16px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--violet); color: var(--paper); }
.btn--primary:hover { background: var(--magenta); }

.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.btn--coral { background: var(--coral); color: var(--ink); }
.btn--coral:hover { background: var(--paper); }

.btn--small { padding: 10px 20px; font-size: 14px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

/* The logo file is square with empty space above and below: crop to the word */
.header__logo { display: block; }
.header__logo img {
  width: 104px;
  height: auto;
  aspect-ratio: 1200 / 440;
  object-fit: cover;
}

.nav { display: flex; gap: 36px; }
.nav a {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--violet); }
.nav a[aria-current="page"] {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.header__actions { display: flex; align-items: center; gap: 16px; }

.lang {
  display: flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 12px/1 var(--font);
  letter-spacing: 0.08em;
  padding: 8px 10px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Intro ---------- */
.hero {
  padding-top: clamp(64px, 10vw, 140px);
  display: flex;
  flex-direction: column;
}
.hero > .wrap { padding-bottom: clamp(64px, 9vw, 120px); }

.hero .label { color: var(--violet); margin-bottom: 28px; }

.hero__title {
  font-size: clamp(44px, 8.4vw, 124px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero__title em,
.contact__title em {
  font-style: italic;
  font-weight: 900;
  color: var(--violet);
}

.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(40px, 6vw, 72px);
}

.hero__meta { font-size: 16px; line-height: 1.5; }

.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Three-colour band under the intro */
.stripe {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  height: 14px;
  margin-top: auto;
}
.stripe i:nth-child(1) { background: var(--violet); }
.stripe i:nth-child(2) { background: var(--magenta); }
.stripe i:nth-child(3) { background: var(--coral); }

/* ---------- Projects ---------- */
.work { padding: var(--space) 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(20px, 3vw, 40px);
  row-gap: clamp(48px, 6vw, 80px);
}

/* Offset every second card for rhythm on large screens */
.project:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }

.project__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project__link:hover .project__name { color: var(--violet); }

.project__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.35s ease;
}
.project:hover .project__img { transform: scale(0.98); }

/* Placeholder blocks until the real images arrive */
.ph {
  display: flex;
  align-items: flex-end;
  padding: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper);
}
.ph--violet  { background: var(--violet); }
.ph--magenta { background: var(--magenta); }
.ph--coral   { background: var(--coral); color: var(--ink); }
.ph--ink     { background: var(--ink); }

.project__info {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: baseline;
  margin-top: 20px;
}
.project__num {
  grid-row: span 2;
  font-size: 14px;
  font-weight: 700;
  color: var(--violet);
}
.project__name {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.project__type { font-size: 16px; margin-top: 4px; }
.project__name { transition: color 0.2s; }
.project__desc {
  grid-column: 2;
  font-size: 15px;
  line-height: 1.55;
  margin-top: 12px;
  max-width: 52ch;
  opacity: 0.85;
}

/* ---------- About ---------- */
.about {
  padding: var(--space) 0;
  border-top: 1px solid rgba(28, 28, 28, 0.12);
}

.about__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 6px;
}

.about__text .section-title { margin-bottom: 32px; }
.about__text p + p { margin-top: 18px; }

.lead {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 18px;
}

.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px solid var(--ink);
}
.about__cols .label { margin-bottom: 16px; color: var(--violet); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 15px;
  font-weight: 700;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

/* ---------- Statement ---------- */
.statement {
  background: var(--violet);
  color: var(--paper);
  padding: clamp(72px, 10vw, 140px) 0;
}
.statement__text {
  font-size: clamp(30px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 20ch;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space) 0;
}
/* Contact as its own page: fill the screen */
.contact--page {
  min-height: calc(100vh - 77px - 81px);
  display: flex;
  align-items: center;
}
.contact--page .wrap { width: 100%; }

.contact .label { color: var(--coral); margin-bottom: 28px; }

.contact__title {
  font-size: clamp(40px, 7vw, 100px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 48px;
}
.contact__title em { color: var(--coral); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 56px;
}
.contact__links a {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--magenta);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.contact__links a:hover { color: var(--coral); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(238, 238, 238, 0.15);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  /* Menu moves to its own row under the logo */
  .header__inner { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 12px; row-gap: 10px; }
  .nav { order: 3; width: 100%; gap: 28px; overflow-x: auto; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 420px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav { gap: 22px; }
  .nav a { font-size: 14px; white-space: nowrap; }
  .header__logo img { width: 80px; }
  .header__actions { gap: 10px; }
  .btn--small { padding: 9px 14px; font-size: 13px; }

  .hero__buttons { width: 100%; }
  .hero__buttons .btn { flex: 1; text-align: center; }

  .projects { grid-template-columns: 1fr; }
  .project:nth-child(even) { margin-top: 0; }

  .about__cols { grid-template-columns: 1fr; gap: 32px; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
