/* Onlogz: shared styles for / (PT) and /en/ (EN). */

:root {
  --paper: #f3ecdf;
  --paper-deep: #ebe2d1;
  --card: #fbf7ef;
  --sign: #f6efe2;
  --ink: #221b15;
  --ink-soft: #5a4f45;
  --line: #ddd1bd;
  --accent: #1d6f47;
  --accent-hover: #175a3a;
  --accent-soft: #6dbb8a;
  --accent-deep: #0f3f27;
  --azulejo: #1d5a85;
  --night: #1d1915;
  --night-soft: #2a241e;
  --night-line: #3d352d;
  --night-text: #f3ecdf;
  --night-muted: #c9bdab;

  /* facade colors, same as the street illustration */
  --mustard: #e9be62;
  --mustard-deep: #d9a84a;
  --sage: #a8cbb0;
  --sage-deep: #8fb79a;
  --rose: #efc9b4;
  --rose-deep: #e2b29a;
  --sky: #d5e3ee;
  --sky-deep: #8fb0cb;

  --display: 'Alfa Slab One', Rockwell, Georgia, serif;
  --brand: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --hand: 'Nothing You Could Do', 'Segoe Print', cursive;
  --mono: ui-monospace, SFMono-Regular, Consolas, 'DejaVu Sans Mono', monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --section: clamp(64px, 9vw, 120px);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(34, 27, 21, .05), 0 14px 32px -20px rgba(34, 27, 21, .32);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font: 700 1.2rem/1.3 var(--body); margin: 0; text-wrap: balance; }

