/* tihole for iOS — site styles.
 * The palettes are the app's own (Tihole/Theme/Theme.swift). The look is
 * the app's: system font, inset grouped lists, rounded cards, segmented
 * controls and translucent bars. */

:root,
[data-theme="gloss"] {
  --surface: #0b0412;
  --panel: #190a2e;
  --text: #f4f1fb;
  --subtle: #9e8fc6;
  --accent: #ff2e93;
  --allow: #5cf07a;
  --block: #ff4d6d;
  --warn: #f5b93d;
  --border: #3a1e63;
  --ramp: linear-gradient(90deg, #ff2e93, #e533c9, #6b2fe0, #2ee6ff);
  --bar: rgb(11 4 18 / 0.72);
  --glow: rgb(255 46 147 / 0.22);
  --glow-2: rgb(46 230 255 / 0.14);
  color-scheme: dark;
}

[data-theme="deep-night"] {
  --surface: #0b0f1a;
  --panel: #141b2d;
  --text: #e6eaf2;
  --subtle: #8a93a6;
  --accent: #7aa2f7;
  --allow: #4ade80;
  --block: #f7768e;
  --warn: #f5c97b;
  --border: #2a3550;
  --ramp: linear-gradient(90deg, #7aa2f7, #a5bdfb);
  --bar: rgb(11 15 26 / 0.72);
  --glow: rgb(122 162 247 / 0.2);
  --glow-2: rgb(74 222 128 / 0.08);
  color-scheme: dark;
}

[data-theme="light-luxury"] {
  --surface: #fbf9f4;
  --panel: #ffffff;
  --text: #1f1b16;
  --subtle: #6e665b;
  --accent: #b08d57;
  --allow: #3f9d5a;
  --block: #c0392b;
  --warn: #c9871f;
  --border: #e4dccf;
  --ramp: linear-gradient(90deg, #b08d57, #8a6a3a);
  --bar: rgb(251 249 244 / 0.78);
  --glow: rgb(176 141 87 / 0.16);
  --glow-2: rgb(63 157 90 / 0.06);
  color-scheme: light;
}

[data-theme="pihole-classic"] {
  --surface: #1a1213;
  --panel: #241819;
  --text: #f5e9e9;
  --subtle: #a88b8b;
  --accent: #e5322b;
  --allow: #35c46a;
  --block: #e5322b;
  --warn: #f2b134;
  --border: #4a2e30;
  --ramp: linear-gradient(90deg, #e5322b, #f2b134);
  --bar: rgb(26 18 19 / 0.72);
  --glow: rgb(229 50 43 / 0.2);
  --glow-2: rgb(242 177 52 / 0.08);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text",
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font: 0.88em ui-monospace, "SF Mono", Menlo, monospace;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.ramp {
  background: var(--ramp);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- navigation bar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}

.navbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.nav-links a {
  color: var(--subtle);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: color-mix(in srgb, var(--allow) 18%, transparent);
  color: var(--allow);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* The theme picker is a pull-down menu, like the app's. */
.menu {
  position: relative;
}

.menu > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  cursor: pointer;
}

.menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.35);
}

.menu ul[hidden] {
  display: none;
}

.menu li button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.menu li button:hover,
.menu li button:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}

.menu .check {
  width: 14px;
  color: var(--accent);
  font-weight: 700;
}

.menu .swatch {
  width: 14px;
  height: 14px;
  margin-left: auto;
  border-radius: 50%;
  border: 0.5px solid var(--border);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 17px;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-filled {
  background: var(--accent);
  color: #fff;
}

.btn-tinted {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.btn[aria-disabled="true"] {
  cursor: default;
  filter: none;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.app-row img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 8px 24px var(--glow);
}

.app-row .name {
  font-weight: 600;
  font-size: 17px;
}

.app-row .by {
  color: var(--subtle);
  font-size: 14px;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.lede {
  max-width: 34em;
  margin: 0 0 30px;
  color: var(--subtle);
  font-size: 19px;
}

.lede b {
  color: var(--text);
  font-weight: 600;
}

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

.fine {
  margin-top: 16px;
  color: var(--subtle);
  font-size: 13px;
}

.fine .price {
  color: var(--text);
  font-size: 15px;
}

/* ---------- devices ---------- */

.device {
  position: relative;
  margin: 0 auto;
  padding: 12px;
  background: #050208;
  border-radius: 54px;
  box-shadow:
    0 0 0 2px #2b2533,
    0 30px 80px rgb(0 0 0 / 0.45),
    0 0 120px var(--glow);
}

.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 42px;
}

.device.iphone {
  max-width: 330px;
}

.device.iphone::after {
  /* The Dynamic Island. */
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 30%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050208;
}

.device.ipad {
  max-width: 560px;
  padding: 16px;
  border-radius: 36px;
}

.device.ipad img {
  border-radius: 22px;
}

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

.section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h2 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  max-width: 40em;
  color: var(--subtle);
}

/* Segmented control. */
.segmented {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--subtle) 18%, transparent);
}

.segmented button {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 7px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: none;
  cursor: pointer;
}

.segmented button[aria-selected="true"] {
  background: var(--panel);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}

.screens-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.screens-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 48px;
}

