/* ============ rphlimacosta — website UI kit styles ============ */
@import url("./colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--fg-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layout primitives */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--graphite-20); }
@media (max-width: 720px) { .section { padding: 56px 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 0 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid var(--graphite-20);
  backdrop-filter: blur(0); /* explicit no-blur */
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.site-nav a {
  color: var(--fg-2);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-productive);
}
.site-nav a:hover, .site-nav a.is-active {
  color: var(--fg-1);
  border-bottom: 1px solid var(--fg-1);
}
@media (max-width: 720px) { .site-nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background var(--dur-fast) var(--ease-productive),
              color var(--dur-fast) var(--ease-productive),
              border-color var(--dur-fast) var(--ease-productive);
}
.btn-primary { background: var(--petrol-100); color: var(--cream-20); }
.btn-primary:hover { background: #103a52; }
.btn-secondary { background: transparent; color: var(--petrol-100); border-color: var(--petrol-100); }
.btn-secondary:hover { color: var(--amber-100); border-color: var(--amber-100); }
.btn-ghost { background: transparent; color: var(--cream-20); border-color: var(--cream-20); }
.btn-ghost:hover { color: var(--amber-40); border-color: var(--amber-40); }
.btn-tertiary { background: transparent; color: var(--petrol-100); padding: 12px 0; }
.btn-tertiary:hover { color: var(--amber-100); }

/* ---------- Tag ---------- */
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-petrol { background: var(--petrol-20); color: var(--petrol-100); }
.tag-amber  { background: var(--amber-20);  color: #6a4922; }
.tag-cream  { background: var(--cream-100); color: var(--fg-1); }
.tag-graphite{background: var(--graphite-20); color: var(--fg-1); }

/* ---------- Dithering ---------- */
.dither {
  background-color: var(--petrol-100);
  background-image: radial-gradient(rgba(243,228,201,0.95) 1.4px, transparent 1.6px);
  background-size: 6px 6px;
}
.dither-amber { background-color: var(--amber-100); background-image: radial-gradient(rgba(59,58,54,0.85) 1.4px, transparent 1.6px); background-size: 6px 6px; }
.dither-cream { background-color: var(--cream-100); background-image: radial-gradient(rgba(59,58,54,0.4) 1.2px, transparent 1.4px); background-size: 5px 5px; }

/* dithered fade overlay for portrait edge */
.dither-fade-bottom::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background-image: linear-gradient(180deg, transparent, var(--bg-page)),
                    radial-gradient(rgba(252,248,241,0.95) 1.4px, transparent 1.6px);
  background-size: 100% 100%, 6px 6px;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; }
.hero .grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
@media (max-width: 900px) { .hero .grid { grid-template-columns: 1fr; gap: 32px; } }
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 24px;
  color: var(--fg-1);
}
.hero .lede { font-size: 18px; line-height: 1.55; color: var(--fg-2); margin: 0 0 32px; max-width: 52ch; }
.hero-portrait { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 64px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about h2 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 0 32px;
}
.about p { font-size: 17px; line-height: 1.65; max-width: 60ch; color: var(--fg-1); margin: 0 0 18px; }
.facts {
  border-top: 1px solid var(--graphite-100);
  font-family: var(--font-mono);
  font-size: 13px;
}
.facts dl { margin: 0; }
.facts .row {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--graphite-20);
}
.facts dt { color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; align-self: center; }
.facts dd { margin: 0; color: var(--fg-1); }

/* ---------- Services ---------- */
.services { background: var(--cream-70); }
.services h2 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 0 48px;
  max-width: 22ch;
}
/* fichário — tabs estilo arquivo IBM */
.frentes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 0;
  align-items: end;
}
@media (max-width: 900px) {
  .frentes {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--graphite-100);
    border-bottom: 1px solid var(--graphite-20);
  }
  .frente-tab {
    border: 0;
    border-bottom: 1px solid var(--graphite-20);
    border-left: 3px solid transparent;
    clip-path: none;
    transform: none !important;
    padding: 14px 16px;
    grid-template-columns: 36px 1fr 28px;
    grid-template-areas: "num ttl ic";
    column-gap: 14px;
    row-gap: 0;
    align-items: center;
    background: transparent;
  }
  .frente-tab .num { font-size: 22px; line-height: 1; }
  .frente-tab .ttl { font-size: 14px; }
  .frente-tab .ic { width: 24px; height: 24px; padding: 3px; }
  .frente-tab .ic img { width: 16px; height: 16px; }
  .frente-tab:hover { background: var(--cream-40); }
  .frente-tab.is-active {
    background: var(--cream-20);
    border-left-color: var(--petrol-100);
  }
  .frente-tab.is-active .num { color: var(--petrol-100); }
}
.frente-tab {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  background: var(--cream-70);
  border: 1px solid var(--graphite-20);
  border-bottom: 0;
  padding: 22px 22px 24px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--fg-2);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "num . ic"
    "ttl ttl ttl";
  column-gap: 12px;
  row-gap: 14px;
  transition: transform var(--dur-base) var(--ease-productive),
              background var(--dur-fast) var(--ease-productive),
              color var(--dur-fast) var(--ease-productive),
              border-color var(--dur-fast) var(--ease-productive);
  transform: translateY(8px);
  border-radius: 0;
  /* faux folder-tab notch in top-right */
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.frente-tab .num {
  grid-area: num;
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--graphite-100);
  font-weight: 400;
}
.frente-tab .ic {
  grid-area: ic;
  width: 28px; height: 28px; padding: 4px;
  background: var(--graphite-20);
  color: var(--fg-1);
  display: grid; place-items: center;
}
.frente-tab .ic img { width: 18px; height: 18px; opacity: .7; }
.frente-tab .ttl {
  grid-area: ttl;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--fg-1);
}
.frente-tab:hover, .frente-tab.is-preview {
  background: var(--cream-40);
  transform: translateY(2px);
  color: var(--fg-1);
}
.frente-tab.is-preview { border-color: var(--graphite-100); }
.frente-tab.is-preview::after {
  content: "preview";
  position: absolute;
  top: 8px; right: 30px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-100);
  background: var(--cream-20);
  padding: 2px 6px;
  border: 1px solid var(--amber-100);
}
.frente-tab.is-active {
  background: var(--cream-20);
  border-color: var(--graphite-100);
  transform: translateY(0);
  z-index: 2;
  color: var(--fg-1);
}
.frente-tab.is-active .ic { background: var(--petrol-100); }
.frente-tab.is-active .ic img {
  opacity: 1;
  filter: invert(94%) sepia(8%) saturate(388%) hue-rotate(326deg) brightness(101%) contrast(94%);
}
.frente-tab.is-active .num { color: var(--petrol-100); }