:focus-visible { outline: 3px solid var(--azulejo); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--paper); padding: .7rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(243, 236, 223, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
/* Wordmark: On>_Logz. (terminal box inside the name) */
.wordmark { display: inline-flex; align-items: center; font-family: var(--brand); font-weight: 800; font-stretch: 85%; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.wordmark .term {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.36em; height: 1em; margin: 0 .08em 0 .1em; transform: translateY(.04em);
  border: .09em solid currentColor; border-radius: .17em;
  font-family: var(--mono); font-weight: 700; font-size: 1em; letter-spacing: -0.12em;
}
.wordmark .term::before { content: '>_'; font-size: .52em; line-height: 1; transform: translateX(-.04em); }
.wordmark .dot { color: var(--accent); }
.site-footer .wordmark { color: var(--night-text); font-size: 1.25rem; }
.site-footer .wordmark .dot { color: var(--accent-soft); }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: .93rem; }
.site-nav a:hover { color: var(--ink); }
.lang { display: flex; gap: 2px; font-weight: 700; font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a, .lang span { padding: 2px 10px; border-radius: 999px; text-decoration: none; line-height: 1.4; color: var(--ink-soft); }
.lang [aria-current] { background: var(--ink); color: var(--paper); }
.lang a:hover { color: var(--ink); }
.cta-short { display: none; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1rem/1.2 var(--body);
  padding: 14px 22px; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: #fff8ef;
  transition: background-color .2s ease;
}
.button::after { content: "→"; transition: transform .2s ease; }
.button:hover { background: var(--accent-hover); }
.button:hover::after { transform: translateX(3px); }
.button-small { padding: 9px 16px; font-size: .9rem; }
.button-small::after { content: none; }
.text-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 6px; transition: text-decoration-color .2s ease; }
.text-link:hover { text-decoration-color: var(--accent); }

/* Hero: headline on top, the whole street below it */
.hero { padding-top: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.06; max-width: 22ch; }
.hero-sub { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(24px, 4vw, 56px); align-items: end; margin-top: clamp(24px, 3vw, 36px); }
.hero-lede { font-size: clamp(1.08rem, 1.5vw, 1.2rem); color: var(--ink-soft); max-width: 38rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.hero-street {
  position: relative;
  margin: clamp(36px, 5vw, 64px) 0 0;
  /* sidewalk continues past the drawing on wide screens; stops match the SVG (viewBox 0 50 1200 430, curb at y=420) */
  background:
    linear-gradient(to bottom, transparent calc(86.05% - 1px), var(--ink) calc(86.05% - 1px), var(--ink) calc(86.05% + 2px), transparent calc(86.05% + 2px)),
    linear-gradient(to bottom, transparent 86.05%, #ddd2bf 86.05% 93.49%, #cbbfa9 93.49%);
}
.hero-street::after { content: attr(data-hint); display: none; position: absolute; right: var(--gutter); bottom: 2px; font-size: .78rem; font-weight: 700; color: var(--ink-soft); pointer-events: none; }
.street-scroll { max-width: 1400px; margin: 0 auto; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.street-scroll::-webkit-scrollbar { display: none; }
.street { display: block; width: 100%; min-width: 860px; height: auto; }
.street .sign { font-family: var(--brand); font-weight: 800; font-stretch: 78%; letter-spacing: .04em; }
.street .brand-sign { font-family: var(--brand); font-weight: 800; font-stretch: 85%; letter-spacing: -.02em; }
.street .chalk { font-family: var(--body); font-weight: 700; letter-spacing: .06em; }
.street .mono { font-family: var(--mono); font-weight: 700; letter-spacing: -.08em; }
/* the cursor on the Onlogz shop's monitor blinks */
.street .cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Shared section heading: title left, short intro right */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 32px; align-items: end; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--ink-soft); margin: 0; max-width: 32rem; }

/* "Conhece essa cena?": the problems drawn as things you would find in the shop */
.scene { background: var(--paper-deep); padding: var(--section) 0; }
.scene-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "chat insta note" "chat sys sys";
  gap: 40px 32px; margin: clamp(32px, 4vw, 48px) 0 clamp(36px, 4vw, 52px); align-items: start;
}
.artifact { margin: 0; }
.artifact figcaption { margin-top: 14px; font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.artifact-chat { grid-area: chat; }
.artifact-insta { grid-area: insta; }
.artifact-notebook { grid-area: note; }
.artifact-system { grid-area: sys; }
.chat, .insta, .notepad, .system { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.chat { background: var(--card); overflow: hidden; }
.chat-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #1f4a36; color: var(--sign); font-weight: 700; }
.chat-top span { background: var(--mustard); color: var(--ink); font-size: .76rem; padding: 2px 9px; border-radius: 999px; }
.chat ul { list-style: none; margin: 0; padding: 0; }
.chat li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .94rem; line-height: 1.35; }
.chat li:last-child { border-bottom: 0; }
.chat li span { color: var(--ink-soft); grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat li time { grid-column: 2; grid-row: 1; font-size: .78rem; color: var(--accent); font-weight: 700; }
.chat li::after { content: "1"; grid-column: 2; grid-row: 2; justify-self: end; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff8ef; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

.insta { background: var(--card); padding: 14px; }
.insta-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: .92rem; }
.insta-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--rose-deep); }
.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 6px; overflow: hidden; }
.insta-grid span { aspect-ratio: 1; background: var(--sage); filter: saturate(.5); }
.insta-grid span:nth-child(2) { background: var(--rose); }
.insta-grid span:nth-child(3) { background: var(--mustard); }
.insta-grid span:nth-child(4) { background: var(--sky-deep); }
.insta-grid span:nth-child(5) { background: var(--mustard-deep); }
.insta-grid span:nth-child(6) { background: var(--rose-deep); }
.insta-grid .last { position: relative; z-index: 1; filter: none; background: #b9cfbf; }
.insta-grid .last em { position: absolute; left: 6px; top: 6px; width: max-content; font-style: normal; font-weight: 700; font-size: .72rem; background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 4px; }

.notepad {
  position: relative; background-color: #fffdf6;
  background-image: repeating-linear-gradient(transparent 0 33px, #d6e0ea 33px 34px);
  background-position: 0 30px;
  padding: 30px 16px 14px 18px;
  font-family: var(--hand); font-size: 1.15rem; line-height: 34px; color: #2b3f75;
}
.notepad::before { /* spiral binding */
  content: ""; position: absolute; left: 12px; right: 12px; top: 9px; height: 8px;
  background: radial-gradient(circle, #a89c8a 0 2.5px, transparent 3px) 0 0 / 18px 8px repeat-x;
}
.notepad p { margin: 0; }

.system { background: var(--card); overflow: hidden; }
.system-top { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.system-top span { font-weight: 400; color: var(--ink-soft); font-size: .88rem; }
.system ul { list-style: none; margin: 0; padding: 12px 16px 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 12px; }
.system li { font-size: .8rem; color: rgba(34, 27, 21, .34); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.system li.used { color: var(--ink); font-weight: 700; background: #dcebdf; border-radius: 4px; padding: 0 5px; margin-left: -5px; }
.system li.used::before { content: "✓ "; color: var(--accent); }

.scene-close { font-size: clamp(1.12rem, 1.7vw, 1.3rem); max-width: 44rem; margin: 0; }

/* Services: light storefronts, each topped by a thin awning in its facade color */
.services { padding: var(--section) 0; }
.storefronts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.storefront {
  --sf: var(--sage-deep);
  grid-column: span 5; position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px clamp(22px, 3vw, 32px) clamp(24px, 3vw, 30px);
  transition: transform .25s ease, box-shadow .25s ease;
}
.storefront::before { /* awning */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--sf) 0 16px, transparent 16px 32px);
  transition: height .25s ease;
}
.storefront:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(34, 27, 21, .05), 0 22px 40px -22px rgba(34, 27, 21, .4); }
.storefront:hover::before { height: 14px; }
.storefront.sf-wide { grid-column: span 7; }
.sf-mustard { --sf: var(--mustard-deep); }
.sf-rose { --sf: var(--rose-deep); }
.sf-blue { --sf: var(--sky-deep); }
.placa { font-size: clamp(1.15rem, 1.6vw, 1.3rem); margin: 0 0 10px; padding-right: 0; }
.storefront p { margin: 0; max-width: 38rem; }
.storefront .example { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .96rem; color: var(--ink-soft); }
.storefront .example strong { color: var(--ink); }
.hanging {
  display: inline-block; margin-top: 18px;
  color: var(--accent); text-decoration: none;
  font-size: .85rem; font-weight: 700; padding: 5px 12px; border: 1px solid currentColor; border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}
.hanging::after { content: " ↓"; }
.hanging:hover { background: var(--accent); color: #fff8ef; }

/* Projects: dark section */
.projects { background: var(--night); color: var(--night-text); padding: var(--section) 0; }
.projects-head { max-width: 46rem; margin-bottom: clamp(40px, 5vw, 64px); }
.projects-head p { color: var(--night-muted); font-size: 1.12rem; margin: 18px 0 0; }
.project { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--night-line); }
.project h3 { font: 400 clamp(1.5rem, 2.4vw, 1.9rem)/1.1 var(--display); }
.project-media { margin: 0; display: grid; gap: 14px; align-content: start; align-items: start; }
.media-reelhouse { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.media-reelhouse .shot-main { grid-row: span 2; }
.media-reelhouse figcaption { grid-column: 1 / -1; }
.shot { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--night-line); background: var(--night-soft); text-decoration: none; box-shadow: 0 18px 40px -24px #000; transition: border-color .2s ease; }
.shot:hover { border-color: #5a5045; }
.shot img { display: block; width: 100%; height: auto; background: #fff; }
.shot .note { display: block; padding: 9px 12px; font-size: .84rem; font-weight: 700; line-height: 1.35; color: var(--night-text); }
.shot .note::before { content: "↑ "; color: var(--mustard); }
.project-media figcaption { font-size: .86rem; color: var(--night-muted); }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.status { display: inline-block; font: 700 .72rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; border-radius: 4px; color: var(--ink); }
.status-live { background: var(--accent-soft); padding: 7px 10px; }
.status-dev { padding: 3px; background: repeating-linear-gradient(-45deg, #f2c46d 0 6px, var(--ink) 6px 12px); }
.status-dev span { display: block; background: #f2c46d; padding: 4px 8px; border-radius: 2px; }
.project-tagline { font-size: 1.16rem; font-weight: 700; margin: 16px 0 14px; }
.project-body p { color: var(--night-muted); }
.for-local { margin: 22px 0; padding: 18px 20px; border-left: 3px solid var(--accent-soft); background: var(--night-soft); border-radius: 0 10px 10px 0; }
.for-local strong { display: block; color: var(--night-text); margin-bottom: 4px; }
.for-local p { margin: 0; }
.stack { font-size: .86rem; color: var(--night-muted); }
.stack summary { cursor: pointer; width: max-content; }
.stack summary:hover { color: var(--night-text); }
.stack p { margin: 8px 0 0; letter-spacing: .02em; }

/* How we work */
.how { padding: var(--section) 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px clamp(24px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 22px; }
.steps li::before { content: counter(step); display: block; margin-bottom: 12px; font: 400 2rem/1 var(--display); color: var(--accent); }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-soft); }
.how-ai { margin: clamp(40px, 5vw, 56px) 0 0; max-width: 46rem; padding-left: 16px; border-left: 2px solid var(--accent); color: var(--ink-soft); }

/* Who we are + contact */
.contact { background: var(--accent); color: #fff8ef; padding: var(--section) 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 6vw, 88px); align-items: start; }
.about { padding: 24px 26px; border: 1px solid rgba(255, 248, 239, .2); border-radius: var(--radius); }
.about-title { font-size: 1.35rem; margin-bottom: 12px; }
.about p { margin: 0; color: #dcebe1; }
.contact-main h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.contact-main p { font-size: 1.15rem; max-width: 36rem; margin: 22px 0 32px; color: #e8f1eb; }
.contact .button { background: var(--sign); color: var(--ink); font-size: clamp(1rem, 2.2vw, 1.2rem); }
.contact .button:hover { background: #fff; }

/* Footer */
.site-footer { background: var(--night); color: var(--night-muted); padding: 34px 0; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--night-text); }

/* Responsive */
@media (max-width: 1000px) {
  .scene-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "chat insta" "chat note" "sys sys"; }
  .storefront, .storefront.sf-wide { grid-column: span 6; }
  .project { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .lang { margin-left: auto; }
  .hero-street::after { display: block; }
  .hero-sub, .section-head, .contact-grid { grid-template-columns: 1fr; }
  .storefront, .storefront.sf-wide { grid-column: span 12; }
  .steps { grid-template-columns: 1fr; }
  .system ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .site-header .wrap { gap: 10px; min-height: 60px; }
  .wordmark { font-size: 1.3rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .header-cta { padding: 8px 14px; }
  .scene-grid { grid-template-columns: 1fr; grid-template-areas: "chat" "insta" "note" "sys"; }
  .system ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .media-reelhouse { grid-template-columns: 1fr; }
  .media-reelhouse .shot-main { grid-row: auto; }
  .site-footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .button::after, .storefront, .storefront::before { transition: none; }
  .storefront:hover { transform: none; }
  .street .cursor { animation: none; }
}