.screens-cap h3 {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.screens-cap p {
  margin: 0;
  color: var(--subtle);
  font-size: 19px;
}

/* Inset grouped list, as in Settings. */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--panel);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.list > li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
}

.list > li + li {
  border-top: 0.5px solid var(--border);
}

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: var(--accent);
}

.icon.allow {
  background: var(--allow);
}

.icon.block {
  background: var(--block);
}

.icon.warn {
  background: var(--warn);
}

.icon.subtle {
  background: var(--subtle);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-weight: 600;
}

.row-sub {
  color: var(--subtle);
  font-size: 15px;
}

.row-detail {
  flex: none;
  color: var(--subtle);
  font-size: 15px;
}

.list-label {
  margin: 0 16px 8px;
  color: var(--subtle);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.list-foot {
  margin: 8px 16px 0;
  color: var(--subtle);
  font-size: 13px;
}

/* Get started. */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.sheet {
  padding: 18px 16px 22px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--subtle) 10%, var(--surface));
  border: 0.5px solid var(--border);
}

.sheet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 4px 18px;
  font-size: 17px;
}

.sheet-bar b {
  font-weight: 600;
}

.sheet-bar span {
  color: var(--accent);
}

.sheet-bar .done {
  font-weight: 600;
}

.field {
  justify-content: space-between;
}

.field .value {
  color: var(--subtle);
}

.toggle {
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: var(--allow);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.25);
}

.ok {
  color: var(--allow);
}

/* Numbers: dashboard tiles. */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tile {
  padding: 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 0.5px solid var(--border);
}

.tile .label {
  color: var(--subtle);
  font-size: 14px;
}

.tile .num {
  margin: 6px 0 2px;
  color: var(--accent);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.tile .num small {
  margin-left: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}

.tile .sub {
  color: var(--subtle);
  font-size: 14px;
}

.tile .meter {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--subtle) 22%, transparent);
  overflow: hidden;
}

.tile .meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ramp);
}

/* Architecture. */
.arch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.arch .flow {
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
  line-height: 1.8;
}

.arch .flow b {
  display: block;
  color: var(--accent);
  font-size: 22px;
}

/* Releases. */
.release {
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 0.5px solid var(--border);
}

.release-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: 14px;
}

.ver {
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: var(--accent);
}

.release h4 {
  margin: 14px 0 6px;
  color: var(--subtle);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.release ul {
  margin: 0;
  padding-left: 20px;
}

.release li {
  margin: 4px 0;
}

/* FAQ: disclosure rows. */
.faq details + details {
  border-top: 0.5px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "›";
  margin-left: auto;
  color: var(--subtle);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(90deg);
}

.faq .answer {
  padding: 0 16px 16px 58px;
  color: var(--subtle);
}

/* Docs cards. */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 0.5px solid var(--border);
  color: var(--text);
  transition: transform 0.15s;
}

.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.card .eyebrow {
  font-size: 12px;
}

.card .title {
  font-size: 20px;
  font-weight: 700;
}

.card .desc {
  flex: 1;
  color: var(--subtle);
  font-size: 15px;
}

.card .more {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

/* Footer. */
footer {
  margin-top: 40px;
  padding: 48px 0 40px;
  border-top: 0.5px solid var(--border);
  color: var(--subtle);
  font-size: 15px;
}

.foot-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

footer h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 2;
}

footer a {
  color: var(--subtle);
}

footer a:hover {
  color: var(--text);
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  font-size: 13px;
}

/* Prose pages (privacy). */
.prose {
  max-width: 720px;
  padding: 56px 24px 24px;
  margin: 0 auto;
}

.prose h1 {
  font-size: 44px;
}

.prose li {
  margin: 8px 0;
}

/* ---------- small screens ---------- */

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

  .nav-right {
    margin-left: auto;
  }

  .hero .wrap,
  .screens-stage,
  .two-col,
  .arch {
    grid-template-columns: minmax(0, 1fr);
  }

  .arch .flow b {
    transform: rotate(90deg);
  }

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

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

  .foot-row > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .tiles,
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .pill {
    display: none;
  }
}

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

  * {
    transition: none !important;
  }
}
