/* Home page: a Freelance OS desktop. Each section is a window; the dock at the bottom is the navigation. */

/* Entrance: a window pops in once as it comes into view; visible by default when script fails */
.js .rv { opacity: 0; transform: translateY(22px) scale(.985); transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 120ms); }
.js .rv.in { opacity: 1; transform: none; }

.desk { padding: clamp(14px, 2.4vw, 28px) 0; }
main { padding-bottom: 104px; }

/* ---------- Phone: a bezel drawn around the whole screen, nothing is cropped ---------- */
.phone {
  position: relative; margin: 0; width: min(100%, 300px); padding: 24px 10px 16px;
  background: #161B2B; border-radius: 46px; box-shadow: 0 0 0 2px #3C4A6B, 0 10px 0 rgba(30, 50, 90, .45);
}
.phone::before { content: ''; position: absolute; top: 9px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #2B3350; }
.phone-screen { position: relative; aspect-ratio: 600 / 1273; border-radius: 30px; overflow: hidden; background: var(--navy); }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.phone-screen img.on { opacity: 1; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(18px, 4vw, 44px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(40px, 7.4vw, 84px); line-height: .98; letter-spacing: -.02em; }
.hero-line { margin-top: 18px; max-width: 28em; font-size: var(--t-lead); line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.hero-row { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-soon { display: inline-flex; align-items: center; min-height: 52px; padding: 10px 22px; border-radius: 14px; border: 2px dashed var(--ink); font-weight: 800; font-size: var(--t-body); color: var(--ink); opacity: .75; }
.chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 10px; background: var(--cream); font-size: var(--t-small); font-weight: 800; color: var(--ink); }
.hero-phone { width: min(100%, calc(70svh * .472), 340px); justify-self: center; }

/* ---------- Features: the GigHub board ---------- */
.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 4vw, 56px); align-items: start; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row { background: var(--cream); border-radius: 14px; box-shadow: 0 3px 0 var(--cream-line); transition: background-color .2s ease; }
.row:not(.sel):hover { background: #F2E6D4; }
.row.sel { background: #FBE1D6; box-shadow: 0 3px 0 #EBBFAE; }
.row-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 12px 18px; border: 0; background: transparent; text-align: left; cursor: pointer; font-size: clamp(18px, 16px + .8vw, 22px); font-weight: 800; line-height: 1.2; color: var(--ink); }
.row-val { flex: none; min-width: 2.2em; padding: 3px 10px; border-radius: 9px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 800; text-align: center; }
.row-more { max-width: 40em; margin: 0; padding: 0 18px; max-height: 0; overflow: hidden; font-size: var(--t-body); line-height: 1.45; color: var(--ink); transition: max-height .45s var(--ease), padding .45s var(--ease); }
.row.sel .row-more { max-height: 12em; padding-bottom: 18px; }
html:not(.js) .row-more { max-height: none; padding-bottom: 16px; }
.feat-pic { position: sticky; top: 84px; justify-self: end; width: 300px; }

/* ---------- Tap ---------- */
.win-narrow { max-width: 640px; margin-inline: auto; }
.tap-intro { font-size: var(--t-lead); font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.word { display: inline-block; }
.word.pop { animation: pop .55s var(--ease); }
@keyframes pop { from { transform: translateY(.3em); opacity: 0; } to { transform: none; opacity: 1; } }
.order, .chat-head { margin-top: 20px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--cream); border-radius: 14px; box-shadow: 0 3px 0 var(--cream-line); }
.order-ava { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #E07A5F; position: relative; }
.order-ava::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 18px; transform: translate(-50%, -45%); background: #fff; clip-path: path('M10 18C-6 7 3 -2 10 5C17 -2 26 7 10 18Z'); }
.order-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.order-text b { font-size: 17px; font-weight: 800; }
.order-text > span { font-size: 15px; color: var(--muted); font-weight: 600; }
.order-pips { flex: none; display: grid; grid-template-columns: repeat(5, 9px); gap: 3px; }
.order-pips span { width: 9px; height: 9px; border-radius: 3px; background: var(--cream-line); transition: background-color .2s ease; }
.order-pips span.on { background: var(--coral); }
#play[data-state="done"] .tb { --c: #8DBBA5; --on: var(--ink); }
.tap {
  display: grid; place-items: center; width: 100%; min-height: clamp(130px, 28vw, 190px); margin-top: 18px; padding: 0; border: 0; border-radius: 24px;
  background: var(--coral); color: #fff; box-shadow: 0 8px 0 var(--coral-ledge); cursor: pointer; transition: transform .1s ease, box-shadow .1s ease, background-color .3s ease;
}
.tap:active, .tap.bump { transform: translateY(6px); box-shadow: 0 2px 0 var(--coral-ledge); }
#play[data-state="done"] .tap { background: #4F8B6E; box-shadow: 0 8px 0 #386650; }
.tap-label { font-size: clamp(44px, 10vw, 72px); font-weight: 1000; line-height: 1; letter-spacing: -.01em; }

/* ---------- Offices ---------- */
.lead { font-size: var(--t-lead); font-weight: 600; line-height: 1.4; max-width: 34em; text-wrap: pretty; }
.offices { margin-top: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.office { margin: 0; display: flex; flex-direction: column; background: var(--cream); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 0 var(--cream-line); }
.office img { width: 100%; height: auto; aspect-ratio: 760 / 530; object-fit: cover; background: var(--navy); }
.office figcaption { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 1.4; }
.office figcaption b { font-size: 19px; font-weight: 800; }

/* ---------- Fee: chat and receipt ---------- */
.chat-head { margin-top: 0; }
.chat { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg-in, .msg-out { max-width: 82%; padding: 10px 16px; border-radius: 16px; font-size: var(--t-body); font-weight: 500; line-height: 1.35; }
.msg-in { align-self: flex-start; background: var(--cream); box-shadow: 0 2px 0 var(--cream-line); border-bottom-left-radius: 6px; }
.msg-out { align-self: flex-end; background: var(--blue); color: #fff; font-weight: 600; border-bottom-right-radius: 6px; }
.slip { margin-top: 22px; padding: 16px 18px; background: var(--cream); border-radius: 14px; box-shadow: 0 3px 0 var(--cream-line); font-variant-numeric: tabular-nums; }
.slip-r { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 16px; font-weight: 600; }
.slip-r i { flex: 1; min-width: 12px; height: 1.1em; overflow: hidden; position: relative; top: 2px; }
.slip-r i::after { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; position: absolute; left: 0; white-space: nowrap; opacity: .45; font-weight: 800; }
.slip-r b { font-weight: 800; }
.slip-total { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 12px 14px; background: var(--navy); color: #fff; border-radius: 10px; font-weight: 800; font-size: var(--t-lead); }
.note { margin-top: 14px; font-size: var(--t-small); color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.fq { background: var(--cream); border-radius: 14px; box-shadow: 0 3px 0 var(--cream-line); }
.fq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 60px; padding: 12px 18px; border: 0; background: transparent; text-align: left; cursor: pointer; font-size: clamp(17px, 16px + .4vw, 20px); font-weight: 800; line-height: 1.25; color: var(--ink); }
.fq-q::after { content: ''; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); transition: transform .3s var(--ease); }
.fq.open .fq-q::after { transform: rotate(-135deg) translate(-2px, -2px); }
.fq-a { max-width: 44em; margin: 0; padding: 0 18px; max-height: 0; overflow: hidden; font-size: var(--t-body); line-height: 1.5; transition: max-height .45s var(--ease), padding .45s var(--ease); }
.fq.open .fq-a { max-height: 14em; padding-bottom: 18px; }
html:not(.js) .fq-a { max-height: none; padding-bottom: 16px; }

/* ---------- Mail ---------- */
.btn-wide { margin-top: 18px; }
.form { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.form > label { font-size: 17px; font-weight: 800; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form input[type="email"] { flex: 1 1 240px; min-height: 52px; padding: 0 18px; border: 2px solid var(--cream-line); border-radius: 12px; background: #fff; color: var(--ink); font: 600 var(--t-body) 'Nunito', system-ui, sans-serif; }
.form input[type="email"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.form input[type="email"]::placeholder { color: #6B7088; }
.consent { display: flex; gap: 12px; align-items: flex-start; }
.consent input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--navy); }
.consent label { font-size: var(--t-small); font-weight: 500; color: var(--muted); }
.consent a, .contact a { color: #2F5DB0; font-weight: 700; }
.msg { padding: 10px 16px; background: var(--navy); color: #fff; border-radius: 10px; font-weight: 700; animation: msgIn .4s var(--ease) both; }
.msg[hidden] { display: none; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.contact { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--cream); display: flex; flex-direction: column; gap: 12px; }
.mail { font-size: clamp(20px, 5.4vw, 30px); font-weight: 900; text-decoration: none; word-break: break-all; }
.contact nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.copy { width: fit-content; margin: 18px auto 0; padding: 6px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-size: var(--t-small); font-weight: 700; }

/* ---------- Dock: the game's taskbar ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; gap: clamp(4px, 1.4vw, 12px);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--navy); box-shadow: 0 -4px 0 rgba(20, 30, 55, .25);
}
.dock a {
  flex: 1 1 0; max-width: 104px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px;
  border-radius: 14px; background: var(--navy-tile); color: var(--navy-text); text-decoration: none; font-size: 12px; font-weight: 800; line-height: 1.1;
  transition: background-color .2s ease, color .2s ease, transform .12s ease;
}
.dock a svg { width: 22px; height: 22px; }
.dock a:hover { color: #fff; }
.dock a:active { transform: translateY(2px); }
.dock a[aria-current="true"] { background: var(--c); color: var(--on); }
.dock a:focus-visible { outline-offset: -3px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { width: min(72vw, 300px); }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-pic { display: none; }
  .feat-pic.inline { display: block; position: relative; top: 0; width: min(66vw, 240px); margin: 6px 18px 18px; justify-self: start; }
  .offices { grid-template-columns: 1fr; }
  .office { flex-direction: row; align-items: stretch; }
  .office img { width: 42%; height: auto; aspect-ratio: auto; min-height: 150px; }
  .office figcaption { flex: 1; padding: 12px 14px; justify-content: center; }
}
@media (max-width: 560px) {
  .office { flex-direction: column; }
  .office img { width: 100%; aspect-ratio: 760 / 530; min-height: 0; }
  .msg-in, .msg-out { max-width: 92%; }
  .tb-title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; }
}
