:root {
  /* cloud / sky palette — teal-cyan + slate, deliberately not generic blue */
  --sky-1: #7fd8d1;
  --sky-2: #4bb8c9;
  --sky-3: #2b8aa8;
  --cloud: #f4f9fb;
  --ink: #0f2330;
  --slate: #52697a;
  --line: #d9e6ec;
  --card-bg: #ffffff;
  --page-bg: #eaf4f6;
  --hero-1: #123f52;
  --hero-2: #1e6f7e;
  --hero-3: #34a7a2;
  --danger: #c0455f;
  --ok: #1f8a70;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(18, 63, 82, 0.10);
  --shadow-sm: 0 4px 14px rgba(18, 63, 82, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cloud: #16232c;
    --ink: #e7f2f5;
    --slate: #9db4c0;
    --line: #263a45;
    --card-bg: #16242d;
    --page-bg: #0c161c;
    --hero-1: #071d27;
    --hero-2: #0d3b46;
    --hero-3: #1c6f70;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 55%, var(--hero-3) 100%);
  color: #f2fbfb;
  padding: 84px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(650px 260px at 82% -10%, rgba(127,216,209,0.35), transparent 60%),
    radial-gradient(520px 240px at 8% 120%, rgba(75,184,201,0.28), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: #eafcfb;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  margin: 0 0 14px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.lede {
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  max-width: 640px;
  color: #daf3f2;
  margin: 0 0 30px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  background: var(--sky-1);
  color: #08313a;
  font-weight: 600;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.98rem;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); background: #98e4dd; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent;
  color: #eafcfb;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }

/* ============ SECTIONS ============ */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }
.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.section-intro { color: var(--slate); max-width: 720px; margin: 0 0 34px; }

/* ============ CARDS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  font-size: 1.7rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sky-1), var(--sky-2));
  border-radius: 12px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0 0 10px; color: var(--slate); font-size: 0.95rem; }
.card .demo-note { color: var(--ink); font-size: 0.92rem; margin-bottom: 0; }
.card .demo-note strong { color: var(--sky-3); }

/* ============ NOTE FORM ============ */
.note-form {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font: inherit;
  color: var(--ink);
  background: var(--page-bg);
  resize: vertical;
  min-height: 60px;
}
.note-form textarea:focus {
  outline: none;
  border-color: var(--sky-2);
  box-shadow: 0 0 0 3px rgba(75,184,201,0.22);
}
.note-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.char-count { color: var(--slate); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.status { min-height: 1.4rem; margin-bottom: 18px; font-size: 0.92rem; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }

/* ============ WALL ============ */
.wall-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 16px;
}
.wall-header h3 { margin: 0; font-size: 1.2rem; }
.counter {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  color: var(--sky-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notes li {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky-2);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.notes .note-text { margin: 0 0 6px; white-space: pre-wrap; word-break: break-word; }
.notes .note-time { color: var(--slate); font-size: 0.78rem; }
.notes .empty {
  background: transparent; border: 1px dashed var(--line); border-left: 1px dashed var(--line);
  color: var(--slate); text-align: center; box-shadow: none;
}

/* ============ ARCHITECTURE ============ */
.arch {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.arch-box {
  flex: 1 1 180px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--sky-2);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  min-width: 150px;
}
.arch-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.arch-sub { color: var(--slate); font-size: 0.85rem; margin-bottom: 8px; }
.arch-tech {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sky-3);
  background: rgba(75,184,201,0.12);
  padding: 3px 8px;
  border-radius: 6px;
}
.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--sky-3);
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 64px;
}
.arch-arrow span { font-size: 0.68rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.04em; }
.arch-caption { color: var(--slate); font-size: 0.9rem; max-width: 760px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--hero-1);
  color: #cfe8e7;
  padding: 40px 0;
  text-align: center;
}
.footer-main { font-weight: 700; margin: 0 0 6px; color: #eafcfb; }
.footer-sub { margin: 0 0 6px; font-size: 0.92rem; }
.footer-stack { margin: 0; font-size: 0.82rem; color: #8fc0be; }
.footer .fill { color: var(--sky-1); }

/* ============ STICKY NAV ============ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 63, 82, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(127, 216, 209, 0.25);
}
.topnav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 54px;
}
.topnav-brand {
  color: #eafcfb;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.98rem;
}
.topnav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.topnav-links a {
  color: #cfeceb;
  text-decoration: none;
  font-size: 0.86rem;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.topnav-links a:hover { background: rgba(127, 216, 209, 0.18); color: #fff; }

/* offset anchor jumps so section headings clear the sticky nav */
.section, header.hero { scroll-margin-top: 66px; }

/* ============ DIAGRAM CARD (cloud + devices) ============ */
.diagram-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.cloud-diagram { width: 100%; max-width: 560px; height: auto; }
.diagram-caption { color: var(--slate); font-size: 0.9rem; max-width: 620px; margin: 8px auto 0; }

/* ============ 2x2 GRID ============ */
.grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 620px) { .grid-2x2 { grid-template-columns: 1fr; } }

/* ============ SERVICE STACK ============ */
.stack { display: grid; gap: 8px; margin-bottom: 26px; }
.stack-layer {
  border-radius: 12px;
  padding: 16px 20px;
  color: #08313a;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  box-shadow: var(--shadow-sm);
}
.stack-name { font-weight: 700; font-size: 1.05rem; }
.stack-sub { font-weight: 500; font-size: 0.82rem; opacity: 0.8; }
.stack-ex { font-size: 0.88rem; opacity: 0.92; }
.layer-clients { background: #dff6f4; margin: 0 8%; border: 1px solid var(--line); }
.layer-saas   { background: linear-gradient(135deg, #9be4dd, #6fd0c9); }
.layer-paas   { background: linear-gradient(135deg, #5fc3cd, #3ba7bb); color: #06303a; }
.layer-iaas   { background: linear-gradient(135deg, #2f8fa8, #1f6f86); color: #eafcfb; }
.stack-layer.is-highlight {
  outline: 3px solid var(--sky-3);
  outline-offset: 2px;
  position: relative;
}
.stack-layer.is-highlight::after {
  content: "this project";
  position: absolute;
  top: -11px; right: 12px;
  background: var(--sky-3);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 720px) { .model-grid { grid-template-columns: 1fr; } }
.model-note {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.model-note h3 { margin: 0 0 8px; color: var(--sky-3); }
.model-note p { margin: 0 0 8px; font-size: 0.9rem; color: var(--slate); }
.model-note p:last-child { margin-bottom: 0; }
.model-note strong { color: var(--ink); }

/* ============ CALLOUT ============ */
.callout {
  background: linear-gradient(135deg, rgba(127,216,209,0.16), rgba(75,184,201,0.10));
  border: 1px solid var(--sky-2);
  border-left: 5px solid var(--sky-3);
  border-radius: 12px;
  padding: 18px 20px;
}
.callout-tag {
  display: inline-block;
  background: var(--sky-3);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.callout p { margin: 0; }
.callout a { color: var(--sky-3); font-weight: 600; }

/* ============ TIMELINE ============ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 7px; left: 3%; right: 3%;
  height: 3px;
  background: linear-gradient(90deg, var(--sky-1), var(--sky-3));
  border-radius: 2px;
}
.tl-item { flex: 1; position: relative; padding-top: 22px; min-width: 0; }
.tl-dot {
  position: absolute;
  top: 1px; left: 50%;
  transform: translateX(-50%);
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--sky-3);
  border: 3px solid var(--page-bg);
  box-shadow: 0 0 0 2px var(--sky-2);
}
.tl-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--sky-2);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.tl-era {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sky-3);
  background: rgba(75,184,201,0.14);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.tl-card h3 { margin: 0 0 8px; font-size: 1rem; }
.tl-card ul { margin: 0; padding-left: 18px; }
.tl-card li { font-size: 0.84rem; color: var(--slate); margin-bottom: 3px; }
@media (max-width: 820px) {
  .timeline { flex-direction: column; gap: 0; }
  .timeline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 3px; height: auto; }
  .tl-item { padding-top: 0; padding-left: 30px; padding-bottom: 16px; }
  .tl-dot { top: 6px; left: 7px; transform: translateX(-50%); }
}

/* ============ FRONT END / BACK END ============ */
.feb {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 16px;
}
.feb-side {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--sky-2);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.feb-side-back { border-top-color: var(--sky-3); }
.feb-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 2px; }
.feb-sub { color: var(--slate); font-size: 0.85rem; margin-bottom: 10px; }
.feb-side ul { margin: 0; padding-left: 18px; }
.feb-side li { font-size: 0.9rem; margin-bottom: 5px; }
.feb-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  color: var(--sky-3);
}
.feb-line { display: none; }
.feb-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate); }
.feb-arrows { font-size: 1.8rem; font-weight: 700; line-height: 1; }
@media (max-width: 620px) {
  .feb { flex-direction: column; }
  .feb-link { min-height: 44px; }
  .feb-arrows { transform: rotate(90deg); }
}

/* ============ BENEFITS vs RISKS ============ */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
}
.compare-col h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.compare-mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  font-size: 0.9rem;
}
.compare-benefits { border-top: 4px solid var(--ok); }
.compare-benefits .compare-mark { background: var(--ok); }
.compare-risks { border-top: 4px solid var(--danger); }
.compare-risks .compare-mark { background: var(--danger); }
.compare-col ul { margin: 0; padding-left: 20px; }
.compare-col li { margin-bottom: 8px; font-size: 0.92rem; color: var(--slate); }
.compare-col strong { color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .arch { flex-direction: column; }
  .arch-arrow { flex-direction: row; gap: 8px; min-height: 40px; transform: rotate(90deg); }
  .hero { padding: 64px 0 52px; }
  .section { padding: 48px 0; }
}
@media (max-width: 520px) {
  .topnav-brand { display: none; }
}
