/* Half-Browser project page — Studio RIZI
   Dark surface with the sky-blue accent of the Half-Browser app icon. */

:root {
  color-scheme: dark;
  --paper: #f5f6f0;
  --ink: #151714;
  --lime: #7dd3fc;
  --blue: #4c67ff;
  --green: #79d94b;
  --bg: #0a0f1a;
  --bg-soft: #0c1424;
  --surface: #111a2b;
  --text: #eef3f8;
  --muted: #a7b3c6;
  --muted-2: #8390a4;
  --edge: #243247;
  --line: rgba(226, 236, 248, 0.14);
  --pad: clamp(20px, 4.6vw, 64px);
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1000px 560px at 82% -10%, rgba(184, 255, 44, 0.1), transparent 62%),
    radial-gradient(760px 520px at 4% 8%, rgba(76, 103, 255, 0.09), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Noto Sans SC", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: break-word;
}

p {
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.12em 0.4em;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: #0c100b;
  overflow-wrap: anywhere;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.page-width {
  width: min(var(--max), 100% - (var(--pad) * 2));
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 13, 9, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--max), 100% - (var(--pad) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  min-height: 68px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand svg {
  flex: none;
}

.main-nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 30px);
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.main-nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--lime);
}

.release-tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--lime);
}

.lang-bar {
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 8, 0.6);
}

.lang-bar nav {
  width: min(var(--max), 100% - (var(--pad) * 2));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  padding-block: 6px;
  font-size: 12px;
  color: var(--muted);
}

.lang-bar a {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.3;
}

.lang-bar a:hover {
  color: var(--text);
  border-color: var(--edge);
}

.lang-bar a[aria-current="page"] {
  color: var(--ink);
  background: var(--lime);
  font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(44px, 6vw, 84px) clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy > * {
  min-width: 0;
}

.release-line {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--lime);
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.24;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.hero-app {
  display: block;
  font-size: 0.4em;
  line-height: 1.2;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 em {
  font-style: normal;
  color: var(--lime);
  white-space: nowrap;
}

@supports (-webkit-text-stroke: 1px #000) {
  .hero h1 em {
    color: transparent;
    -webkit-text-stroke: 1.4px var(--lime);
  }
}

.hero-lead {
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(14.5px, 1.15vw, 17px);
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(238, 243, 232, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(238, 243, 232, 0.28);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--edge);
  box-shadow: none;
}

.button-secondary:hover {
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: none;
  transform: none;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 34px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.hero-facts div {
  padding: 13px 15px;
  background: var(--bg);
}

.hero-facts dt {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero-facts dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shot-frame {
  margin: 0;
  width: min(100%, 336px);
  padding: 9px;
  border: 1px solid var(--edge);
  border-radius: 30px;
  background: linear-gradient(180deg, #151b13, #0a0d09);
  box-shadow: 12px 12px 0 rgba(184, 255, 44, 0.16), 0 34px 70px rgba(0, 0, 0, 0.55);
}

.shot-frame img {
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.shot-frame figcaption {
  margin-top: 14px;
  padding: 0 4px 2px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-2);
  text-align: center;
}

/* ---------- page index ---------- */

.page-index {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.page-index-inner {
  width: min(var(--max), 100% - (var(--pad) * 2));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 22px;
  padding-block: 15px;
  font-size: 12.5px;
}

.page-index-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.page-index ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-index a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.page-index a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(56px, 8vw, 104px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(16px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3.1vw, 42px);
  line-height: 1.34;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-heading p {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.95;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}

/* feature ledger */

.feature-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.feature-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 0.92fr) minmax(0, 1.35fr);
  gap: clamp(12px, 2.4vw, 36px);
  padding-block: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}

.feature-num {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--muted-2);
  padding-top: 4px;
}

.feature-num i {
  display: block;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--lime);
  margin-bottom: 3px;
}

.feature-row h3 {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.feature-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

/* panel grid */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--edge);
  border-left: 1px solid var(--edge);
}

.panel-cell {
  padding: clamp(18px, 2.2vw, 28px);
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.022), transparent 70%);
}

.panel-cell h3 {
  margin: 0 0 9px;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.panel-cell h3 span {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--lime);
  margin-top: 4px;
}

.panel-cell p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}

/* flow band */

.flow-band {
  padding-block: clamp(56px, 8vw, 102px);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.flow-step {
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--bg);
}

.flow-num {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--lime);
  margin-bottom: 12px;
}

.flow-step b {
  display: block;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.5;
}

.flow-step p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

/* layout devices */