.dossier {
  background: var(--cream-20);
  border: 1px solid var(--graphite-100);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  transition: outline var(--dur-fast) var(--ease-productive);
}
.dossier.is-previewing { outline: 1px dashed var(--amber-100); outline-offset: -4px; }
.dossier-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 36px 32px 28px;
  border-bottom: 1px solid var(--graphite-20);
  align-items: start;
}
.dh-num {
  font-family: var(--font-mono);
  font-size: 88px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--petrol-100);
}
.dh-eye {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 12px;
}
.dh-title {
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 0 14px;
  color: var(--fg-1);
}
.dh-desc { font-size: 16px; line-height: 1.6; color: var(--fg-2); margin: 0; max-width: 64ch; }

.dossier-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 18px 32px;
  border-bottom: 1px solid var(--graphite-20);
  background: var(--cream-40);
}

.dossier .method { border: 0; background: transparent; }
.dossier .method-row { padding: 0 8px; }

.dossier-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 14px 32px;
  border-top: 1px solid var(--graphite-20);
  background: var(--cream-40);
}

@media (max-width: 720px) {
  .dossier-head { grid-template-columns: 1fr; padding: 24px 20px; gap: 12px; }
  .dh-num { font-size: 64px; }
  .dh-title { font-size: 22px; }
}

.method {
  background: var(--cream-20);
  border: 1px solid var(--graphite-20);
}
.method-row {
  border-bottom: 1px solid var(--graphite-20);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-productive);
}
.method-row:last-child { border-bottom: 0; }
.method-row:hover { background: var(--cream-40); }
.method-row .head {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 20px;
  align-items: center;
  font-family: var(--font-mono);
}
.method-row .num { color: var(--fg-2); font-size: 12px; }
.method-row .ttl { font-size: 18px; letter-spacing: -0.01em; }
.method-row .chev { color: var(--fg-2); transition: transform var(--dur-base) var(--ease-productive); }
.method-row.is-open .chev { transform: rotate(90deg); color: var(--fg-1); }
.method-row .body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-productive);
}
.method-row.is-open .body { max-height: 320px; }
.method-row .body .pad { padding: 0 24px 24px 80px; max-width: 64ch; color: var(--fg-2); font-size: 15px; line-height: 1.6; }

/* ---------- Portfolio ---------- */
.portfolio h2 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 0 12px;
}
.port-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}
.port-counts {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.port-counts b { color: var(--fg-1); font-weight: 500; }

.port-filters {
  border-top: 1px solid var(--graphite-100);
  border-bottom: 1px solid var(--graphite-20);
  margin-bottom: 24px;
}
.filter-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--graphite-20);
}
.filter-row:last-child { border-bottom: 0; }
.filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--graphite-20);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--fg-2);
  transition: background var(--dur-fast) var(--ease-productive),
              color var(--dur-fast) var(--ease-productive),
              border-color var(--dur-fast) var(--ease-productive);
}
.chip:hover { color: var(--fg-1); border-color: var(--graphite-100); }
.chip.is-active {
  background: var(--petrol-100);
  color: var(--cream-20);
  border-color: var(--petrol-100);
}

