/* Shared styles for the pages under /projects/. The homepage keeps its own
   inline copy of the basics so nothing here can change it by accident. */

/* Tomorrow is self-hosted (SIL OFL, see fonts/OFL.txt). */
@font-face {
  font-family: 'Tomorrow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/tomorrow-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tomorrow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/tomorrow-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Tomorrow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/tomorrow-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tomorrow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/tomorrow-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F6F6F4;
  --grid-line: #E4E4E0;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: #EAEAE6;
  --text-primary: #3A3A37;
  --text-secondary: #83837D;
  --accent: #E8512A;
  /* tiles use a gray fold so app icon colors don't compete with the brick red */
  --fold-quiet: #C9C9C3;
}

* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 6px 6px;
  font-family: 'Tomorrow', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 20px 192px;
}

.page {
  max-width: 980px;
  margin: 0 auto;
}

.arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Projects header (no card) ---------- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

.title-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mark {
  width: 44px;
  height: 44px;
  color: var(--text-primary);
  display: block;
}

h1 {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1;
  margin: 0 0 8px;
}

.subhead {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back:hover { color: var(--text-primary); }

/* Option B: bio as plain text under the header */
.intro {
  max-width: 620px;
  margin: -12px 0 40px;
}

.intro p {
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.15s ease;
}

.text-link:hover { opacity: 0.65; }

/* ---------- Tile grid ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px;
}

/* The shadow lives on the link, the clip-path on the card inside it,
   so the drop shadow follows the cut corner. */
.tile {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  filter: drop-shadow(0 12px 26px rgba(30, 30, 25, 0.12)) drop-shadow(0 3px 6px rgba(30, 30, 25, 0.06));
  transition: transform 0.2s ease;
}

.tile:hover { transform: translateY(-2px); }

.tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.tile-card {
  aspect-ratio: 1 / 1;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  transition: background-color 0.2s ease;
}

.tile:hover .tile-card { background: rgba(255, 255, 255, 0.96); }

.tile-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--fold-quiet);
  clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
  filter: drop-shadow(-3px 3px 4px rgba(30, 30, 25, 0.3));
}

.tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

/* Placeholder until real icons arrive: a colored square with initials */
.tile-icon.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.tile-title {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.3px;
  line-height: 1.25;
  margin: 16px 0 4px;
}

.tile-sub {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  margin: 0;
}

.tile-cta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tile-cta .arrow { color: var(--text-primary); transition: transform 0.2s ease; }
.tile:hover .tile-cta .arrow { transform: translateX(3px); }

/* Option A: About Carolina as a two-tile-wide first card */
.tile.wide { grid-column: span 2; }
.tile.wide .tile-card { aspect-ratio: auto; }

.about-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-head .tile-title { margin: 0 0 4px; }

.tile-icon.round { border-radius: 50%; }

.about-bio {
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.4px;
  margin: 16px 0 0;
  max-width: 420px;
}

/* ---------- Project pages (home, support, privacy) ---------- */

.card-wrap {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  filter: drop-shadow(0 26px 56px rgba(30, 30, 25, 0.16)) drop-shadow(0 4px 10px rgba(30, 30, 25, 0.07));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  clip-path: polygon(0 0, calc(100% - 48px) 0, 100% 48px, 100% 100%, 0 100%);
  padding: 48px 60px 96px;
}

.fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
  filter: drop-shadow(-5px 5px 7px rgba(30, 30, 25, 0.45));
}

.card .back { padding-top: 0; margin-bottom: 40px; width: max-content; }

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

.app-head .tile-icon { width: 72px; height: 72px; border-radius: 16px; font-size: 22px; }
.app-head h1 { margin-bottom: 8px; }

.prose {
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.5px;
}

.prose p { margin: 0 0 18px; }
.prose h2 { font-size: 18px; font-weight: 400; margin: 34px 0 10px; }
.prose a { color: var(--accent); }

.draft-note {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border: 1px dashed var(--accent);
  padding: 10px 14px;
  margin: 0 0 28px;
}

.page-foot {
  margin-top: 48px;
  font-size: 11px;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
}

.page-foot a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.page-foot a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-secondary);
}

/* ---------- Narrower screens ---------- */

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}

@media (max-width: 720px) {
  body { padding: 28px 16px 112px; }
  .site-head { flex-direction: column-reverse; gap: 20px; margin-bottom: 30px; }
  .back { padding-top: 0; }
  h1 { font-size: 26px; }
  .mark { width: 36px; height: 36px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .tile-card { padding: 14px; }
  .tile-icon { width: 40px; height: 40px; border-radius: 9px; }
  .tile-title { font-size: 15px; margin-top: 12px; }
  .tile-sub { font-size: 11px; }
  .card { padding: 34px 26px 68px; }
  .card .back { margin-bottom: 30px; }
  .app-head .tile-icon { width: 60px; height: 60px; border-radius: 13px; }
  .intro p, .prose { font-size: 14px; }
}

/* ---------- App store pages (support, privacy) ---------- */

/* gray fold, so the brick red doesn't clash with a colorful app icon */
.fold.quiet {
  background: var(--fold-quiet);
  filter: drop-shadow(-4px 4px 6px rgba(30, 30, 25, 0.3));
}

.prose a.email {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.prose a.email:hover { color: var(--text-secondary); }

.page-foot.split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

/* links in the footer: darker and bolder, never underlined */
.page-foot.split a,
.page-foot.split a:hover {
  border-bottom: 0;
  color: var(--text-primary);
  font-weight: 500;
}

.page-foot.split a:hover { color: var(--text-secondary); }

/* the link to the other page sits in the same light gray as the copyright */
.page-foot.split > a { color: var(--text-secondary); }
.page-foot.split > a:hover { color: var(--text-primary); }

/* app page subhead in gray too, so nothing red sits next to the app icon */
.app-head .subhead { color: var(--text-secondary); }