.layout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-card {
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.device-stage {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 176px;
}

.device {
  display: grid;
  gap: 5px;
  padding: 6px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: #0a0d09;
}

.device span {
  display: block;
  border-radius: 5px;
  background: linear-gradient(150deg, #26331f, #151c12);
}

.device--phone {
  width: 78px;
  aspect-ratio: 9 / 16;
  grid-template-rows: 1.9fr 0.9fr;
}

.device--land {
  width: 152px;
  aspect-ratio: 16 / 9;
  grid-template-columns: 1.9fr 0.9fr;
}

.device--tablet {
  width: 156px;
  aspect-ratio: 4 / 3;
  grid-template-columns: 1.45fr 1fr;
  border-radius: 10px;
}

.device--tablet span:first-child {
  background: linear-gradient(150deg, #3a4a2c, #182013);
}

.device-card b {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.device-card p {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* privacy panel */

.privacy-panel {
  border: 1px solid var(--edge);
  border-left: 4px solid var(--lime);
  border-radius: 4px;
  padding: clamp(22px, 3vw, 34px);
  background: linear-gradient(160deg, rgba(184, 255, 44, 0.06), transparent 55%);
}

.privacy-panel h2 {
  text-wrap: balance;
  margin: 0 0 14px;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.privacy-panel p {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.95;
  max-width: 46em;
}

.privacy-panel p + p {
  margin-top: 12px;
}

/* install */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.step-list {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.step-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.step-list li > span {
  min-width: 0;
}

.step-list li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--lime);
  padding-top: 4px;
}

.install-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--edge);
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted-2);
}

.install-hash {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--edge);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}

.install-hash code {
  font-size: 11px;
  color: var(--fg);
  background: none;
  padding: 0;
}

.install-side h2 {
  text-wrap: balance;
  margin: 0 0 14px;
  font-size: clamp(24px, 2.9vw, 36px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.install-side > p {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.95;
}

.install-side .button {
  margin-top: 22px;
}

/* developer */

.dev-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
}

.dev-section h2 {
  text-wrap: balance;
  margin: 0 0 14px;
  font-size: clamp(24px, 2.9vw, 36px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.dev-section p {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.95;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--edge);
  border-left: 1px solid var(--edge);
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  font-size: 13px;
  font-weight: 700;
}

.link-list a::after {
  content: "↗";
  color: var(--muted-2);
  font-size: 12px;
}

.link-list a:hover {
  background: rgba(184, 255, 44, 0.08);
  color: var(--lime);
}

/* footer */

.site-footer {
  padding-block: 30px;
  background: #070907;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 12px;
  color: var(--muted-2);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-inner a:hover {
  color: var(--lime);
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid,
  .install-grid,
  .dev-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    order: -1;
  }

  .hero h1 {
    margin-top: 14px;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .feature-row {
    grid-template-columns: 96px minmax(0, 1fr);
    row-gap: 8px;
  }

  .feature-row p {
    grid-column: 2;
  }

  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .header-inner {
    min-height: 60px;
  }

  .release-tag {
    margin-left: auto;
  }

  .layout-grid,
  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-card {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 18px;
  }

  .device-stage {
    width: auto;
    min-height: 0;
  }

  .device-card > div:last-child {
    min-width: 0;
  }

  .link-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  body {
    line-height: 1.8;
  }

  .hero h1 {
    font-size: clamp(25px, 7.6vw, 36px);
    letter-spacing: -0.02em;
  }

  .hero-app {
    font-size: 0.44em;
    letter-spacing: 0.1em;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .shot-frame {
    width: min(100%, 300px);
  }

  .hero-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }

  .feature-row p {
    grid-column: 1;
  }

  .feature-num {
    padding-top: 0;
  }

  .panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-index ol {
    gap: 6px 14px;
  }

  .device {
    flex: none;
  }
}

@media (max-width: 380px) {
  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

/* language-specific typography for long Latin copy */

html[lang="en"] body,
html[lang="pt"] body {
  line-height: 1.78;
}

html[lang="en"] .hero-lead,
html[lang="pt"] .hero-lead {
  font-size: clamp(14.5px, 1.1vw, 16.5px);
  line-height: 1.85;
}

html[lang="en"] .hero h1,
html[lang="pt"] .hero h1 {
  letter-spacing: -0.028em;
}

html[lang="en"] .feature-row p,
html[lang="pt"] .feature-row p,
html[lang="en"] .privacy-panel p,
html[lang="pt"] .privacy-panel p {
  overflow-wrap: break-word;
}

/* Half-Browser additions: screenshot row and feature grids */
.shot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot-row figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.shot-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--edge);
  background: var(--surface);
}

.shot-row figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-grid li {
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--surface);
  padding: 22px 24px;
  line-height: 1.8;
}

.fact-grid b {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.fact-grid span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .shot-row {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
  .fact-grid {
    grid-template-columns: 1fr;
  }
}