.port-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.port-meta b { color: var(--fg-1); font-weight: 500; }
.reset {
  appearance: none; background: transparent; border: 0;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--amber-100); cursor: pointer; padding: 0;
  letter-spacing: 0.02em;
}
.reset:hover { color: var(--petrol-100); text-decoration: underline; }
.port-empty {
  padding: 64px 32px;
  border: 1px dashed var(--graphite-20);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-2);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}

.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-card {
  background: var(--cream-20);
  border: 1px solid var(--graphite-20);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease-productive);
}
.proj-card:hover { border-color: var(--graphite-100); }
.proj-card.is-open { border-color: var(--petrol-100); }
.proj-top { display: flex; flex-direction: column; }
.proj-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
}
.proj-card .badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px;
}
.badge-public { background: var(--cream-20); color: var(--petrol-100); border: 1px solid var(--petrol-100); }
.badge-nda    { background: var(--graphite-100); color: var(--cream-20); }
.proj-card .year {
  position: absolute; bottom: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cream-20);
  background: rgba(0,0,0,.18);
  padding: 2px 8px;
}
.proj-card .body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.proj-card .eye { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.proj-card h3 { font-family: var(--font-mono); font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 400; margin: 0; }
.proj-card p { font-size: 14px; line-height: 1.5; color: var(--fg-2); margin: 0; }
.proj-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; flex-wrap: wrap; gap: 12px;
}
.proj-cta {
  appearance: none; background: transparent; border: 0;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--petrol-100); cursor: pointer; padding: 0;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--petrol-100);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-productive);
}
.proj-cta:hover { color: var(--amber-100); border-bottom-color: var(--amber-100); }
.proj-locked {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; color: var(--fg-2);
  font-style: normal;
}

.proj-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-productive);
  background: var(--petrol-100);
  color: var(--cream-20);
}
.proj-card.is-open .proj-drawer { max-height: 360px; }
.drawer-pad { padding: 24px; }
.drawer-eye {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-100);
  margin-bottom: 12px;
}
.drawer-pad p {
  font-size: 14px; line-height: 1.6;
  color: var(--cream-20); margin: 0 0 16px;
  max-width: 60ch;
}
.drawer-foot {
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; align-items: center;
  border-top: 1px solid rgba(252,248,241,.2);
  padding-top: 14px;
}
.drawer-cta {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--amber-40);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-40);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-productive);
}
.drawer-cta:hover { color: var(--cream-20); border-bottom-color: var(--cream-20); }
.drawer-file {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--cream-100); letter-spacing: 0.04em;
  opacity: .7;
}

/* ---------- Contact ---------- */
.contact { background: var(--petrol-100); color: var(--cream-20); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: 280px;
  background-image: radial-gradient(rgba(243,228,201,0.9) 1.4px, transparent 1.6px);
  background-size: 7px 7px;
  opacity: 0.5;
  pointer-events: none;
}
.contact .container { position: relative; z-index: 1; }
.contact .eyebrow { color: var(--cream-100); }
.contact h2 { color: var(--cream-20); font-family: var(--font-mono); font-size: clamp(28px, 3.5vw, 44px); line-height: 1.1; letter-spacing: -0.015em; font-weight: 400; margin: 0 0 24px; max-width: 18ch; }
.contact .lede { font-size: 17px; line-height: 1.6; color: var(--cream-100); max-width: 52ch; margin: 0 0 40px; }
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.contact .field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-100); }
.contact .field input,
.contact .field textarea {
  font-family: var(--font-sans); font-size: 16px;
  background: rgba(252,248,241,0.06); color: var(--cream-20);
  border: 0; border-bottom: 1px solid var(--cream-100);
  padding: 12px 0; outline: none; border-radius: 0;
  transition: border-color var(--dur-fast) var(--ease-productive);
}
.contact .field input::placeholder,
.contact .field textarea::placeholder { color: rgba(252,248,241,0.5); }
.contact .field input:focus,
.contact .field textarea:focus { border-bottom-color: var(--amber-40); }
.contact .submit-row { display: flex; align-items: center; gap: 24px; margin-top: 12px; }

.contact-aside dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-100); margin-bottom: 6px; }
.contact-aside dd { margin: 0 0 24px; font-family: var(--font-mono); font-size: 16px; }
.contact-aside a { color: var(--cream-20); text-decoration: underline; text-underline-offset: 4px; transition: color var(--dur-fast) var(--ease-productive); }
.contact-aside a:hover { color: var(--amber-40); }

/* success */
.contact .success {
  border: 1px solid var(--cream-100);
  padding: 24px;
  font-family: var(--font-mono);
  display: flex; flex-direction: column; gap: 12px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--graphite-100); color: var(--cream-20); padding: 48px 0; }
.site-footer .row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.site-footer .word { font-family: var(--font-mono); font-size: 28px; letter-spacing: -0.02em; }
.site-footer .meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite-40); line-height: 1.7; }
.site-footer .meta a { color: var(--cream-100); text-decoration: none; }
.site-footer .meta a:hover { color: var(--amber-40); }
