/* =========================================================
   DRAPER CREATIVE: DESKTOP / PHONE PROTOTYPE
   Colors and fonts live in :root. Change them here.
   ========================================================= */
:root {
  --navy: #0B153E;
  --cream: #F6F4EF;
  --white: #FFFFFF;
  --stone: #7A766E;
  --serif: "DM Serif Display", Georgia, serif;
  --title: "DM Serif Display", Georgia, serif;   /* project titles */
  --sans: "DM Sans", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, monospace;   /* small labels and captions */
  /* the visitor's own phone/computer font, so the home screen reads like a real phone */
  --phone: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(5, 10, 30, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
button:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

html, body { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--navy);
  /* Your floral pattern as wallpaper. This tile repeats seamlessly. */
  background: var(--navy) url("images/pattern/pattern-web-repeat.jpg") repeat;
  background-size: 1000px auto;
  overflow: hidden;
}

/* ---------- Menu bar ---------- */
.menubar {
  position: fixed; inset: 0 0 auto 0; height: 34px; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px;
  background: rgba(11, 21, 62, .78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--cream); font-size: 14px;
}
.menubar-left, .menubar-right { display: flex; gap: 22px; align-items: center; }
.menubar .brand { font-family: var(--serif); font-size: 16px; font-weight: 500; }
.menubar button:hover { opacity: .7; }
.statusbar { display: none; }

/* ---------- Desktop area ---------- */
.desktop { position: fixed; inset: 34px 0 0 0; padding: 24px; }

/* ---------- Widgets ---------- */
.widgets {
  display: grid; grid-template-columns: 170px 170px; gap: 16px;
  width: max-content;
}
.widget {
  background: rgba(246, 244, 239, .94);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; height: 170px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .2s;
}
.widget:hover { transform: translateY(-2px); }
.widget-kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--stone); }
.widget-big { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.widget-small { font-size: 13px; color: var(--stone); }
.folder .app-label { display: none; }

/* Featured photos widget: photos crossfade, tap opens the project */
.widget-photos { grid-column: span 2; height: 220px; padding: 0; overflow: hidden; position: relative; }
.feature { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.feature.on { opacity: 1; z-index: 1; }
.feature img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff; font-size: 15px; font-weight: 600; display: flex; flex-direction: column;
}
.feature-caption small { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.services-list { font-size: 13px; line-height: 1.45; }
.services-list span:not(:last-child)::after { content: " · "; }

/* ---------- Folders (right edge) ---------- */
.folders {
  position: absolute; top: 24px; right: 24px; bottom: 24px;
  display: flex; flex-direction: column; flex-wrap: wrap-reverse; /* more projects = new column to the left */
  align-content: flex-start; gap: 18px 8px;
}
.folder {
  width: 128px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 10px;
}
.folder:hover, .folder:focus-visible { background: rgba(246, 244, 239, .16); }
.folder svg { width: 84px; height: 66px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.folder-label, .app-label {
  color: var(--white); font-size: 13px; font-weight: 500; text-align: center; line-height: 1.25;
  background: rgba(11, 21, 62, .82); padding: 3px 7px; border-radius: 6px; /* keeps labels readable on the pattern */
}
.app-icon { display: none; }
.dock { display: none; }

/* ---------- Windows ---------- */
.window {
  position: fixed; z-index: 10;
  width: min(820px, 92vw); height: min(640px, 80vh);
  background: var(--cream); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.45);
  display: flex; flex-direction: column; overflow: hidden;
  animation: open .22s ease-out;
}
@keyframes open { from { opacity: 0; transform: scale(.96); } }
.titlebar {
  height: 42px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 18px; background: var(--navy); color: var(--cream);
  cursor: grab; user-select: none; touch-action: none;
}
.titlebar:active { cursor: grabbing; }
.titlebar h2 { font-size: 14px; font-weight: 500; }
.close {
  width: 30px; height: 30px; border-radius: 8px; font-size: 18px; line-height: 1;
  display: grid; place-items: center;
}
.close:hover { background: rgba(246, 244, 239, .15); }
.back { display: none; }
.window.small { width: min(520px, 92vw); height: auto; max-height: 80vh; }
.window-body { flex: 1; overflow-y: auto; padding: 32px; }

/* Project window content */
.project-title { font-family: var(--title); font-weight: 400; font-size: 40px; line-height: 1.08; margin-bottom: 18px; }
.meta { display: flex; gap: 32px; margin-bottom: 18px; flex-wrap: wrap; }
.meta dt { font-family: var(--mono); font-size: 11px; color: var(--stone); text-transform: uppercase; letter-spacing: .06em; }
.meta dd { font-size: 15px; }
.description { max-width: 60ch; line-height: 1.6; margin-bottom: 24px; }
.awards { margin-bottom: 28px; padding: 14px 16px; border-left: 2px solid var(--navy); background: rgba(11,21,62,.04); max-width: 60ch; }
.awards h3 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--stone); margin-bottom: 6px; }
.awards ul { list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery .img { aspect-ratio: 4 / 5; background: #D9D3C7; border-radius: 6px; display: grid; place-items: center; color: var(--stone); font-size: 13px; }
.gallery .img.wide { grid-column: span 2; aspect-ratio: 3 / 2; }
.gallery > img { width: 100%; height: auto; display: block; border-radius: 6px; background: #E9E6DF; }
.gallery .wide { grid-column: span 2; }
.gallery > img.portrait { aspect-ratio: 3 / 4; object-fit: cover; }
.gallery > img.solo, .gallery > .video.solo { grid-column: span 2; width: calc(50% - 7px); justify-self: center; }

/* Videos */
.video { position: relative; border-radius: 6px; overflow: hidden; background: #000; }
.video video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.video.tall video { aspect-ratio: 3 / 4; }   /* matches the portrait photos beside it */
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.18); transition: background .2s;
}
.play span {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(246,244,239,.92); color: var(--navy); font-size: 24px; padding-left: 5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.play:hover { background: rgba(0,0,0,.05); }
.click-to-play.playing .play { display: none; }

/* Work list window */
.work-list { list-style: none; }
.work-list button {
  width: 100%; display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid #DCD8CF; font-size: 18px;
}
.work-list button:hover { color: var(--stone); }
.work-list small { color: var(--stone); font-size: 14px; }

/* Services window */
.services-page { list-style: none; margin-bottom: 28px; }
.services-page li { font-family: var(--serif); font-size: 26px; line-height: 1.2; padding: 12px 0; border-bottom: 1px solid #DCD8CF; }
.services-cta .big-link { font-size: 22px; cursor: pointer; }

/* About / contact */
.about-logo { width: 220px; margin-bottom: 24px; }
.prose p { max-width: 56ch; line-height: 1.6; margin-bottom: 14px; }
.big-link { font-family: var(--serif); font-size: 30px; text-decoration: none; color: var(--navy); border-bottom: 1px solid; }

/* =========================================================
   PHONE: everything below only applies to narrow screens
   ========================================================= */
@media (max-width: 700px) {
  body { background-size: 700px auto; }
  .menubar { display: none; }
  .statusbar {
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; inset: 0 0 auto 0; height: 44px; padding: 0 22px; z-index: 5;
    color: var(--white); font-size: 15px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6);
  }
  .statusbar { background: linear-gradient(rgba(11,21,62,.85), rgba(11,21,62,0)); height: 56px; align-items: flex-start; padding-top: 12px; }
  .statusbar-name { font-family: var(--serif); font-weight: 500; }
  .services-list { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .desktop { inset: 44px 0 0 0; padding: 12px 20px 120px; overflow-y: auto; }

  .widgets { grid-template-columns: 1fr 1fr; width: 100%; gap: 14px; }
  .widget { height: 150px; }
  .widget-big { font-size: 22px; }

  /* Folders turn into an app grid */
  .folders {
    position: static; display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 22px 10px; margin-top: 24px;
  }
  .folder { width: auto; padding: 0; }
  .folder svg { display: none; }
  .app-icon {
    display: grid; place-items: center; width: 62px; height: 62px; border-radius: 14px;
    background: var(--cream); color: var(--navy); font-family: var(--serif); font-size: 20px;
    box-shadow: 0 1px 2px rgba(10,14,50,.14), 0 6px 14px rgba(10,14,50,.20);
  }
  .app-label { font-size: 11px; padding: 2px 5px; }

  .dock {
    display: flex; justify-content: space-around; position: fixed; left: 12px; right: 12px; bottom: 16px;
    padding: 12px 8px 8px; border-radius: 28px;
    background: rgba(246, 244, 239, .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .dock button { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .dock-icon { background: var(--navy); color: var(--cream); font-family: var(--sans); }

  /* Windows become full-screen "apps" */
  .window { inset: 0 !important; width: 100%; height: 100%; border-radius: 0; animation: slide .25s ease-out; }
  @keyframes slide { from { transform: translateY(24px); opacity: 0; } }
  .titlebar { height: 52px; padding: 0 12px; cursor: default; }
  .titlebar h2 { position: absolute; left: 90px; right: 90px; text-align: center; pointer-events: none;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .window.small { width: 100%; height: 100%; max-height: none; }
  .close { display: none; }
  .back { display: block; position: relative; z-index: 1; font-size: 16px; padding: 12px 14px 12px 4px; min-height: 44px; }
  .window-body { padding: 24px 20px 48px; }
  .project-title { font-size: 32px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .img.wide, .gallery .wide, .gallery > img.solo, .gallery > .video.solo { grid-column: span 1; width: 100%; }
  .video.tall video { aspect-ratio: 9 / 16; }   /* full height on phones */
}

/* =========================================================
   PHONE HOME SCREEN
   Change --home-bg / --home-ink to try other backgrounds.
   ========================================================= */
@media (max-width: 700px) {
  :root { --home-bg: #F6F4EF; --home-ink: #0B153E; --home-card: rgba(11,21,62,.06); }
  /* plain cream: clean, lets the project photos lead */
  body { background: var(--home-bg); }
  .statusbar { background: var(--home-bg); color: var(--home-ink); text-shadow: none; }

  /* one 4-column grid: featured photo, services, then the apps */
  .desktop {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px;
    align-content: start; padding: 64px 20px 130px; inset: 0;
  }
  .widgets, .folders { display: contents; }
  .widget { background: var(--home-card); box-shadow: none; color: var(--home-ink); }
  /* featured photos across the top; services lives in the dock */
  .widget-photos { grid-column: 1 / -1; order: 1; height: 260px; }
  .widget-services { display: none; }

  .folder { order: 3; }
  .folders > .folder:first-child { margin-top: 6px; }

  .folder .folder-label { display: none; }
  .folder .app-label, .dock .app-label {
    display: block; color: var(--home-ink); background: none; padding: 0;
    font-size: 11px; font-weight: 500; text-align: center;
  }
  /* project names: wrap onto up to 2 lines under the icon */
  .folder .app-label {
    width: calc(100% + 8px); margin: 0 -4px;
    font-size: 11px; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .app-icon { background: #E9E6DF; box-shadow: 0 1px 2px rgba(10,14,50,.14), 0 6px 14px rgba(10,14,50,.20); font-size: 18px; }
  .app-icon.has-image { background-size: cover; background-position: center; }

  .dock { background: var(--home-card); }
  /* dock icons: four sections of the opening painting (images/dock/) */
  .dock-icon { background-color: var(--navy); background-size: cover; background-position: center; }
  .dock .app-label { white-space: nowrap; font-size: 10.5px; }
  .dock button { min-width: 0; flex: 1; }
}

/* Home screen text uses the phone's own font */
@media (max-width: 700px) {
  .statusbar, .statusbar-name, .app-label, .dock, .feature-caption, .widget-services { font-family: var(--phone); }
  .statusbar-name { font-weight: 600; }
}

/* ---------- Home bar (phone project windows) ---------- */
.home-bar { display: none; }
@media (max-width: 700px) {
  .home-bar {
    display: grid; place-items: center; position: absolute; left: 0; right: 0; bottom: 0;
    height: calc(34px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(rgba(246,244,239,0), rgba(246,244,239,.95) 45%);
    z-index: 2; touch-action: none;
  }
  .home-bar span { width: 134px; height: 5px; border-radius: 3px; background: var(--navy); opacity: .85; }
  .window-body { padding-bottom: 72px; }
}

/* ---------- Message notification ---------- */
.note {
  position: fixed; z-index: 4000; top: 46px; right: 16px; width: min(360px, calc(100vw - 32px));
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-align: left;
  font-family: var(--phone); color: #111;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.06);
  transform: translateY(-140%); opacity: 0;
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.1), opacity .35s ease;
  cursor: pointer;
}
.note.in { transform: none; opacity: 1; }
.note[hidden] { display: none; }
.note-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; overflow: hidden; }
.note-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-text { display: grid; gap: 1px; min-width: 0; }
.note-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.note-top strong { font-weight: 600; }
.note-time { color: rgba(0,0,0,.45); font-size: 13px; }
.note-msg { font-size: 14px; line-height: 1.3; }
@media (max-width: 700px) {
  .note { top: 10px; left: 8px; right: 8px; width: auto; margin: 0 auto; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .note { transition: opacity .2s; transform: none; } }

/* ---------- Lock screen (phone only) ---------- */
@property --tip { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.lock { display: none; }
@media (max-width: 700px) {
  .lock {
    display: block; position: fixed; inset: 0; z-index: 5000;
    background: #060A33; /* the navy from your mockup */
    overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  }
  .lock img { -webkit-user-drag: none; }
  .lock-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .lock-flower, .lock-word { position: absolute; opacity: 0; transform-origin: 0 0; pointer-events: none; }
  /* tip of one leaf that isn't in the painting: tiny feathered mask over just the tip */
  .lock-flower {
    -webkit-mask-image: radial-gradient(ellipse var(--tip) calc(var(--tip) * .8) at 83% 39%, transparent 20%, #000 100%);
            mask-image: radial-gradient(ellipse var(--tip) calc(var(--tip) * .8) at 83% 39%, transparent 20%, #000 100%);
  }


  .lock-hint {
    position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--cream); font-size: 14px; letter-spacing: .02em; opacity: 0; text-align: center;
  }
  .lock-hint .chevron { font-size: 22px; line-height: 1; animation: bob 1.6s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-6px); } }
  .lock.unlocking { transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
  .desktop.behind { transform: scale(1.06); opacity: 0; }
  .desktop.revealing { transition: transform .6s ease-out, opacity .45s ease-out; transform: none; opacity: 1; }
}

/* People who turn off motion in their settings get no animations */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   PHONE HOME: PHOTOS-APP LAYOUT
   Featured row + one row per project + Library tab
   ========================================================= */
.photos-home, .ph-tabs { display: none; }
@media (max-width: 700px) {
  :root { --ph-bg: #F6F4EF; --ph-ink: #0B153E; --ph-soft: rgba(11,21,62,.07); --ph-grey: #7C8197; --tile: 30vw; }
  body { background: var(--ph-bg); }
  .desktop { display: none; }
  .statusbar { background: linear-gradient(var(--ph-bg) 60%, rgba(246,244,239,0)); color: var(--ph-ink); text-shadow: none; }
  .statusbar-name { display: none; }

  .photos-home {
    display: block; position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 50px 0 120px; color: var(--ph-ink); font-family: var(--phone);
  }
  .ph-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 20px 6px; position: relative; }
  .ph-title { font-family: var(--phone); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
  .ph-tag { color: var(--ph-grey); font-size: 15px; font-weight: 500; margin-top: 2px; }
  .ph-actions { display: flex; gap: 10px; align-items: center; padding-top: 2px; }
  .ph-more, .ph-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
  .ph-more { background: var(--ph-soft); font-size: 13px; letter-spacing: 1px; font-weight: 700; }
  .ph-avatar { overflow: hidden; box-shadow: 0 0 0 2px var(--ph-bg), 0 0 0 3px rgba(11,21,62,.15); }
  .ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .ph-menu {
    position: absolute; right: 20px; top: 56px; z-index: 6; min-width: 180px; padding: 6px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 16px; box-shadow: 0 12px 40px rgba(11,21,62,.22); display: grid;
  }
  .ph-menu[hidden] { display: none; }
  .ph-menu button { padding: 11px 14px; font-size: 16px; border-radius: 10px; text-align: left; }
  .ph-menu button:active { background: var(--ph-soft); }

  .ph-row { margin-top: 22px; }
  .ph-row-head { display: flex; align-items: center; gap: 8px; padding: 0 20px; margin-bottom: 10px; }
  .ph-row-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; text-align: left; flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; }
  .ph-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ph-sub { flex: none; }
  .ph-arrow { color: var(--ph-grey); font-weight: 600; margin-left: 6px; }
  .ph-sub { color: var(--ph-grey); font-size: 14px; font-weight: 500; }
  .ph-collapse { margin-left: auto; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ph-soft); display: grid; place-items: center; transition: transform .25s; }
  .ph-collapse svg { width: 16px; height: 16px; fill: none; stroke: var(--ph-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .ph-row.closed .ph-collapse { transform: rotate(-90deg); }
  .ph-row.closed .ph-strip { display: none; }

  .ph-strip {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 4px;
    scroll-padding: 0 20px; scrollbar-width: none;
  }
  .ph-strip::-webkit-scrollbar { display: none; }
  .ph-tile {
    position: relative; flex: none; width: var(--tile); aspect-ratio: 1; border-radius: 16px; overflow: hidden;
    background: #E6E1D7; scroll-snap-align: start;
  }
  .ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ph-big { width: 62vw; aspect-ratio: 4 / 5; border-radius: 20px; }
  .ph-cap {
    position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; color: #fff; font-size: 17px; font-weight: 600; line-height: 1.2;
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.5)); text-align: left;
  }
  .ph-video {
    position: absolute; right: 8px; bottom: 7px; color: #fff; font-size: 11px; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  }
  .ph-foot { text-align: center; color: var(--ph-grey); font-size: 13px; font-weight: 500; margin: 34px 0 0; }

  /* Library grid */
  .ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 10px; }
  .ph-grid .ph-tile { width: auto; border-radius: 0; }

  /* floating bottom bar: Library · [All Work | About | Contact] · Services */
  .ph-tabs {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: fixed; left: 18px; right: 18px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 5; font-family: var(--phone);
  }
  .ph-tabgroup, .ph-round {
    background: rgba(11,21,62,.80); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: 0 8px 26px rgba(11,21,62,.28), inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 .5px rgba(255,255,255,.10);
  }
  .ph-tabs { justify-content: center; }
  .ph-tabgroup { flex: 1; display: flex; padding: 4px; border-radius: 28px; max-width: 250px; }
  .ph-seg { flex: 1; text-align: center; padding: 10px 4px; border-radius: 26px; font-size: 14px; font-weight: 500; color: #F6F4EF; white-space: nowrap; }
  .ph-seg.on { background: rgba(246,244,239,.16); font-weight: 600; }
  .ph-round { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #F6F4EF; }
  .ph-round.on { background: rgba(11,21,62,.92); box-shadow: 0 8px 26px rgba(11,21,62,.28), inset 0 0 0 2px rgba(246,244,239,.5); }
  .ph-round svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .ph-view[hidden] { display: none; }

  /* project windows sit above the tab bar */
  #windows .window { z-index: 20; }
}

@media (max-width: 700px) {
  .ph-logo-head {
    justify-content: center; background: var(--navy, #0B153E);
    margin: -50px 0 0; padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
  }
  .ph-logo img { height: 86px; width: auto; display: block; }
  .statusbar { background: transparent; transition: background .25s; }
  .statusbar.solid { background: linear-gradient(var(--ph-bg) 70%, rgba(246,244,239,0)); }
}

/* phone: the navy bottom bar stays above every page; it replaces the home bar */
@media (max-width: 700px) {
  .ph-tabs { z-index: 40; }
  .home-bar { display: none !important; }
  #windows .window-body { padding-bottom: 120px; }
  #windows .big-link { font-size: 22px; overflow-wrap: anywhere; }
}

/* Library: one big photo per project */
@media (max-width: 700px) {
  .ph-covers { display: grid; gap: 4px; margin-top: 12px; }
  .ph-cover { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: #E6E1D7; }
  .ph-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ph-cover-cap {
    position: absolute; inset: auto 0 0 0; padding: 60px 20px 18px; color: #fff; text-align: left;
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.5)); display: grid; gap: 2px;
  }
  .ph-cover-cap strong { font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
  .ph-cover-cap small { font-size: 14px; font-weight: 500; opacity: .85; }
}

.status-word { display: none; }
@media (max-width: 700px) {
  .status-word { display: none; }
}

/* phone: no fake status bar (the real phone shows its own time) */
@media (max-width: 700px) { .statusbar { display: none !important; } }

@media (max-width: 700px) { .lock-sheet { position: absolute; inset: 0; } }

/* About / Contact on phone: same navy header + logo as the home screen; page name on the cream page below */
.page-logo, .page-title { display: none; }
@media (max-width: 700px) {
  .window.page { animation: none; }
  .window.page .titlebar {
    height: auto; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px; background: var(--navy);
  }
  .window.page .page-logo { display: block; height: 86px; width: auto; }
  .window.page .titlebar h2 { display: none; }
  /* page name sits on the cream page, in the bottom bar's font, and slides up into place */
  .window.page .page-title {
    display: block; overflow: hidden; margin: 0 0 14px; padding: 2px 0;
    font-family: var(--phone); font-size: 17px; font-weight: 600; color: var(--navy);
  }
  .window.page .page-title span { display: inline-block; animation: titleup .6s cubic-bezier(.2, .8, .2, 1) both; }
  .window.page .back, .window.page .close { display: none; }
  /* page text rises in line by line, just after the title */
  .window.page .window-body > :not(.page-title) > * { animation: textup .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .12s; }
  .window.page .window-body > :not(.page-title) > *:nth-child(2) { animation-delay: .2s; }
  .window.page .window-body > :not(.page-title) > *:nth-child(3) { animation-delay: .28s; }
  .window.page .window-body > :not(.page-title) > *:nth-child(n+4) { animation-delay: .34s; }
  @keyframes titleup { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes textup { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
}
